smooth timing

Blitz3D Forums/Blitz3D Programming/smooth timing

Rob(Posted 2004) [#1]
what various methods of game timing do you have which compensate for fast and slow, yet do not utilize blitz tweening?


Mo(Posted 2004) [#2]
I usually do it like this:
mintime=20 ;the minimum time for one loop. optional
oldtime=millisecs()
While not keyhit(1)
While millisecs()-oldtime<mintime
wend
msDelta=millisecs()-oldtime
oldtime=millisecs()

;do everything
;example of how i move objects with this:
MoveEntity entity,0,0,0.1*msdelta

wend

This worked fine for me always..


jfk EO-11110(Posted 2004) [#3]
t=millisecs()-17
while not moronic
 t2=t
 t=millisecs()
 d#=float(t-t2)/16.67
 moveentity player,0,0,1.0*d
 UpdateWorld(d)
wend



Ice9(Posted 2004) [#4]
Delta with average of stored delta history to smooth
the pops.