[ODE] ODE and determinism

Jon Watte hplus-ode at mindcontrol.org
Tue Jun 1 10:51:37 MST 2004


If you use sleeping bodies, and use a FIXED TIME STEP, then this method will work.

Or you can just make sure to store all information about all objects (which includes the pins); that'll work, too.

Cheers,

            / h+

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of John White
Sent: Monday, May 31, 2004 7:33 AM
To: ode at q12.org
Subject: [ODE] ODE and determinism


Hi, I'm writing a tenpin bowling simulation and have it running nicely with ODE. 
I want to introduce replays and I am debating the best way to go about it. In the past with other games I have ensured the logic is determinsistic and then just saved off the input. The replay is then done by resetting the game state to a known configuration and then grabing the input from the recorded buffer instead of polling the devices. This obviously relies heavily on resetting the system to the correct state. Is there any way to achieve this to ODE?
In a test I hardwired my power, spin and angle of the bowling ball. The ball is then trigerred by the mouse button. This however does not produce identical results between shots as I also have to take into account how long the pins and ball are standing there. Even If I took into account this wait period in the replay (which IMHO is a little hacky), I'm still concerned of non-determinism due to any 'latent' information stored within ODE.
I suppose the best way to achieve what I want is some sort of binary dump of ODE's state and the ability to reload it in at some later date. Either that or I manually get all states of all bodies registered with ODE and then reset them manually (though I am still concerened with any cached internal data).
Has anybody tried to create replays with ODE? 
Thanks 
John 




More information about the ODE mailing list