Reproducible results

Hi all,

I might be doing something stupid but I am going crazy fixing this bug, so I though I should double check. Are results generated from Box 2D reproducible to be exactly the same each time I run them provided its the same starting state each time and nothing in the environment changes ? I have a character simulation platform and I have a state save and loading mechanism. Each time I run my simulation from my loaded state I get slightly different result. It could very well be that my save and load mechanism is buggy ( which I doubt myself ), so I have another question. To save the state of a character comprised only of dynamic bodies and b2RevoluteJoints, if I just save and load the linear velocity, angular velocity, angle, position of each body, is that enough ? (other than my character simulator dependent parameters which I am saving and loading ofcourse at the same time).

Many thanks for your time reading this !

Cheers,
darkZ
Box2D is generates reproducible results from the point of body creation. However, you cannot save an intermediate state and reproduce the result. That is because Box2D caches some data to improve performance. Also Box2D is order dependent. So you must create all objects in the same order.
Makes sense, thanks for the quick reply !

Original thread: https://box2d.org/forum/viewtopic.php?t=8359