[ODE] want to make sure..

Aras Pranckevicius nearaz at interamotion.com
Thu Jul 3 01:04:02 2003


> Does the dWorldStep() function expects to receive time, in seconds, that
> elapsed from last update ?

Technically, no :)

It takes the time interval measured in your time-measurement-units and
advances the simulation by that amount. That's all it does and that's all it
does care for.

Now, usually you'll use seconds for your time. And usually you'll want to
synchronize the physics simulation to some "real" time - that could be
computer's clock for a realtime simulation, some external process etc.

For a game, you'll usually use one of the following:
1. variable time steps. In each of "main loop" cycle, you'll update the
physics simulation once, by the amount of time passed from the last update.
2. fixed time steps. Say, you'll always update physics sim 100 times per
second (and use the rest of the time for rendering etc.). This probably will
be more stable (and more suitable for network synch etc.), but can be a real
problem for slower computers (either there's very little time left for other
processes, or even no time left, which would cause a halt).
3. fixed time steps, adjusted at runtime. Eg. this could be used to cope
with instabilities. I doubt if this is used in any real game, but in other
sims it is (eg. cloth simulations, see Baraff's course on physicically based
modelling).


> I'm using ODE for my 3D space game. If you want to see what I got so far,
> you can download it:

Cool! Downloading it :)


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/