Floating-Point Desyncs: Why ARM64 is Breaking Deterministic Engines
The open-source real-time strategy (RTS) game Beyond All Reason (BAR) recently announced a major publishing deal with Hooded Horse to bring the game to a full Steam release. However, the game’s lack of native macOS and ARM64 support has highlighted a fascinating, deep-seated systems engineering challenge: the extreme difficulty of maintaining bit-perfect floating-point determinism across different CPU architectures.
The Deterministic Lockstep Model
Like its predecessor, Supreme Commander, and other classic RTS games, BAR uses a deterministic lockstep networking model. Instead of transmitting the coordinates of thousands of units across the network, the engine only transmits player inputs (clicks, commands). Every client runs the exact same simulation locally, using those inputs.
For this model to work, the simulation must be 100% identical on every machine. Any mathematical discrepancy—even a single bit out of place in a floating-point calculation—will cause the simulation states to diverge, resulting in a catastrophic "desync" (out-of-sync error) that ruins the match:
"What makes the 'simulate inputs' approach work is that the engine takes utmost care to keep calculations identical on each client. This is not trivial because you still have to work with things that naturally differ on each client, such as mouse position or which units are selected... On top of that, there can be hardware differences that have to be worked around to get identical results..." — Recoil Engine Netcode Overview (recoilengine.org)
The x86 vs. ARM64 Floating-Point Wall
Historically, BAR's engine (the Recoil Engine, a fork of Spring RTS) achieved this bit-perfect floating-point consistency on x86 architectures by relying on streflop, an ancient, unmaintained library designed to force identical float operations across different x86 compilers and operating systems.
However, as ARM64 architectures dominate the consumer space (via Apple Silicon and Windows-on-ARM laptops), porting this engine has proven to be a monumental challenge. Because ARM64 handles floating-point operations differently than x86, reproducing the exact same bit-perfect float calculations without streflop yields frequent desyncs:
"The challenge with arm64 is that Recoil Engine does deterministic lockstep simulation using actual native floats for performance. Porting all of those operations (which were implemented using the mentioned library) to work on arm64 and produce the exact same bit-perfect results as on x86_64 has been challenging." — Comment by p2004a (Recoil Engine Developer)
While the developers have introduced experimental Linux ARM64 builds, achieving full cross-play compatibility between x86 and ARM64 remains an active systems bottleneck.
This issue illustrates how deeply modern high-performance software abstractions are still bound to the physical, architectural quirks of legacy silicon. While modern web browsers and standard SaaS applications can easily abstract away the underlying CPU, real-time deterministic engines are hitting a hard architectural wall as the industry transitions away from x86 dominance.