3 ms·
Could someone explain to me why CRDTs are more utilized by game developers for managing shared state? Aren’t game servers just chat servers with extra constrai
by yazaddaruvala 5y ago
Could someone explain to me why CRDTs are more utilized by game developers for managing shared state?
Aren’t game servers just chat servers with extra constraints on the messages, e.g. physics, chess rules, etc?
- hypertele-Xii 5y ago> Aren’t game servers just chat servers with extra constraints on the messages, e.g. physics, chess rules, etc? In a chat, information is simple, unordered, and public (to all parties). Now imagine a turn-based strategy game where complex moves happen in random order and are known to all players regardless of unexplored territory. For real-time games this analogy really breaks down.
- bombcar 5y agoBecause you want more than just the messages and the handshakes - you want to maintain consistency and if possible even recover from desync and other network weirdness - without allowing cheating.
- yazaddaruvala 5y agoAren’t all of those exactly the features of a CRDT? Regarding cheating and bad network, you still need all the same client side stuff and to define the conflict resolution policies into the CRDT, but the rest of the needed features (e.g. consistency, rewind, replays, etc) are all part of CRDTs.
- vore 5y agoMost games don't require merging of divergent state like in a CRDT: there's one, single, linear history of events mediated by the server. CRDTs are overkill for this use case, and something like optimistic concurrency control by the server is usually much easier to reason about and implement.
- meheleventyone 5y agoBecause usually you can use a simpler scheme.