[ODE] Stability problems

Michal Bacik michal at lonelycatgames.com
Thu Feb 20 12:42:01 2003


> >If you use variable framerate... if a great big explotion makes your game
> >slow down from 75fps to 37½ you will have a problem and all
> physics will run
> >in slowmotion - but then you could do more steps....
>
> That's not quite what I meant... I think...
>
> What I'm saying is, when the program first starts, detect the CPU speed,
> and then lock-in the physics time-step that you calculate based on CPU
> speed.
>
> What I'm asking is, will this work, or are there parameters that have to
> be tuned according to the time-step?

I think it has nothing to do with CPU speed. On any CPU you'll run it, you
have to pass appropriate time step so that physics is stable. If your FPS is
slower, you'd need to call physic steps multiple times between rendering or
doing other stuff. You shall scale the step value properly so that the sum
of step values is constant in given time (e.g. passing in 5.0 step values
per second in all your calls to dWorldStep).
- mb