I'm trying to get 30FPS even

Blitz3D Forums/Blitz3D Programming/I'm trying to get 30FPS even

I've tried the following:
Global timer = CreateTimer(30)
While user_input <> CTRL_W
   ticks = WaitTimer(timer)
   ...
   UpdateScene()
   UpdateWorld
   ...
Wend

With using a timer, I narrowed down the problem a bit. While I previously had a time difference of 10 seconds between video/music and the timer + screen refresh after 4 minutes of playing, now I have 2.5 seconds using this code. It is still quite unacceptable, but better.

I'm trying to find Mark's Castle example code... Cheers.

Maybe if I could use the remainder of the previous frame timer and make sure I don't loose anything, I could create a very precise timer...