← Back
Home › Systems › Games

battle-royale

100-player server

Fortnite

SystemTechniques · 11Primitives · 33 battle-royale Work-stealing dequeconcurrency · medium: Per-worker deque: the owner pushes and pops at the bottom without contention, idle workers steal from the top; the core of Rayon, Tokio and Go.›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.›Network update prioritizationgame-networking · medium: Priority accumulators per entity and client to fill a fixed per-tick bandwidth budgetBehavior treesgraphics · medium: Tree of selector, sequence and decorator nodes ticked each frame for NPC decisionsBitstream 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.›Ray primitive intersectiongeometry · low: Ray-triangle (Moller-Trumbore, watertight), ray-AABB slab and ray-sphere testsBounding volume hierarchyphysics · low: Binary tree of nested bounding boxes; prunes overlap and ray queries to O(log n) for any size distribution, and supports cheap insert/remove for moving objects.›Influence mapsgame-ai · low: Grid of propagated values (threat, control, presence) with decay that agents read to choose positionsEpoch-based reclamationconcurrency · low: Threads announce a global epoch while touching shared lock-free data; garbage retired in epoch e is freed once the epoch reaches e + 2.›Memory orderingconcurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.›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.›+ 4 more techniques+ 17 more primitives

Similar systems

Share the most building blocks with this one.