1
SFML projects / Thor C++ Library – An SFML extension
« on: July 06, 2011, 02:24:16 am »Quote from: "gsaurus"
I don't see why one would want to play an animation for one game frame and half.
In my game engine, at least, I calculate the time since the last frame and use that for physics calculations and any sort of time-based animation. I like this method because it allows players of the game to have as fast an FPS as their computer allows. It also opens the opportunity for those with slower PCs to play the game properly at 25 FPS if the need arises, since everything is based on the delta.
The game frame system that you're using is an alternative to this, in which all frames are equally spaced. It works as well, but is less flexible as it requires all gamers to be playing at the same FPS. While it doesn't really matter for most 2d games where the graphics and physics aren't likely to get very complex, I figure it allows room for complexity if I use the delta-based system.
So the DT stands for milliseconds per frame--in your engine you could pass it a constant value, but in mine it's not so simple.