I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs the same everywhere, regardless of their operating system, processor, etc...
There is room for a lot of complexity, and simulations may run for a long time, so it's important that the physics engine is completely deterministic with regards to its floating point operations, otherwise a solution may appear to "solve" on one player's machine and "fail" on another.
How can I acieve this determinism in my game? I am willing to use a variety of frameworks and languages, including Javascript, C++, Java, Python, and C#.
I have been tempted by Box2D (C++) as well as its equivalents in other languages, as it seems to meet my needs, but it lacks floating point determinism, particularly with trigonometric functions.
The best option I've seen thus far has been Box2D's Java equivalent (JBox2D). It appears to make an attempt at floating point determinism by using StrictMath rather than Math for many operations, but it's unclear whether this engine will guarantee everything I need as I haven't built the game yet.
Is it possible to use or modify an existing engine to suit my needs? Or will I need to build an engine on my own?
EDIT: Skip the rest of this post if you don't care about why someone would need such precision. Individuals in comments and answers seem to believe I'm seeking after something I shouldn't, and as such, I'll further explain how the game is supposed to work.
The player is given a puzzle or level, which contains obstacles and a goal. Initially, a simulation is not running. They can then use pieces or tools provided to them to build a machine. Once they press start, the simulation begins and they can no longer edit their machine. If the machine solves the map, the player has beaten the level. Otherwise, they will have to press stop, alter their machine, and try again.
The reason everything needs to be deterministic is because I plan to produce code that will map every machine (a set of pieces and tools that attempts to solve a level) to an xml or json file by recording each piece's position, size, and rotation. It will then be possible for players to share solves (which are represented by these files) so that they can verify solves, learn from one another, hold competitions, collaborate, etc... Of course, most solves, particularly the simple or quick ones, won't be affected by a lack of determinism. But the slow or complex designs that solve really hard levels might, and those are the ones that will likely be the most interesting and worth sharing.