Skip to content

Instantly share code, notes, and snippets.

@maniwani
Last active March 2, 2024 10:16
Show Gist options
  • Save maniwani/f92cc5d827b00163f5846ea7dcb90d44 to your computer and use it in GitHub Desktop.
Save maniwani/f92cc5d827b00163f5846ea7dcb90d44 to your computer and use it in GitHub Desktop.
Netcode Terminology

authoritative replication — a form of replication where game-instances send their inputs to an authority who is responsible for advancing the simulation and broadcasting its updates

authority — the source of truth for some or all of the simulation state (or the permission to be this); owner(ship)

client — an interactive game-instance that can connect to a server

client-authoritative — a variant of authoritative replication (with client-server topology) where clients have authority

(client) host — a 2-in-1 server and client (aka. listen server); an interactive game-instance that can accept connections from clients

client-server — a network where the devices (clients) in the network connect to a privileged, central device (server); (in colloquial use) a client-server network where the server is run by a device exclusively dedicated to the task (e.g. a computer in a datacenter)

(dedicated) server — a non-interactive game-instance that can accept connections from clients; (in colloquial use) when this is run by a device exclusively dedicated to the task (e.g. a computer in a datacenter)

delay-based netcode — a fighting-game community term for the combination of deterministic replication, lockstep, and input delay

delta compression — encoding data-to-be-sent relative to what the recipient already knows in order to reduce bandwidth consumption

desync — when two or more game-instances observe different simulation results from the same initial state and inputs

determinism — the guarantee that all instances of a simulation return identical results, given the same initial state and inputs

deterministic replication — a form of replication where game-instances share inputs and rely on determinism alone to keep their simulations in sync

eventual consistency — the guarantee that, if no new updates occur, game-instances will eventually have up-to-date information on everything they can currently observe

extrapolation — projecting values (e.g. an object's position) from earlier values; dead reckoning

fixed timestep — dividing time into a series of discrete steps with constant-length

host migration — the process of restoring a game in progress when its original server disconnects

ICE — Interactive Connectivity Establishment, IETF standard protocol for connecting devices behind NAT using STUN and TURN

input — any external data submitted to the simulation (e.g. key and button presses)

input delay — game-instances adding delay between collecting and simulating against their local player's input to give time to receive everyone else's inputs without stalling (with lockstep) or incurring as many resimulations (with prediction)

interest management — a variant of authoritative replication where a server can cherry-pick what it sends to each client

lag compensation — the (authoritative replication) practice of the server breaking causality to match client-observed interactions between predicted and non-predicted entities, typically for collision detection

lockstep — game-instances requiring all inputs needed to advance the simulation to have been received before doing so; abscence of prediction

MTU — maximum transmissible unit, the size (in bytes) of the largest packet a forwarding device (e.g. router) won't fragment

NAT — Network Address Translation, maps <private IPv4 address:port> to <public IPv4 address:port> to connect devices on a private network to the public internet

NAT hole punching — see STUN

network topology — how devices in a network are physically and logically connected

P2P — peer-to-peer, a network where all connected devices have equal privileges (i.e. no server); (in colloquial use) a client-server network where the server is run by one of the players' devices

ping — see RTT

prediction/reconciliation — game-instances speculatively advancing ahead of the verified simulation state and retroactively correcting errors by resimulating as newer verified information becomes available

relay — a server or network that only facilitates communication between clients

reliability — delivery and ordering guarantees for sending and receiving messages

remote entity — an entity that is controlled or owned by a different game-instance (aka. ghost, proxy)

replication — how game-instances share data to stay in sync

rollback — see prediction/reconciliation

rollback netcode — a fighting-game community term for the combination of deterministic replication, prediction, and (optionally) input delay

RPC — remote procedure call, an async function ran on another device

RTT — round-trip time, the amount of time it takes to send a packet and receive an acknowledgement of its delivery

server-authoritative — a variant of authoritative replication where only the server has authority

snapshot — a (partial or full) copy of the simulation state at a specific point in time

snapshot interpolation — a technique where clients render remote entities smoothly by buffering and interpolating snapshots

socket — an interface that can send and receive packets

STUN — Session Traversal Utilities for NAT, IETF standard for creating a direct connection between two devices behind NAT using a third device with a public IP address

tick — a specific iteration of a discrete simulation (aka. turn, step, timestep)

tick rate — how often a fixed timestep simulation updates per unit time, usually expressed in Hz (updates/second)

transport protocol — set of connection-oriented communication services like handshaking, reliability, and multiplexing

TURN — Traversal Using Relays around NAT, IETF standard for connecting devices through a relay as a fallback when STUN fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment