[ODE] Switching from Drawstuff to My own graphics engine

Robert Rose rose at cafwap.net
Sun Oct 19 13:01:25 MST 2003


On Sunday, October 19, 2003, at 07:04  AM, smythst wrote:

> I've been playing around with ODE, and using Drawstuff for quick 
> prototyping.
> However now the time has come to integrate my car physics into an 
> already
> written graphics engine. Problem is I'm not exactly sure how to handle 
> the sim
> loop myself. How should I call dWorldStep() - I mean how often, and 
> where in
> my ode code. I've read that you should have a seperate ticker for your 
> physics
> engine (from the graphics one) and that the physics ticker should be 
> faster.
> Is this true, and why?

I've never heard that before, but I suppose it might make sense 
depending upon your application.  Dynamics calculations are often times 
a lot more intensive than the rest of the items that occur in your 
render loop, so it might make sense to only run the dynamics every 3rd 
frame or so, I suppose, or even have a completely separate timer for 
the dynamics.  In games, you want a quick render loop and players 
probably wouldn't notice if you only ran the dynamics at 1/4-1/2 the 
frame rate, especially so if your game gets > 30fps.

First I would try just putting dWorldStep() and the collision detection 
right in your render loop.  Pass dWorldStep() the delta between frames.

-robert




More information about the ODE mailing list