[ODE] simulation steps in a game
madmax@red-falcon.net
madmax at red-falcon.net
Thu Apr 11 10:13:02 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
>
I'll try that. If I encounter problems, I think I'll try fixed time steps for physics while
rendering as fast as possible. I think I'll have to do some interpolation between
rendered frames in order to match the physics steps...
Thank you all for your help!