Just don't handle the framerate at all...
You will never get an exact framerate (which says how much frames will be displayed in one second!) between 2 frames, cause you don't have a full second.
Just handle the time.
If, for example, a speed of +3 means, that your character moves, lets say 30 pixels (this of course can be exchanged with any vectorlength or whatever), then you know how much you have to move in 1/10 second, do you?
Got the idea?
Just set the speed to the amount of units (pixels or whatever) you want to move your char within a second.
Then you can calculate the time between the last and the current frame and multiply the speed with the result.
Example:
Char should run 50 pixels/second (Speed = 50)
Time between last and current frame = 0.043 sec
Move char 50*0.043 (=2.15) pixels this frame
You can handle your animations the same way!
Just exchange Speed with the animationframecount/second then.
Hope this helps...
Bookmarks