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

About deterministic propagation model: "It relies on the assumption that processing the actions of a player is deterministic."

I am curious in what scenario of online gaming does this assumption fail.

I remember that about a decade ago there was a mobile game called Chaos and Order (like dota/League of Legends but was played on apple device). In one game, I heavily outplayed my opponent. After winning the match we added friends and realized that we actually experienced two totally different games - he lost it in my game but won it on his side, and my in-game actions made nonsense in his one. We called it a "ghost".

It is just funny to see how crappy the outcome would be if the deterministic propagation fails. Also in context such as system theory where error inevitably happens, the design shall make sure the extent of failure will not go unbounded.



This is called a "desync" and is a bug in a particular implementation of multiplayer networking. In this model instead of the server sending the state to each player, it sends their inputs, and allows the local device to completely determine the state of the game. If there are any differences at all in how the game's calculations are made, the game will have different states in different devices. Even different models of the iPhone may have tiny differences in how they calculate the square root for example, and over time these minor differences cascade into totally different games.


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.


The very worst kind of determinism errors are butterfly effect like in that you don’t notice the desync until long after the cause has occurred. It’s pretty imperative if you’re building a deterministic system to add a layer of error checking right from the start so you can ensure each party ends up in the same state and identify desync very early. On the other hand you also want to identify where desync doesn’t matter (for example most FX) so you limit the scope of what has to be deterministic to keep things simple.


Imagine the same game being played on different platform ( different CPU... ) with different compiler etc ... it's possible that the physics does not behave exacly the same everywhere.

It used to be the case not so long ago.


Usually bugs, for example if the rng doesn't get handled in precisely the same way.




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

Search: