Game Timing Part 2

Blitz3D Forums/Blitz3D Programming/Game Timing Part 2

Chroma(Posted 2007) [#1]
The castle demo uses fixed rate logic and tweening. This is the same thing that the Gaffer article uses I think. But I notice in the castle demo they aren't multiplying the movement by a dt which is a bit puzzling.

What I really need is for the game to run the same physics at 15 fps or 1000 fps.


Vorderman(Posted 2007) [#2]
If you look in the archives for the basic 3d framework code (using rendertweening) you'll find that it runs the logic at whatever rate you specify (default is 50fps I think) and the rendering occurs as fast as the machine can cope with.

I've tested it with 2 machines linked up, both running my stunt race game, and the slower machine can only manage to render at 30fps while the faster one manages to render at 60fps, but they both manage to remain in-sync and running the logic in the same manner.


Chroma(Posted 2007) [#3]
Awesome, thanks Vorderman...that's what I'll use then.

I did a few tests myself and found out that when the render fps drops below the logic fps, it does take the extra cycles to keep the logic at 50fps. I think it's the best 3d timing solution atm.

I can finally put this timing issue on the done list!