Multiplayer Game Networking
Multiplayer game networking keeps several players' copies of a game coordinated across an imperfect network. You choose who controls the shared state, what data travels, and how each client hides delay without pretending the network is reliable.
itSoftware engineering | OpenSkills.info
Recommended first:gameplay-programming
Intro
Multiplayer Game Networking
A local game has one clock and one copy of its state. A networked game has several machines, each seeing messages after different delays. Packets can arrive late, out of order, duplicated, or not at all.
Your job is not to make those machines share an instant, perfect reality. Your job is to define which machine decides each fact, move enough information to the others, and present corrections without breaking play.
Start with authority
Authority answers one question: which machine owns the accepted version of a piece of game state?
In a client-server design, the server commonly owns the simulation, game rules, and validation. Clients send player intent. The server advances the accepted state and sends updates back. This gives you one place to resolve conflicts and reject invalid actions.
A listen server runs server and client roles on one player's machine. It is cheaper to host, but the host has a latency and trust advantage. A dedicated server separates the server role from every player's client. That costs infrastructure but gives you a clearer trust boundary.
Peer-to-peer designs connect players more directly. They can suit deterministic games that exchange inputs, but peer discovery, network address translation, host migration, and cheating resistance become part of your design.
No topology removes trade-offs. Choose from the game's interaction model, player count, trust requirements, hosting budget, and tolerance for host failure.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.rfc-editor.org/rfc/rfc768.html
Supports
- UDP header and minimal datagram service
- Absence of delivery and duplicate protection guarantees
- Beginner transport model and quiz question 3
- Reference-link rationale for RFC 768
- https://www.rfc-editor.org/rfc/rfc8085.html
Supports
- UDP application responsibility for congestion control
- Latency and loss measurement guidance
- Message size, path maximum transmission unit, fragmentation, checksums, middlebox, and security guidance
- UDP guardrails in the intro, slides, cheatsheet, and video script
- Quiz questions 3 and 8
- Reference-link rationale for RFC 8085
- https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
Supports
- Authoritative client-server simulation
- Client input and server snapshot flow
- Tick, snapshot, interpolation, prediction, reconciliation, and lag-compensation concepts
- Quiz questions 1, 2, 5, 9, and 12
- Reference-link rationale for Valve Source Multiplayer Networking
- https://docs-multiplayer.unity3d.com/netcode/current/learn/clientside_interpolation/
Supports
- Client-side interpolation and differing server and client update timelines
- Quiz questions 2 and 11
- Reference-link rationale for Unity interpolation
- https://docs-multiplayer.unity3d.com/netcode/2.1.1/advanced-topics/client-anticipation/
Supports
- Client anticipation, authoritative rollback, stale-data handling, smoothing, and reanticipation
- Comparison between anticipation and full prediction plus replay
- Quiz question 5
- Reference-link rationale for Unity anticipation
- https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplayer.html
Supports
- UDP transport trade-offs
- Reliable, unreliable, and ordered transfer behavior
- Independent channels and avoidance of ordering interference
- Peer, remote procedure call, and ENet transport coverage
- Quiz questions 4, 6, and 10
- Reference-link rationale for Godot multiplayer
- https://dev.epicgames.com/documentation/en-us/unreal-engine/networking-overview-for-unreal-engine
Supports
- Client-server architecture, listen and dedicated server modes
- Replication, remote procedure calls, and limiting replicated traffic
- Authority and interest-management treatment
- Quiz questions 1 and 7
- Reference-link rationale for Unreal networking
- https://partner.steamgames.com/doc/features/multiplayer/networking
Supports
- Client-server and peer-to-peer routing choices
- Steam Networking Sockets and Datagram Relay ecosystem context
- https://learn.microsoft.com/en-us/gaming/gdk/docs/features/console/networking/game-mesh/qos-networking
Supports
- Latency measurement for peer-to-peer and client-server selection
- Bandwidth and queueing considerations
- Network simulation for end-to-end quality-of-service testing
- Quiz question 11
- Reference-link rationale for Microsoft quality-of-service measurement
- https://learn.microsoft.com/en-us/xbox/gdk/docs/features/console/networking/tools/netstress-networking
Supports
- Testing games with simulated bandwidth limits, packet loss, and latency
- Clean baseline and controlled network-impairment guidance
- https://www.wireshark.org/docs/man-pages/tshark
Supports
- TShark interface listing, live capture, saved capture reading, fields, and statistics
- Difference between capture filters and display filters
- Practice-reference packet-capture commands
- Reference-link rationale for TShark
- https://www.wireshark.org/docs/man-pages/wireshark-filter.html
Supports
- Wireshark and TShark display-filter syntax
- UDP port filtering in the practice reference
- https://www.man7.org/linux/man-pages/man8/netem.8.html
Supports
- Linux network emulation with delay, jitter, loss, duplication, corruption, reordering, and rate control
- Practice-reference network-impairment commands and rollback
- Reference-link rationale for netem
- https://github.com/sindresorhus/awesome
Supports
- Discovery of the curated Game Engine Development awesome list
- Awesome Links research decision
- https://github.com/stevinz/awesome-game-engine-dev
Supports
- Discovery of ENet, GameNetworkingSockets, netcode, and yojimbo as game-networking ecosystem projects
- Awesome Links curation
- http://enet.bespin.org/
Supports
- ENet reliable UDP, channels, sequencing, fragmentation, and API documentation
- Awesome-link rationale for ENet
- https://github.com/lsalzman/enet
Supports
- ENet project scope and maintained source
- Awesome-link rationale for ENet
- https://github.com/ValveSoftware/GameNetworkingSockets
Supports
- Reliable and unreliable messages over UDP
- Fragmentation, encryption, peer-to-peer connectivity, and diagnostics
- Quiz questions 4 and 6
- Awesome-link rationale for GameNetworkingSockets
- https://github.com/mas-bandwidth/netcode
Supports
- Secure client-server connection protocol over UDP
- Connect tokens, encryption, replay protection, slots, disconnects, and timeouts
- Head-of-line blocking context in quiz question 10
- Awesome-link rationale for netcode
- https://github.com/mas-bandwidth/yojimbo
Supports
- Client-server networking, channels, reliability, fragmentation, serialization, and network simulation
- Awesome-link rationale for yojimbo
