[ODE] simulation steps in a game

Martin C. Martin martin at metahuman.org
Tue Apr 9 12:03:01 2002


madmax@red-falcon.net wrote:
> 
> Shall I double the number
> of simulation steps if the framerate drops below a minimum, say, 50Hz, thus doing 2 simulation steps
> per rendered frame.

This can have a bad feedback effect if the framerate is low because the
physics is taking a long time.  Basically, if physics takes a long time
during one frame, you'll start doing two physics simulation steps per
frame.  Then, the framerate will stay small even when the physics speeds
up a little.  Not until physics is taking half the original time will
you go back to one physics update per frame.

This feedback effect is a common problem.  It also affects the "set
deltat to match the time of the last frame" solution, since larger
deltat usually means more to do, e.g. a higher chance that any two
object collide.

- Martin