Timing

BlitzMax Forums/BlitzMax Beginners Area/Timing

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

1. Precalculate the 1000/framerate and use a local variable instead. Saves quite some calculation time :-)

2. There is the way of FPS Modifier which means that you modify all movement,speed etc values with a factor that depends on your actual fps (normally 1.0/fps)
If you do so, you can modify your above code that only flip depends on the time passed since so you can replace the while wend with a if then endif. This way your calculation power runs at its max while the fps is still on the wished point.

I sometimes even used it to fill the rest of the frame with a delay which is needed in B3D to prevent "full cpu usage"