[ODE] Is a variable frame rate possible?

Nagymathe Denes denes at invictus.hu
Wed Dec 7 01:35:47 MST 2005


Hi,

I have tried both approaches (fixed and variable stepsize), and i say variable stepsize is ok even with ODE - if you don't need networking or can handle irregular frames in your network code. There are a few problems with both methods, and i agree with those who say fixed stepsize is better for networking, but not for a simple local game loop. 
Regarding ODE, there are a few issues about ERP and CFM with variable stepsize; hinge2 is very stepsize-dependent for example, but its sensibility can be seriously reduced by minimal internal changes to ODE.

> I think you should not measure the time it takes to
> execute ODE.
You must. Just think an average case, where 90% of the frame time can easily be spent rendering, but the remaining 10% is physics (althought ODE used to spend much less in my case); if you don't measure that 10%, you end up running your world 112% (10/9) fast forward mode.
To avoid the self-inducing slowdown with low render frame rates, a simple way is to limit your physical sim. time: for example i measure frame time from the start of my physics step to the start of the next one, and simulate max. 0.1sec in one frame (in five ODE steps), which means slow motion under 10FPS (this usually means 10-12FPS render-only framerate depending the complexity of your physics), but correct realtime above that.

Denes


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20051207/4f94c6df/attachment.htm


More information about the ODE mailing list