4 ms·
Depends on the architecture. If the game has dedicated servers, then they will built 2 separate pieces: 1. The game they ship to the client and 2. The server so
by hacker_9 11y ago
Depends on the architecture. If the game has dedicated servers, then they will built 2 separate pieces: 1. The game they ship to the client and 2. The server software which receives messages from the client and propagates world changes to all clients in the same game session.
If the game is PvP (like most xbox games), the there is only the single game, and a 'host' is chosen to act like the server above. This can lead to problems though like host advantage [1], so the networking logic has to be carefully designed in order to mitigate this effect.
[1] http://gamedev.stackexchange.com/questions/73302/is-host-advantage-real http://gamedev.stackexchange.com/questions/73302/is-host-adv...
- clevernickname 11y agoPretty sure you meant P2P, not PvP. You can further split the first option into two approaches. You can have a glorified dumb client, in which case most of the logic is in the server. This works well for turn based games. For action games, however, there is a lot of undesirable latency in this design, so these games replicate most of the logic in the client so that the client can predict how the game state will advance in time. This makes it appear to the player that there is no latency. There is still one authoritative server, however, be it a dedicated server or a "host" player. As you can imagine, programming a system that can handle prediction errors and juggle multiple out-of-sync clients is challenging.