PDA

View Full Version : Framerate independant processing



doggo18
29-05-2003, 03:54 PM
What is the best way when I use the OnProcess eventhandler to move my stuff around without it becoming dependant on the framerate? Right now I am checking using GetTickCount and storing it in a variable... but I am not sure if it is the best way (especially while using powerdraw)?

Thanks :)

LP
30-05-2003, 02:13 AM
OnProcess event occurs at the speed specified in FPS property (i.e. 60 times per second). Internally it uses method similar to TickCount, but more precise. However, if OnRender event is used and rendering speed "jumps" dramatically (i.e. from 120 FPS to 15 FPS and vise-versa), the movement on OnProcess event could not be that smooth but still it doesn't look that bad. In other words, you can say that technically OnProcess is not dependent on rendering frame rate (it's dependant on the frame rate you specify). If you want, you can use OnAppIdle event, if you want to use a custom method of rendering / processing.

doggo18
30-05-2003, 10:00 AM
Ah thanks... exactly what I wanted to hear! :D

/me goes to remove his GetTickCount code...