Timing

BlitzMax Forums/BlitzMax Beginners Area/Timing

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

What is the best way to do timing in BlitzMax so my game will run at the same speed on all PC's?

In Blitz3D i used a replacement function instead of using flip. The function is

Const framerate=60

Function do_flip()

framecounter=framecounter+1

Flip

While Abs (MilliSecs()-timer) < (1000/FRAMERATE)

Wend

timer=MilliSecs()

End Function

I have tried this in BlitzMax and it does work but is there a better/easier way to do this?

Thanks