Game timing

BlitzMax Forums/MiniB3D Module/Game timing

siread(Posted 2007) [#1]
After being bamboozled by other threads on the subject of timing I was wondering what methods other are people using with MiniB3D?

I can't seem to get my head around fixed step and currently I'm using Noel Cower's deltatime code from the archives. I understand it well enough but I'm getting jitters on a decent spec PC. Also my game will be using replays that can be saved, so I would like them to run at the correct speed on any machine. What's the best method?


klepto2(Posted 2007) [#2]
If you're using my extended Version then there are already functions to get the current fps and the current deltatime.

Tglobal.GetFPS()
TGlobal.GetDelta()

For my next Version I have added a special PhysicUpdate Function which uses accumaltive timestep. There the update function is called multiple times with a fixed update rate to get the diesired update speed. But for everything else I prefer deltatiming.


Sveinung(Posted 2007) [#3]
@klepto2
If I use Tglobal.Delta()...it only return 0.000000000
What do I do wrong?

Edit:Ahhh UpdateWorld :D

Sveinung


siread(Posted 2007) [#4]
Ah, thanks Klepto. That works nicely, although I'll still need to work out replay timings. :/