[ODE] Dealing with momentary time spikes in terms of physicsupdates?

Megan Fox shalinor at gmail.com
Wed Feb 9 15:41:55 MST 2005


I should clarify - physics already run at a fixed rate.  The problem
is that there appear to be occasional lag spikes in processing period,
so you pile up 0.1 time delta instead of the usual 0.02 or whatever,
resulting in 10 or more timesteps all at once.

Repeatability aside (you're right, I really should stick my AI in a
similar stepsize-controlled system, right now it advances unfettered
which will be a horror in any sort of multiplay), I'm not entirely
sure how to handle this - even if I advance the world a fixed rate,
when that spike occurs, you'll still have a jump oddity of some sort
as it does 10 world updates instead of 1 that frame.


... thinking about it, I suppose the problem is more a question of why
the heck my entire application's processing is getting interrupted for
that long a period, which is well outside the realm of physics, so
apologies for the OT banter.

-Megan Fox

> Fixed step sizes are not a horrible hack, they are the only path
> to sanity. If you ever want to do network play, for example, you
> will find your life a lot simpler with a fixed step size. Recording
> and playback is another case where it's The Right Thing To Do.
> 
> In fact, in original Quake, there were some shelves that you could
> jump up to if you ran at a frame rate larger than X, where you
> wouldn't reach if your frame rate was too low; this was because of
> the varying behavior of first-order integrators with varying step
> sizes. Non-repeatable simulation == bad.
> 
> Cheers,
> 
>                / h+
> 
>


More information about the ODE mailing list