News for hackers. Stuff that matters.
Re:Networking of a turn-based game by Spivakov on Tuesday February 15, 2022 @05:00PM (#30353397)
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.

Re:Networking of a turn-based game by ermir on Tuesday February 15, 2022 @05:08PM (#30353499)
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.
Re:Networking of a turn-based game by hashamali on Tuesday February 15, 2022 @07:11PM (#30354756)
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.
Re:Networking of a turn-based game by horsawlarway on Tuesday February 15, 2022 @11:50PM (#30356484)
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).

Re:Networking of a turn-based game by Spivakov on Wednesday February 16, 2022 @11:33AM (#30362088)
That is surprising to me. I think 343 is pushing the game to esports.
Re:Networking of a turn-based game by horsawlarway on Wednesday February 16, 2022 @12:13PM (#30362593)
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."

Re:Networking of a turn-based game by sjrd on Wednesday February 16, 2022 @02:32AM (#30357280)
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"?
Re:Networking of a turn-based game by was_a_dev on Wednesday February 16, 2022 @05:31AM (#30358320)
That's a very expensive "free"
Re:Networking of a turn-based game by sjrd on Wednesday February 16, 2022 @05:53AM (#30358456)
Hum, yes, that's probably true for real-time physics.
Re:Networking of a turn-based game by meheleventyone on Tuesday February 15, 2022 @05:07PM (#30353491)
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.
Re:Networking of a turn-based game by Thaxll on Tuesday February 15, 2022 @05:18PM (#30353634)
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.

Re:Networking of a turn-based game by baggy_trough on Tuesday February 15, 2022 @05:03PM (#30353438)
Usually bugs, for example if the rng doesn't get handled in precisely the same way.