[ODE] Very Important: ODE and TIMESTEP. How to do it???

Jason Perkins starkos at gmail.com
Sun Aug 6 07:30:35 MST 2006


On 8/6/06, michael kapelko <kornerr at gmail.com> wrote:
> For instance, this one:
> http://www.mindcontrol.org/~hplus/graphics/game_loop.html

IMHO, that is about as clear an explanation as you are going to get;
Jon has all but written the code for you.

I would suggest that you just forget about extrapolation for now and
get a fixed timestep loop working. That looks something like this:

  ode_time = gettime()
  while (true) {
    render_the_scene();
    curr_time = gettime();
    while (ode_time < curr_time) {
      dWorldQuickStep(ode_timestep)
      ode_time += ode_timestep;
    }
  }

Get that working first and see how it looks; depending on your needs
it might be perfectly acceptable. If you start noticing temporal
aliasing or lag, then you can start looking for alternatives. Have you
done this already?

Jason


More information about the ODE mailing list