Real-time Multiplayer Game

Design an authoritative server for a real-time multiplayer game.

00

Practice checkpoints

The requirements are open as a taste. From the numbers onward, the full guide opens in the app.

  1. 01
    Clarify scope
  2. 02
    Requirements + scale
  3. 03
    API + data modelUnlocks in the app
  4. 04
    Draw architectureUnlocks in the app
  5. 05
    Deep diveUnlocks in the app
  6. 06
    Trade-off decisionUnlocks in the app
01

Requirements that shape the design

Do not only state requirements. Ask for them. Each card pairs the design constraint with a clarification question you can say out loud before drawing the architecture.

Functional requirements

01When a player presses fire, who decides what actually happened?

The server: it runs the only trusted simulation and every client action is a request, not a fact — the client shows its own prediction instantly, but the server’s verdict is the one that stands.

02How do players get into a match — random, skill, ping?

Matchmaking pairs by skill AND latency: players queue in region pools keyed by measured ping, and the skill band widens the longer they wait so nobody queues forever.

03What does the server send back, and how often?

A world snapshot per network tick — delta-compressed against the last state the client acknowledged, and filtered down to the entities that player can actually see or affect.

04A client reports ‘I hit him’ — do we believe it?

Never: clients send only inputs (movement, aim, fire); the server re-simulates them and decides hits itself, using its rewind history to judge the shot at the moment the shooter actually saw.

05A player’s Wi-Fi drops mid-match — is their game over?

No: the session survives a grace window (say 60 s); on reconnect the server sends one full state snapshot plus a session token, and the client rejoins the live timeline instead of restarting.

06Where do the results go when the match ends?

The server writes the authoritative outcome (winner, stats, inventory changes) asynchronously at match end — the live tick loop never blocks on a database.

Out of scopeGlobal leaderboards and Top-K ranking (a sibling question — this one is the live match itself) · Game asset delivery: build patching and CDN distribution · Voice chat, parties, and social features

Non-functional requirements

01How fast must my own action appear on my own screen?

A player’s own action shows in 0 ms perceived time via client-side prediction — the server round trip (target under ~50 ms in-region) only confirms or corrects, it never gates local feedback.

02What tick rate, and what does it actually cost?

Fixed-timestep simulation at 60-128 Hz for competitive play: 128 Hz means a hard 7.8 ms CPU budget per tick per match, and every server system must fit inside it.

03What is the bandwidth budget per player?

Downstream bandwidth stays bounded around 150-256 kbps per player no matter how busy the world gets — delta compression and interest management exist precisely to hold this line.

04How much of the client do we trust?

Zero trust in the client for game state: every position, hit, and pickup is server-validated with rate and plausibility checks, so packet-level cheats (speedhack, teleport, infinite fire) are structurally impossible.

05The match server crashes at round 20 — what is acceptable?

A game-server crash costs seconds of pause or a cleanly voided match — never half-written stats, because results are only persisted from the authoritative end-of-match state.

Keep asking — the interview is a conversation

Real interviews probe far more than a tidy list. These are the scope questions that separate candidates who interrogate the problem from those who recite it.

  • Is this a competitive shooter that needs 128 Hz and strict fairness, or a casual game where 20-30 Hz and looser rules are fine?
  • How many players per match — 10, or battle-royale 100 where relevance filtering becomes the core problem?
  • When lag compensation must pick a side, do we favor the shooter or the player who just reached cover?
  • How profitable is cheating here — a hobby project, or a ranked economy where aimbots are a business?
  • Must a ranked match survive its server dying, or is voiding the match acceptable at these stakes?
01

Unlock the full playbook for Real-time Multiplayer Game

Numbers, architecture diagram, API and data model, deep dives, expected topics, self-check, whiteboard starter, and common mistakes unlock inside the app.

02

Numbers that force architecture decisions

Locked in the app

03

Architecture path

Locked in the app

04

API and data model

Locked in the app

05

Deep dive directions

Locked in the app

+Series

Practice the related series