World 13
Together
Multiplayer and netcode: what changes when the other player is a person, on a different machine, slightly in the past.
Two machines can never show the same moment, so every online game is a set of decisions about who waits, who guesses and who gets to be right. Most of what players call lag is one of those decisions, and each has a name. The other half of this world is what happens when strangers play together: who you are matched with, how they can talk to you, and what they can do to spoil your evening. Learn these and you can ask for rollback with eight frames of prediction, instead of asking for the online to feel better.
- NetcodeThe code and the rules that keep players on different machines in the same game, when no two of them can ever see the same moment.
- LatencyHow long data takes to travel between machines. Ping is the time there and back, in milliseconds, and part of it is simply the distance and the speed of light in glass.
- JitterHow much the delay changes from one packet to the next. Packets sent on a steady beat arrive unevenly, and some overtake each other on the way.
- Packet lossSome of what you send simply never arrives. Each game has to choose: ignore it, wait for it to be sent again, or send things in a way that makes it not matter.
- Tick rateHow many times a second the server works out what has happened. Anything that reaches it between ticks has to wait for the next one.
- Server authoritativeOne machine, the server, decides what really happened. Players' machines send only what was pressed and show what they are told.
- Peer to peerPlayers' machines talk straight to each other, with no server in the middle. Some designs have one player's machine act as host instead, so the others connect to it.
- LockstepEvery machine runs the entire game itself, and only orders cross the wire. Nobody moves on to the next turn until they have everyone's orders for it.
- DesyncMachines running the same game stop agreeing about it. In a game that sends only inputs, one tiny difference grows until the players are in two different matches.
- Delay-based netcodeHold your own inputs back for a few frames, so that the other machine's inputs for the same frame have time to arrive. If they still have not, freeze until they do.
- RollbackYour own inputs happen at once, and the game guesses that the other player is still doing what they were doing. When their real input arrives and differs, it reloads a saved state and quickly replays every frame since.
- Client-side predictionWith a server in charge, your own character moves the moment you press, on the assumption the server will agree. The server's answer comes a whole trip later.
- Server reconciliationWhen a server update arrives, take its word for that moment in the past, then re-apply every input it has not yet seen. If you predicted correctly, nothing on screen moves.
- Entity interpolationShow other players slightly in the past, by drawing a smooth line between two updates you already have. They move evenly, and they are always a little older than they look.
- Lag compensationWhen a shot reaches the server, it rewinds everyone to where they were on the shooter's screen when they fired, and judges the hit there.
- PvP and PvEWhether you are playing against other people, or against the game. They change more than the opponent: a script can be learned, and a person learns you back.
- Co-opPlayers on the same side, against the game. Good co-op makes them need each other, not just share a screen or a map.
- Split screenPlayers sit in one room, on one machine. Either they each get a slice of the television, or they share one view that has to keep all of them in it.
- Asymmetric multiplayerThe two sides play by different rules, with different abilities and different goals, such as one strong hunter against a team of weak survivors.
- EmotesGiving players a small, fixed way to communicate: a wave, a canned phrase, a mark on the map, a single note. You can say only what the designers let you say.
- Griefing and toxicityGriefing is using the game's own rules to spoil it for others, such as blocking a door or killing a teammate. Toxicity is abuse aimed at other people, usually in chat.
- SpectatingLetting people watch a match in progress, usually from a free camera with information that the players do not have. Most such feeds run on a delay.
- MatchmakingThe system that picks who plays whom, trading how long you wait against how fair the game will be, and how good the connection is.
- Elo and MMRA number estimating skill. Elo compares your rating with your opponent's to work out how likely you were to win, then moves both by how surprised it was. MMR is the same kind of number in a game.
- Ranked playA separate mode in which matches count, showing your standing as a named rank, such as Gold or Diamond. Those ranks are usually lines drawn across a rating, with a few extra rules.
- SmurfingA skilled player on a new account, so they get matched with beginners. The system is doing exactly what it should, and it takes many one-sided games to find out.
- Anti-cheatEverything done to find and stop cheaters: software that looks for cheats on your machine, statistics on the server, and other players reviewing suspicious matches.