[SDL] Frame Rates
David Olofson
david at olofson.net
Thu Oct 28 03:53:49 PDT 2004
On Thursday 28 October 2004 12.46, Kostas Kostiadis wrote:
> also, are you actualy doing anything expensive in between
> storing the newtime as oldtime, and then updating the newtime?
> If not, oldtime and newtime will be pretty close...
If oldtime and newtime are "pretty close", you have a high frame
rate. :-)
The delta is between the last two "loops", and where you read the
current time and do the calculations doesn't matter as long as the
engine does one complete loop (executing the old=new and
SDL_GetTicks() statements) per frame at all times.
//David Olofson - Programmer, Composer, Open Source Advocate
.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
--- http://olofson.net --- http://www.reologica.se ---
More information about the SDL
mailing list