Game server

2022-12-28

Game server

A game server (also sometimes referred to as a host) is a server which is the authoritative source of events in a multiplayer video game. The server transmits enough data about its internal state to allow its connected clients to maintain their own accurate version of the game world for display to players. They also receive and process each player's input.

Dedicated servers simulate game worlds without supporting direct input or output, except that required for their administration. Players must connect to the server with separate client programs in order to see and interact with the game.

The foremost advantage of dedicated servers is their suitability for hosting in professional data centers, with all of the reliability and performance benefits that entails. Remote hosting also eliminates the low-latency advantage that would otherwise be held by any player who hosts and connects to a server from the same machine or local network.

Dedicated servers cost money to run, however. Cost are sometimes met by a game's developers (particularly on consoles) and sometimes by clan groups, but in either case, the public is reliant on third parties providing servers to connect to. For this reason, most games which use dedicated servers also provide listen server support.
Listen server

Listen servers run in the same process as a game client. They otherwise function like dedicated servers, but typically have the disadvantage of having to communicate with remote players over the residential internet connection of the hosting player. Residential connections rarely support the upload requirements of games with many players; the typical limit is 16. Performance is also reduced by the simple fact that the machine running the server is also generating an output image. Furthermore, listen servers grant anyone playing on them directly a large latency advantage over other players (“host with most”) and cease to exist when that player leaves the game.

However, listen servers have the advantage of being essentially free and not requiring any special infrastructure or forward planning to set up, which makes them common at LAN parties where latency and bandwidth issues are not a concern. They are also common in console games.
Host Migration

In a listen server arrangement, “host migration” is a useful feature. Without host migration, if the player that is currently hosting disconnects for any reason (quitting, crashing, lost network connection, etc), the current server stops functioning and gameplay ends. A host migration feature allows one of the other players to become designated as the new host, so that the game can continue.
Peer-to-Peer

In the client/server model outlined elsewhere in this article, clients receive processed data from the server and display it without much thought. In the alternative “peer-to-peer” model there is no server: each “peer” instead receives the raw input streams of each other player and determines the results itself.

Peer-to-peer is generally considered obsolete for action games, but it still common in the real-time strategy genre due to its suitability for games with large numbers of tokens and small numbers of players. Instead of constantly transmitting the positions of 1000 troops, the game can make a one-off transmission of the fact that 1000 troops are selected and that the player in command of them just issued a move order.