(This game is written in C++ with GDI+ It's a simple side-scroller.)
I am having a problem deciding on how I should handle player movement. Currently it runs at 20 frames per second (I just chose that number, it could no doubt run at higher fps.)
Now I have one function that moves the character 1 pixel. It checks collisions with anything around.
There is two ways I can do this (because moving 20px/ second is too slow.)
I can use a for loop and then I can move any amount of space per frame. One minor problem is that the player will be moving several pixels between screen updates, so the player moves 5px (or any amount) increments every second.
I can turn up the fps, and then, consistently move the character 1px per frame, and it would be smooth movement.
I am having trouble deciding which way of doing this is better and need a bit of input, ideas, advice, etc...
Thanks.