← Back
Home › Systems › Games

game-server

authoritative multiplayer game server

Valorant, Fortnite

SystemTechniques · 6Primitives · 30 game-server Authoritative servergame-networking · medium: One process owns the state and steps it at a fixed tick; clients send inputs and show returned snapshots, so a lying client only affects its own inputs.›Client-side predictiongame-networking · medium: The client applies its own inputs immediately, then on each server state rewinds to it and replays unacknowledged inputs (reconciliation).›Interest managementgame-networking · medium: Send each client only the entities relevant to it (spatial area of interest, visibility, team), ordered by priority accumulators to fit a per-packet byte budget.›Lag compensationgame-networking · medium: The server rewinds other players' hitboxes to the moment the shooter saw them, so hits land where the shooter aimed despite latency and interpolation delay.›Entity-component-system (ECS)graphics · medium: Store each attribute type in its own packed array keyed by an id, and run update functions over exactly the ids that have the attributes they need.›Client action validationsecurity · medium: Validate client actions server-side: movement bounds, rate checks, statistical anomaly scoringBitstream serializationgame-networking · low: A bit writer and reader over a byte buffer that stores each field in exactly the bits its range needs: booleans in 1 bit, bounded integers in ceil(log2(span+1)) bits.›Reliable UDPgame-networking · low: Transport over UDP: each packet carries a sequence number, an ack and a 32-bit ack history; only chosen messages are made reliable.›Snapshot delta compressiongame-networking · low: Encode each client's snapshot as the difference from the last snapshot that client acknowledged, so unchanged entities and fields cost zero to a few bits.›State quantizationgame-networking · low: Store floats as small fixed-point integers sized to the precision needed (bounded positions, smallest-three quaternions), cutting size 2-4x before any delta coding.›Fixed timestep loopgraphics · low: Fixed simulation dt with accumulator, render interpolation, spiral-of-death guardEntity interpolationgame-networking · low: Render remote entities a fixed delay in the past, blending the two buffered snapshots around that time: ~2 snapshot intervals of latency buy smooth motion.›Spatial hashingphysics · low: Uniform grid stored in a hash table: bucket objects by cell, test only neighbouring cells; O(n) neighbour search for many similar-sized objects such as particles.›io_uringnetworking · low: Linux async I/O through two shared-memory rings (submissions in, completions out), batching or eliminating syscalls for sockets and files alike.›AEAD (AES-GCM, ChaCha20-Poly1305)security · low: Authenticated encryption that encrypts and detects tampering in one call; the only kind of symmetric encryption you should use.›Hierarchical timing wheelsystems · low: Timers bucketed by expiry into wheels of slots, coarser wheels for far deadlines: O(1) insert and cancel for millions of timeouts.›Message sequence numbersdistributed · low: A per-stream counter on every message lets the receiver detect loss, duplicates and reordering, ack cheaply and resume after reconnect with "send from N".›d-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›Quadtree octreegeometry · low: Adaptive spatial subdivision trees for queries and level of detail; loose and linear variantsSPSC ring bufferdata-structures · low: Bounded wait-free queue for exactly one producer and one consumer thread, built from an array and two indices with acquire/release ordering.›Ray primitive intersectiongeometry · low: Ray-triangle (Moller-Trumbore, watertight), ray-AABB slab and ray-sphere testsSwiss tabledata-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.›+ 14 more primitives

Similar systems

Share the most building blocks with this one.