Hacker News new | past | comments | ask | show | jobs | submit login

Don't use floats (it wasn't a 3D game) or if you have to, make sure every float is derived from an integer that's kept in sync. And don't do anything that affects simulation state based on those floats.



Age of Empires 2: Definitive Edition consistently de-syncs when playing across a M1 Mac (using Windows 11 Arm or Crossover) and an x86 machine, and I suspect the difference in floating point behavior described here is the culprit: https://developer.apple.com/documentation/apple-silicon/addr...


Doesn't sound unlikely.

LHC@Home had big issues[1] with AMD and Intel machines giving very different results to the same work unit. They traced it down to the exp() function behaving different, and ended up using a library[2] for anything more fancy than basic arithmetic.

[1] https://lhcathome.web.cern.ch/sites/default/files/OPENshort....

[2]: https://github.com/SixTrack/crlibm


Another reason for me to stay clear of the M1 for now. It’s really fascinating, but it’s not quite there yet. I’ll let others work the rough edges away before I give it a try.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: