Someone posted a thread a few minutes ago about how to animate their game's sprites.
I took ten minutes to put together an image showing a neat technique for handling walk cycles:
Unfortunately, they deleted their own thread seconds before I could respond.
And for a .gif of this animation cycle in action:
In order to figure out how far the player will move each step, you need to know two things:
The width and height of tiles in your world. How many frames it takes to move from one tile to another.
In my case, each of my animation frames has a duration of 1 frame, and I have 8 of them. It takes 8 frames to move from one tile to another, and my tiles are 16x16.
16 pixels / 8 frames * 1 frame delay = 2 pixels per frame.
That's how I figured out that the pivot foot should move 2 pixels per frame in order for the animation to sync smoothly.
Jun 5 2014, 9:15 pm (Edited on Jun 5 2014, 9:25 pm)