Yes, thanks for that. I've managed to understand and implement this technique, but I've now realised where the "jerking" is coming from.Originally Posted by Traveler
If I just move my player around like this it's very smooth indeed, the problem comes when I need to have my player *stop* exactly on each tile.
Say my tiles are 32x32 pixels. I want my player to move from say tile 1,1 to tile 5,1 (across -right). I use this frame rate independant movement to achieve, say 128 pixels per second.
As each frame of the game happens, he might move 2.6 pixels , then 2.7, then maybe 2.4 etc as he slides *smoothly* across. This is all very well and looks great.
However, I need the player to reach each tile *exactly*. So what I've been doing is effectively snapping him to each tile as he travels across. This "adjusting" effects the overall smooth moving, causing the jerky.
So I'm a little confused on how to fix this. It's difficult explaining what I mean, but hopefully you understood the gist of what I'm getting at.
I need the player to move *onto* each tile exactly as he travels.
My head hurts. :-)
Bookmarks