Game dev
Saved & recent

Replication

Related terms: RPC, remote procedure call, state sync, ownership

Keeping copies of game objects in sync across machines. The server marks which objects and values replicate. When a value changes, it is sent to the clients, which update their copies.

An RPC is the other tool: one machine asks another to run a function. The client tells the server "I fired". The server tells every client "play the explosion". Use state for things that last, RPCs for one-off events.

Further reading
Unreal Engine: Networking Overview and Replication
60 / 100 fire request 60 60 60 / 100 60 / 100 authoritative health client A client B
One client sends the fire request. After the server applies the result, it sends the updated health value of 60 to both clients.

View in the full Game dev collection