Game dev
Saved & recent

Client-server

Related terms: peer-to-peer, P2P, dedicated server, host, authority

In a client-server game, one machine runs the real simulation and has authority: its version of events is the truth. Clients send their inputs and receive the results. Cheating is harder, because a client cannot simply claim it hit someone.

In peer-to-peer, the players' machines talk directly to each other with no central referee. It needs no servers, but it is harder to keep in sync and to secure.

Further reading
Glenn Fiedler: Client Server Connection
authoritative server client–server peer-to-peer inputs state
Blue arrows carry inputs to the authoritative server and violet arrows carry state back to the clients. In the peer-to-peer arrangement, all three machines exchange data directly.

View in the full Game dev collection