Retro RPG Movement (Grid)
I've been working on something involving grid-movement, I found an example where it in essence used 4 flags (up, down, left and right) and it uses a counter going to 32 (adding 1 every 22 milliseconds; so it moves 32 pixels at a time, and shows the movement so you can see the animations). The thing is, sometimes it would get off the 'grid'. I tried increasing the time to 1.5 seconds, and it never got off the 'grid'... so I think sometimes the thread "skips a beat".
If I'm right, using the timer for movement is not optimal, as I never want the player to get off the 'grid'. Is there a better way to do a grid-based movement of 4 directions, and still showing the animation from one tile to the other (so it's not moved the 32 pixels in the direction right away; that is easy :P)
Thanks in advance. I'd appreciate it if I could get a pointer without showing any of my code, as it's quite lengthy.