Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A common scenario where this approach fails: applying physics in realtime cross platform games. The floating point math involved is pretty much impossible to guarantee same results for. Deterministic physics engines do exist but they generally only guarantee determinism on the same OS/platform.


See: Halo Infinite.

They attempted to make their recent engine deterministic, and failed miserably - at least on PC: https://www.reddit.com/r/halo/comments/r78moa/halo_infinite_...

Attempted deterministic engine, no desync detection or reconciliation, and support for the whole PC ecosystem - I couldn't believe it when I realized what they were doing... pure madness (not in the good way).

I suspect it actually works fairly well for players on console, who aren't playing cross-platform (since they're working with basically the same hardware everywhere).


That is surprising to me. I think 343 is pushing the game to esports.


Yeah, I kept waiting to eventually hear that this was caused by some other random issue, and not them expecting deterministic behavior for floating point ops, but they actually confirmed it a few days ago in their blog: https://www.halowaypoint.com/news/closer-look-halo-infinite-...

The relevant section is:

"The first cause is rooted in the fact that the simulation needs to be deterministic. This means that when the client performs an action, the result of that action is the same when the server performs it."


Let's say you use JDK 17 (which re-specified float and double operations to be strict everywhere) and always use `java.lang.StrictMath` instead of `Math`, wouldn't you get determinism for all the floating point operations "for free"?


That's a very expensive "free"


Hum, yes, that's probably true for real-time physics.




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

Search: