News for hackers. Stuff that matters.
Re:1500 Archers on a 28.8: Network Programming in Age of Emp... by simmonmt on Monday January 16, 2023 @09:08AM (#34400775)
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.
Re:1500 Archers on a 28.8: Network Programming in Age of Emp... by bsorbo on Monday January 16, 2023 @09:50AM (#34401191)
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...
Re:1500 Archers on a 28.8: Network Programming in Age of Emp... by magicalhippo on Monday January 16, 2023 @10:38AM (#34401660)
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

Re:1500 Archers on a 28.8: Network Programming in Age of Emp... by eloff on Monday January 16, 2023 @09:35PM (#34408510)
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.