Vein Test

Miscellaneous Forums/Blitz Showcase/Vein Test

There isn't much to say about delta time.

Basicly you run the game at the users vsync rate. using one simple Flip true. You are measuring the time it took for one frame. this time is now a multiplyer for every kind of motion. It seems like a big lot of work, but it's not.

The best thing on it is Animated meshes: simply use delta_t as the Parameter for Updateworld, and all Animations are working relative to the current framerate. This is really great.

Example:
tt=millisecs()-17
while not keydown(1)
 ; player controls etc
 ; eg:
 if keydown(208) then moveentity player,0,0,1*delta_t#
 ;
 tt2#=millisecs()-tt
 tt=millisecs()
 delta_t#=tt2/16.667 ; the slower the machine, the higher the multiplyer delta_t
 ; you might limit delta_t here to reasonable values, sort 
 ; out spikes which can result from machine pauses
 Updateworld(delta_t#)
 renderworld()
 flip
wend