Server

From ZDoom Wiki
Jump to navigation Jump to search

In ZDoom, the server is the first instance of the program to run in multiplayer, the other players need to connect to it. However, the netcode uses a MiniWikipediaLogoIcon.pngpeer-to-peer model, not a MiniWikipediaLogoIcon.pngclient/server model; there is no differences other than the server being the one to set the rules. Each instance of the game transmits player commands to all others, everything else is computed by each peer. The advantage of this system is that it uses very little bandwidth; the drawback is that when one peer suffers from lag, all peers do as well. When starting a multiplayer game, the number of players must be provided with a command line parameter, after loading the IWAD and any mod used the game will wait until all players are connected before proceeding.

Some source ports use a client/server model. There, the server is the only one handling the simulation; the clients merely transmit player commands and wait to be told what happens. The main advantage of this system is that it allows connections in real-time instead of having to connect all peers together before the game can even start. Five client/server ports derived directly or indirectly from ZDoom exist: csDoom, Odamex, ScoreDoom, Zandronum and ZDaemon.