[ODE] ODE - Constant speed in different qualities boxes

Michael Lacher michael.lacher at hlw.co.at
Wed Mar 17 22:47:31 MST 2004


Megan Fox wrote:

>>>If I was doing it properly, I would be running my entire game loop at a
>>>fixed rate (so I would update EVERYTHING in the loop, once per
>>
>>loop, then
>>
>>>render at the end), but I'm not :)
>>>
>>>I do run the collision system once per loop, but I don't communicate the
>>>position of the geoms to the "real" entities in my systems
>>
>>until the looping
>>
>>>has stopped.  I think I might adjust this in the "real" engine
>>
>>such that I
>>
>>>run the entire system at a fixed rate - it would make it easier
>>
>>to retrofit
>>
>>>the engine to allow replays.
>>>
>>
>>I tried this, both with clearing all the collision contacts after the
>>first small ODE update and without. In both cases the result was
>>terrible. My simulation jumped around and was in general much more
>>unstable than it was before :(
> 
> 
> Here is exactly how my update physics loop looks (apologies for that last
> email, apparently there exists a button combo for "send mail" that I
> accidentally pressed, meh):
> 

[snip]

> 
> This results in no instability at all, and lets me tune exactly how often I
> run physical steps - I typically have PHYSICS_STEPSIZE at 0.01.  After this
> is complete, I update the positions and orientations of the objects in my
> side of the code and continue with the logic/rendering systems.
> 
> Incidentally, I'm using the wrapper for Nebula 2, thus the class-based
> interface with ODE.
> 

Yes, doing a full collide/update for each ministep works fine, but alas 
the collision detection takes up so much time that I get a huge 
framerate drop with low stepsizes (0.01). Incresing the stepsizes to 
0.03 works better but is just too low to provide good physics. In the 
end I get best results with using variable timesteps which works fine 
for me anyway (me framerate is pretty stable throughout the game).



More information about the ODE mailing list