IEEE 754 conformity (strict floating point calculations)

My goal is a shared Box2D world. I haven’t done any testing yet, but due to the nature of the game (lots of objects in a simulation + cellular network), I am concerned about bandwidth being the bottleneck for a smooth experience.
Thus I am leaning towards using the Determenistic Lockstep approach, and for that I need 100% reproducibility in floating point calculations across different architectures.

Perhaps I could fiddle around with C++ compilers, but that would still leave me with inconsistency on the JVM level, so my guess is that I should solve that first.

Is “strictfp” Java keyword respected? Is there a build-tool option for the Multi-OS Engine itself?
That would be great, if something about that would be covered in the documentation.

Feel free to correct me, if my approach is misguided.
Thanks for your attention.

Hi,

MOE is based on ART from Android. This means, that if your code works on Android, then it should work on iOS as well (if it does not use android specific APIs). The same is true for floating point precision. If you run into any floating point precision issues compared to Android, then please report them, so we can fix it.

Best Regards,
Gergely

1 Like