top | item 30354756

(no title)

hashamali | 4 years ago

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.

discuss

order

horsawlarway|4 years ago

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).

Spivakov|4 years ago

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

sjrd|4 years ago

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"?

was_a_dev|4 years ago

That's a very expensive "free"