Is Box2D Deterministic?

I was wondering if the Java port of Box2D (or just Box2D in general) is deterministic, meaning that if I start the exact same simulation on two separate computers and have them run the exact same number of steps, will the result be identical for any number of steps?

From what I've read it is, but I just wanted to make sure and see if anyone had any experience running such a system involving simultaneous identical simulations or could offer insight into potential issues.


For those who are interested I'm working on a multi-user simulation environment, and I figured it would be easier on the network to have each computer run their own simulation and just get updated from a server, instead of running the simulation on the server, then sending the entire state of the world to every client.

Thanks!
I think the best way to check it is TestBed. And as far as saw it is.
WIth java, usually. At least the floating point calculations tend to be more deterministic than box2d.

If you want strict determinism, checkout the 2.1.2.2 branch and add the
Code:
strictfp
keyword to each class. Then it will be completely deterministic.
Thanks for the tip with strictfp. However would the Box2d classes also need to implement it as well? For my own game logic I can see how this would work, but when I tell the Box2d world class to take a step, would this still guarantee identical results? Or is it because the Box2d world is an instance of an object within a class that uses strictfp, it must also follow the rules?

Sorry if this seems obvious, but I checked the wiki page about it and it said that all calculations within said class are affected, but not weather calculations within other classes instantiated by this class are.

And sorry for the late reply, I got sidetracked away from this project for a bit 😀

Thanks again!
by each class I meant every single jbox2d class haha. You'll have to grab a svn copy, use the 2.1.2.1 branch

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