Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

moshu

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

moshu's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Sorry to let you down but I have started a new project inspired by the drive for a isometric game engine I have a working UDP server/client working for C#/XNA that uses isometric movement plus it has paperdolling, per pixel collision detection, XNA's PNG support, well the entire XNA framework, and much more its very beta and there isn't a demo yet but I will be posting one soon I hope someone can take my isometric movement code here and turn it into a working system for eclipse. /bow
  2. Well if you had done any cussing lately you are now absolved of your foul language! She just trying to keep you straight, with the lord haha jk.
  3. http://www.touchofdeathforums.com/smf/index.php?topic=38807.msg379073#msg379073 I have the source code for this working right now Devogen is working on npc's I am working on camera bug. Check it out if you know any vb try to help =)
  4. Great work Rep++ :bstar: :bstar: :bstar: :bstar: :bstar: 5/5 stars thx for being so nice and letting others work off of your code.
  5. I am getting a new host the college server went down and omg thx so much devogen if u can msn me I have some new fix's I will upload fixes and new source today sorry for the broke link. I fixed the bounce off of walls and almost got camera jump fixed. I have isolated the code responsible for the jump. Just got to brain storm on how to add to it to stop camera jump. Devogen thanks so much and Vb.net gurn thx too for help making this work. I knew if I showed you all the diag. code this could be a working system very soon and I will isolated diag. movement to be able to turn on and off or have both on at the same time. So eclipse will have three different movement systems. :cheesy: MSN me can you post the complete npc code or let me add it to the top post of this I will credit you =) This forum rocks haha eclipse FTW Ok this code is where the jump is happening so anyone that wants please help if you get it working post here it here I will add it to top and overall source. When player/tiles are blt to screen or drawn they use the New… variables here to position player/tiles. So since we are baiscly moving in two directions at once this needs to be modified to prevent camera jump... **!My thoughts only this is not modified or anything you shouldn't cut/paste into source just for brain storming thx!** Code is in **GameLoop** in **modGameLogic** ``` 'assign values 10 and 7 these related to screen width and height in tiles to players position i believe NewX = 10 NewY = 7 'New player cords are current cords minus newx or y NewPlayerY = Player(MyIndex).y - NewY NewPlayerX = Player(MyIndex).X - NewX 'convert newX and y to pixels by times it by tile width and height NewX = NewX * PIC_X NewY = NewY * PIC_Y 'capture players current offest NewXOffset = Player(MyIndex).xOffset NewYOffset = Player(MyIndex).yOffset 'Here we check to see if player's camera is at the bounds of the map Top,bottom,left,right 'The new variables declared above this get set here to be used to draw player in bltPlayer If Player(MyIndex).y - 7 < 1 Then 'Player is touching top of map NewY = Player(MyIndex).y * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = 0 If Player(MyIndex).y = 7 And Player(MyIndex).Dir = DIR_UP Then 'Player can see top Wall/Bounds jumps happen Here NewPlayerY = Player(MyIndex).y - 7 NewY = 7 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If ElseIf Player(MyIndex).y + 9 > MAX_MAPY + 1 Then 'Player Camera has touched bottom of map NewY = (Player(MyIndex).y - (MAX_MAPY - 14)) * PIC_Y + Player(MyIndex).yOffset NewYOffset = 0 NewPlayerY = MAX_MAPY - 14 If Player(MyIndex).y = MAX_MAPY - 7 And Player(MyIndex).Dir = DIR_DOWN Then 'Player can see bottom Wall/Bounds jumps happen Here NewPlayerY = Player(MyIndex).y - 7 NewY = 7 * PIC_Y NewYOffset = Player(MyIndex).yOffset End If End If If Player(MyIndex).X - 10 < 1 Then 'Player has touched Left wall/bounds of map NewX = Player(MyIndex).X * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = 0 If Player(MyIndex).X = 10 And Player(MyIndex).Dir = DIR_LEFT Then 'Player can see left Wall/Bounds jumps happen Here NewPlayerX = Player(MyIndex).X - 10 NewX = 10 * PIC_X NewXOffset = Player(MyIndex).xOffset End If ElseIf Player(MyIndex).X + 11 > MAX_MAPX + 1 Then 'Player has touched right wall/bounds of map NewX = (Player(MyIndex).X - (MAX_MAPX - 19)) * PIC_X + Player(MyIndex).xOffset NewXOffset = 0 NewPlayerX = MAX_MAPX - 19 If Player(MyIndex).X = MAX_MAPX - 9 And Player(MyIndex).Dir = DIR_RIGHT Then 'Player can see right Wall/Bounds jumps happen Here NewPlayerX = Player(MyIndex).X - 10 NewX = 10 * PIC_X NewXOffset = Player(MyIndex).xOffset End If End If ScreenX = GetScreenLeft(MyIndex) ScreenY = GetScreenTop(MyIndex) ScreenX2 = GetScreenRight(MyIndex) ScreenY2 = GetScreenBottom(MyIndex) If ScreenX < 0 Then ScreenX = 0 ScreenX2 = 20 ElseIf ScreenX2 > MAX_MAPX Then ScreenX2 = MAX_MAPX ScreenX = MAX_MAPX - 20 End If If ScreenY < 0 Then ScreenY = 0 ScreenY2 = 15 ElseIf ScreenY2 > MAX_MAPY Then ScreenY2 = MAX_MAPY ScreenY = MAX_MAPY - 15 End If ```
  6. I know its ez to move in diag the only problem is that the camera does this jump crap I have been beating my head trying to fix it but i already have npc's walking diag. but their also server side so I will wait till camera bug is fixed then everything else will be set to diag. I just need help fixing camera bug
  7. Ok news update, the Move Character Sub in modGameLogic is not used at all in the game so it is not the problem or the place to fix it. I gutted it out and client runs fine. Also when the tiles are blt to the screen or drawn to screen they use the newxoffset newyoffset values to draw tiles so I think since they are effected by xOffset and yOffset that they also need to be adjusted when player moves. Looking into it now. If I am wrong about move character being a junk sub plz let me know someone =) I'm almost sure the key to this in the gameloop sub in modGameLogic where newx and newy offset values are assigned.
  8. Ok I will keep grinding on it today, I will post npc diag movement and hopefully camera fix thx for your help and I am excited if we can get this working eclipse will be a iso engine also sorta. I am happy to help you guys out I don't get to use my skills much where i live. :P
  9. Thx Devogen, I posted it cuz I needed help weeding out camera jump and i am making npc's move now. Key's aren't final either really plus I was going to isolate diagonal movement so u could do both thus making 8 way movement it can be done. Its almost done I just need to figure out the wall jumping when u walk into it, and camera jump when it stops touching a map edge and then touches it again. I will be updating this as I work. I have it pin pointed to the checkmovement or player move in game logic I could be wrong. If you find a fix let me know I hope someone can help me with this one big thanks I'm out its 3 am =) thx for reply's
  10. I have fixed the run so now run away… :cheesy: what do you mean by sort of also =) feed back would mean alot thx
  11. Thx all and I have done a source edit to make it work here it is [http://www.touchofdeathforums.com/smf/index.php?topic=38807.0](http://www.touchofdeathforums.com/smf/index.php?topic=38807.0) check it out
  12. Moshu MSN: [email protected] Hello all, I haven't used a forum in forever so if I am posting wrong plz let me know. I am trying to earn a title on this forum. I will mostly post in source edits. I just downloaded EE2.7 and VB6 two days ago. I have never coded using vb6 just the vb.net, C#/XNA, C++, GML, etc. I was watching the code run in debug, and found out that when the player moves its xOffset and yOffset are set to the +/- value of PIC_X ad PIC_Y. PIC_X & Y are 32 and also represent width and height of the tile system. Each step your speed is add/subtracted from X & Y offsets. Once it hits zero you have moved to the next tile. So i just added in a extra offset to each move to make diagonal movement. GM speed is 4 so each step player moves +/- 4 from offset. also to note that the up/down keys -/+ X & Y values the same so if speed is 4 X & Y offset both get -/+ 4\. left/right keys will do opposite operations to X & Y offset one gets added to one subtracted from. ***Known Bugs Working On Fixing****LOOKING FOR HELP ON HOW TO FIX THIS 1\. Once camera is away from edge of map and then meets edge of map again it will cause a small jump with player. 2\. ~~If player touches Top,Left, or Right edge of map it will cause a lil jump.~~ Fixed 2/20/09 :cheesy: 3\. ~~Run needs to be coded its right below walk code alter the same way the walk i upload a version that has run coded in also. If you run now u will keep going.~~ Fixed 4\. Correct player jump when online with diagonal code. Added 2/21/09 I wanted to go ahead and post it cuz i can't work on it today =( maybe someone can help save some time=). I know bugs are related to camera movement and player movement so I should fix it soon. **ctrl + F = find text, in vb6 you can search all the code for a certain string** Where I put my name as a comment is where I have changed the source code I can't make exe's for some reason so you have to use vb6 to see diagonal movement Download my source Here–--->[Click Me - Updated 2/20/09](http://www.filefactory.com/file/af1hega/n/fixedwallbounce_rar) Hope this will impress you guys if not I tried haha always looking for Rep++ Now to the code STEP 1-Open **modGameLogic**.bas(solution explorer>modules) in VB6 and Find sub CheckMovement Cut and paste my sub from below. ``` Sub CheckMovement() If Not GettingMap Then If IsTryingToMove Then If CanMove Then ' Check if player has the shift key down for running If ShiftDown Then Player(MyIndex).Moving = MOVING_RUNNING Else Player(MyIndex).Moving = MOVING_WALKING End If Select Case GetPlayerDir(MyIndex) Case DIR_UP Call SendPlayerMove Player(MyIndex).yOffset = PIC_Y Player(MyIndex).xOffset = PIC_X 'Moshu----------- Call SetPlayerY(MyIndex, GetPlayerY(MyIndex) - 1) Call SetPlayerX(MyIndex, GetPlayerX(MyIndex) - 1) 'Moshu----------- Case DIR_DOWN Call SendPlayerMove Player(MyIndex).yOffset = PIC_Y * -1 Player(MyIndex).xOffset = PIC_X * -1 'Moshu----------- Call SetPlayerY(MyIndex, GetPlayerY(MyIndex) + 1) Call SetPlayerX(MyIndex, GetPlayerX(MyIndex) + 1) 'Moshu----------- Case DIR_LEFT Call SendPlayerMove Player(MyIndex).xOffset = PIC_X Player(MyIndex).yOffset = PIC_Y * -1 'Moshu----------- Call SetPlayerX(MyIndex, GetPlayerX(MyIndex) - 1) Call SetPlayerY(MyIndex, GetPlayerY(MyIndex) + 1) 'Moshu----------- Case DIR_RIGHT Call SendPlayerMove Player(MyIndex).xOffset = PIC_X * -1 Player(MyIndex).yOffset = PIC_Y 'Moshu----------- Call SetPlayerX(MyIndex, GetPlayerX(MyIndex) + 1) Call SetPlayerY(MyIndex, GetPlayerY(MyIndex) - 1) 'Moshu----------- End Select ' Gotta check :) If Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex)).Type = TILE_TYPE_WARP Then GettingMap = True End If End If End If End If End Sub ```Step 2: Next find **ProcessMovement** sub its in the same module **modGameLogic** cut and paste my sub from below. ``` Sub ProcessMovement(ByVal Index As Long) ' Check if player is walking, and if so process moving them over If Player(Index).Moving = MOVING_WALKING Then If Player(Index).Access > 0 Then If SS_WALK_SPEED 0 Then Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).yOffset = Player(Index).yOffset - SS_WALK_SPEED Player(Index).xOffset = Player(Index).xOffset - SS_WALK_SPEED 'Moshu Case DIR_DOWN Player(Index).yOffset = Player(Index).yOffset + SS_WALK_SPEED Player(Index).xOffset = Player(Index).xOffset + SS_WALK_SPEED 'Moshu Case DIR_LEFT Player(Index).xOffset = Player(Index).xOffset - SS_WALK_SPEED Player(Index).yOffset = Player(Index).yOffset + SS_WALK_SPEED 'Moshu Case DIR_RIGHT Player(Index).xOffset = Player(Index).xOffset + SS_WALK_SPEED Player(Index).yOffset = Player(Index).yOffset - SS_WALK_SPEED 'Moshu End Select Else Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).yOffset = Player(Index).yOffset - GM_WALK_SPEED Player(Index).xOffset = Player(Index).xOffset - GM_WALK_SPEED 'Moshu Case DIR_DOWN Player(Index).yOffset = Player(Index).yOffset + GM_WALK_SPEED Player(Index).xOffset = Player(Index).xOffset + GM_WALK_SPEED 'Moshu Case DIR_LEFT Player(Index).xOffset = Player(Index).xOffset - GM_WALK_SPEED Player(Index).yOffset = Player(Index).yOffset + GM_WALK_SPEED 'Moshu Case DIR_RIGHT Player(Index).xOffset = Player(Index).xOffset + GM_WALK_SPEED Player(Index).yOffset = Player(Index).yOffset - GM_WALK_SPEED 'Moshu End Select End If Else If SS_WALK_SPEED 0 Then Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).yOffset = Player(Index).yOffset - SS_WALK_SPEED Player(Index).xOffset = Player(Index).xOffset - SS_WALK_SPEED 'Moshu Case DIR_DOWN Player(Index).yOffset = Player(Index).yOffset + SS_WALK_SPEED Player(Index).xOffset = Player(Index).xOffset + SS_WALK_SPEED 'Moshu Case DIR_LEFT Player(Index).xOffset = Player(Index).xOffset - SS_WALK_SPEED Player(Index).yOffset = Player(Index).yOffset + SS_WALK_SPEED 'Moshu Case DIR_RIGHT Player(Index).xOffset = Player(Index).xOffset + SS_WALK_SPEED Player(Index).yOffset = Player(Index).yOffset - SS_WALK_SPEED 'Moshu End Select Else Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).yOffset = Player(Index).yOffset - WALK_SPEED Player(Index).xOffset = Player(Index).xOffset - WALK_SPEED 'Moshu Case DIR_DOWN Player(Index).yOffset = Player(Index).yOffset + WALK_SPEED Player(Index).xOffset = Player(Index).xOffset + WALK_SPEED 'Moshu Case DIR_LEFT Player(Index).xOffset = Player(Index).xOffset - WALK_SPEED Player(Index).yOffset = Player(Index).yOffset + WALK_SPEED 'Moshu Case DIR_RIGHT Player(Index).xOffset = Player(Index).xOffset + WALK_SPEED Player(Index).yOffset = Player(Index).yOffset - WALK_SPEED 'Moshu End Select End If End If ```Step3: Now open module **HandleData** and Ctrl + F and search for this string –> Player movement packet This is not a sub or function its a IF statement so make sure you cut and paste it in like it is in file=) Next cut and paste my code from below ``` ' :::::::::::::::::::::::::::: ' :: Player movement packet :: ' :::::::::::::::::::::::::::: If (casestring = "playermove") Then i = Val(parse(1)) X = Val(parse(2)) y = Val(parse(3)) Dir = Val(parse(4)) n = Val(parse(5)) If Dir < DIR_UP Or Dir > DIR_RIGHT Then Exit Sub End If Call SetPlayerX(i, X) Call SetPlayerY(i, y) Call SetPlayerDir(i, Dir) Player(i).xOffset = 0 Player(i).yOffset = 0 Player(i).Moving = n ' Replaced with the one from TE. Select Case GetPlayerDir(i) Case DIR_UP Player(i).yOffset = PIC_Y Player(i).xOffset = PIC_X 'Moshu----- Case DIR_DOWN Player(i).yOffset = PIC_Y * -1 Player(i).xOffset = PIC_X * -1 'Moshu----- Case DIR_LEFT Player(i).xOffset = PIC_X Player(i).yOffset = PIC_Y 'Moshu----- Case DIR_RIGHT Player(i).xOffset = PIC_X * -1 Player(i).yOffset = PIC_Y * -1 'Moshu----- End Select Exit Sub End If ```Wall bounce fix 4 lines of code total =) Locate the **CanMove** function in **modGameLogic** cut/paste code below this will be at top of function you will see it. ``` X = GetPlayerX(MyIndex) y = GetPlayerY(MyIndex) If DirUp Then Call SetPlayerDir(MyIndex, DIR_UP) X = X - 1 'moshu This lines here fix the wall bounce caused when play walks down map wall y = y - 1 ElseIf DirDown Then Call SetPlayerDir(MyIndex, DIR_DOWN) y = y + 1 X = X + 1 'moshu ElseIf DirLeft Then Call SetPlayerDir(MyIndex, DIR_LEFT) X = X - 1 y = y + 1 'moshu Else Call SetPlayerDir(MyIndex, DIR_RIGHT) X = X + 1 y = y - 1 'moshu End If ``` Download my source Here–--->[Click Me - Updated 2/20/09](http://www.mediafire.com/?m4kyeei1ydi) Thats it for now I will post updated verison of it later I will always try to work from a unedited source of EE2.7 that tut's are ez to follow. Moshu MSN: [email protected]
  13. If you can provide a link to one that would be nice the search engine on this forum doesn't provide results for me for some reason. Thx everyone for ur help, first forum post in years that for quick response.
  14. Yes sir I want to make a Iso game but need to move characters in diag. directions. If I knew where the code in the source for walking is done i could change it there I am getting vb6 to view source. thx again
  15. Hello everyone this is my first post and I am sorry if I am posting in wrong area or reinventing the wheel here. I need to make players in game move in up/right, up/left, down/right, down/left. Instead of up/down/left/right. Thanks ahead for your time.
×
×
  • Create New...