[ODE] Record and Playback

Jon Watte hplus-ode at mindcontrol.org
Tue Jan 27 14:51:22 MST 2004


What is a "machine independent frame rate" ?

Of course the graphics frame rate will be different between different machines. They have different CPU, different memory, and different graphics cards.

The way to get them all to run physics at the same speed is to prioritize physics. Run whatever number of physics time steps you need, in sequence, until you catch up to "current time"; then render a frame of graphics.

If you can step+render faster than real time, you can waste the CPU doing nothing, or make "render" actually take two points and do inter/extrapolation to get smoother rendered movement.

Cheers,

            / h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Tyler Streeter
Sent: Tuesday, January 27, 2004 10:40 AM
To: ode at q12.org
Subject: Re: [ODE] Record and Playback




"We are using fixed time steps and fixed frame rate with works very
consistently across different machines as you would expect."
This brings up an issue I've been wondering about.  I would think that using fixed time steps and getting a machine-independent framerate would be mutually exclusive.  Whenever I need a framerate that's consistent across different machines, I use a variable timestep (the time delta since the last frame).  The downside of this is that I can't get consistent behavior on different machines since different speeds of computers will probably have different time deltas.  Additionally, I don't get consistent behavior in multiple runs on the same machine since the time deltas are a little different (due to background processes or whatever).
There must be something obvious I'm missing.  Can anyone tell me how to get a system that gives machine-independent framerates and consistent behavior (using fixed time steps, I'm assuming)?
Tyler Streeter


Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!




More information about the ODE mailing list