# Networked rigid-body physics and browser transports: state-of-the-art survey Compiled 2026-10-27, research only. Every claim has a URL. Tags used below: - **(secondary)**: a write-up or summary by someone other than the author, or a forum post. - **[unverified]**: I could not read the primary text (GDC Vault was in maintenance, and the Valve wiki returned 403 to the fetcher), so the claim rests on search snippets or a secondary source. Our baseline, for reference: 45 B `EntityPos` (no timestamp, no velocity), 30/10/1 Hz distance bands, byte-exact dedupe, a budget of 48 msgs / 12 KiB per tick, a single WebSocket, applied on arrival with no buffer. --- ## 1. Glenn Fiedler / Gaffer On Games: networked physics All of these are primary sources. The blog has since moved to mas-bandwidth.com, but the gafferongames.com URLs still resolve. **"Introduction to Networked Physics"** (Fiedler, 2014-11-28): https://gafferongames.com/post/introduction_to_networked_physics/ - This is the series overview. It names three approaches: deterministic lockstep, snapshot interpolation, and state synchronization. The page itself has no numbers. **"Deterministic Lockstep"** (Fiedler, 2014): https://gafferongames.com/post/deterministic_lockstep/ - Only inputs are sent, so bandwidth does not depend on object count ("1M objects cost the same as 1"). - It needs bit-exact determinism. His ODE demo diverged until the solver RNG was seeded per frame. He warns that determinism across compiler, OS, CPU and debug/release builds is hard. - The playout delay buffer is about 100 ms. - **TCP penalty:** one lost packet costs at least about 2×RTT, and lockstep stalls for it. At 100 ms RTT and 1% loss he saw "hitches every few seconds", and at 250 ms / 5% it was much worse. - Over UDP he sends every unacked input redundantly in each packet, usually 2–15 frames, worst case 120 inputs = 90 B raw or about 15 B delta-coded. This stayed playable at 2 s latency with 25% loss. **"Snapshot Interpolation"** (Fiedler, 2014): https://gafferongames.com/post/snapshot_interpolation/ - Naive state is 225 bits/cube, so 900 cubes is about 25 KB per snapshot. At 60 pps that is about 11.6 Mbit/s; at 10 pps about 2 Mbit/s. - **Interpolation buffer rule:** survive 2 consecutive lost packets, i.e. delay ≈ 3× the send interval, plus jitter headroom. - 10 pps → 350 ms - 30 pps → about 150 ms - 60 pps → about 85 ms - At low send rates, linear interpolation shows jitter and "pulsing". Hermite position interpolation (which needs linear velocity) fixes it. Slerp is enough for rotation, and angular velocity is not needed. - **Extrapolating rigid bodies is bad:** 200 ms of extrapolation ignores collisions, so bodies go through the floor and snap back. "Avoid extrapolation for rigid bodies." - Snapshots must use UDP, not TCP. **"Snapshot Compression"** (Fiedler, 2015): https://gafferongames.com/post/snapshot_compression/ - Starting point: 901 cubes at 60 Hz, 321 bits/cube uncompressed, 17.37 Mbit/s. Target: 256 kbit/s. - **Smallest-three quaternion:** 2-bit index + 3×9 bits = 29 bits, down from 128. Each component lies in ±1/√2. This alone saved more than 5 Mbit/s. - **Bounded position:** x,y in [-256,255] m and z in [0,32] m at 512 steps/m (about 2 mm) cost 18+18+14 = 50 bits. With that, cube state is 80 bits (10 B). - **Velocity:** 32 m/s bounds at 32 steps per m/s = 11 bits/axis. He dropped velocity entirely because linear interpolation at 60 Hz was good enough. - **Delta against the last acked snapshot** (a baseline about one RTT old): an unchanged cube costs 1 bit, so 901 bits/packet ≈ 54 kbit/s at 60 Hz just for "nothing changed" flags. - **Changed-cube encoding:** - Indices: 10-bit absolute when ≤90 changed. Relative indices average 5.5 bits (4/7/12-bit tiers). - Delta position: average 26.1 bits (5- or 9-bit per axis). - Delta smallest-three: average 23.3 bits. - The steady state with nothing moving is about 15 kbit/s, mostly UDP/IP headers. Arithmetic coding (Giesen) beat bit-packing by a further 25%. The article gives no single final kbps figure; it says the 256 kbit/s goal was met. **"State Synchronization"** (Fiedler, 2015): https://gafferongames.com/post/state_synchronization/ - Sends position, orientation, linear and angular velocity, plus an at-rest flag (velocities omitted when at rest). Both sides simulate and extrapolate from the received state. - Packet: up to 64 state updates plus 32 redundant inputs. - **Priority accumulator:** - Each frame, add each object's priority to its accumulator, sort, and send the top objects that fit the byte budget. - Reset the accumulator of sent objects to 0. Unsent objects keep accumulating. - Example priorities: player 1e6, interacting cubes 100, resting cubes 1. - Budget example: 256 kbit/s, adjustable at runtime for congestion. - **Jitter buffer:** 4–5 frames at 60 Hz (about 67–83 ms), released in sequence order. - **Quantise on both sides every step** (as if transmitted). This needed more precision: 4096 steps/m and 15-bit smallest-three components. - **Visual smoothing:** the physics state snaps, but a separate render-only error offset hides it. - Position error decays by ×0.95 per frame for errors ≤25 cm, down to ×0.85 for errors ≥1 m. - Rotation error slerps toward identity at 0.1 per frame. - **Per-object delta:** each object is coded against its own acked base. The base is a 5-bit offset from the latest acked packet, about 0.5 s window at 60 pps; outside that window it falls back to absolute. - Objects that just came to rest get a priority boost until their rest state is acked. - Delta compression gives about one more order of magnitude beyond quantisation. **"Networked Physics in Virtual Reality"** (Fiedler, 2018-02-22, Oculus-sponsored): https://gafferongames.com/post/networked_physics_in_virtual_reality/ - **Authority scheme:** - Cubes start with default (host) authority. Touching a cube gives the toucher authority, and thrown cubes recursively take authority over the cubes they hit. - **Ownership** (grab) outranks authority. Each cube carries an authority sequence and an ownership sequence. - The host is the arbiter and accepts or corrects guest updates. - A guest keeps authority until the host has confirmed the final at-rest state. - Physics at 90 Hz, state sent up to 60/s, designed for up to 250 ms latency. Under 256 kbit/s per player, 4 players in 1 Mbit/s. - Position quantised to about 0.01 mm within bounds, rotation as smallest-three. Both sides quantise every step to keep remote stacks stable. - A ballistic predictor (fixed-point, gravity only) gives a "perfect prediction" bit for about 90% of cubes. - 100 ms jitter buffer for avatars. - Pop and jitter control: - `maxDepenetrationVelocity` about 1 m/s. - Own at-rest detection: no significant motion for 16 frames. - Priority boost for thrown cubes and high-energy collisions. - He states it suits co-op only, because the scheme has no server-authority security. **GDC 2015 "Physics for Game Programmers: Networking for Physics Programmers"** (Fiedler, then at Respawn) - A GDC Vault listing exists: https://www.gdcvault.com/play/1022195. The slug is mismatched ("Designing-for-Esports-in-FIFA") and the Vault was in maintenance, so the content is **[unverified]**. - The talk is understood to cover the same three-technique material as the blog series above. **Implications for us** - Fiedler's 900-cube demos are the closest public analogue to our chaotic voxel piles. His numbers say that per-body costs of about 10 B absolute, and about 3–6 B delta-coded against an acked baseline, are achievable versus our 45 B. - A priority accumulator under a byte budget is a strict generalisation of our fixed 30/10/1 Hz bands plus the 48-message cap. It never starves a body, and it lets "just collided" or "held" bodies jump the queue. - For a server-authoritative pile with no client sim, the matching technique is **snapshot interpolation**: buffer delay ≈ 3× send interval, so about 100 ms at 30 Hz. Interpolate with Hermite (send velocity) or at a high rate, and with timestamps/ticks. Do not apply on arrival and do not extrapolate bodies. - **State sync** (client also simulates) only pays off if the client runs physics. If it does, quantise both sides and put the smoothing in a render-only error offset. - The VR authority scheme is the published recipe for zero-lag grab and drag: the grabber owns the body and the server arbitrates. It trades cheat-resistance for responsiveness. --- ## 2. Valve Source engine **"Source Multiplayer Networking"** (Valve Developer Community wiki): https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking - Direct fetch returned 403. Facts below come from search snippets of the page **[unverified wording]**. - Default `cl_interp` = 0.1 s, i.e. 100 ms = 2 × (1 / `cl_updaterate` default 20). This lets one snapshot drop and still leave two to interpolate between. - `cl_interp_ratio` sets the lower bound on interpolation in units of the update interval. The TF2 Network Graph page gives the clamp formula with a 0.25 s upper bound: https://developer.valvesoftware.com/wiki/TF2_Network_Graph - When more than one snapshot in a row is missing, the client linearly extrapolates (`cl_extrapolate 1`), but only for 0.25 s (`cl_extrapolate_amount`), "since prediction errors would become too large". Default 0.25 is confirmed (secondary) at https://totalcsgo.com/commands/clextrapolateamount - Snapshots are delta-compressed against the last acked snapshot. Full snapshots are sent only at join or after a couple of seconds of heavy loss (`cl_fullupdate`). - The server tick (typically 66 in CS:S/TF2) bounds the snapshot rate. See also https://developer.valvesoftware.com/wiki/Tickrate **"Latency Compensating Methods in Client/Server In-game Protocol Design and Optimization"** (Yahn Bernier, GDC 2001): https://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization (fetch returned 403; content from snippets) - Client-side prediction: the client runs its own movement locally and assumes the server will accept the commands. When the server disagrees it replays from the authoritative state, and visible corrections are smoothed. - Lag compensation: the server rewinds hitboxes by client latency plus interpolation delay. It is the origin of "rewind to what the client saw". **Implications for us** - The industry default for remote entities is a fixed render-in-the-past delay of 2 snapshot intervals, with time-limited extrapolation (≤250 ms) only when the buffer runs dry. This is cheap and robust. - Our 30 Hz near band would give about 67–100 ms of delay, which is perceptually "realtime" for observed (not controlled) objects. - Lag compensation matters for our grab: the server could evaluate the grab ray against the world as the client saw it. --- ## 3. Overwatch: Tim Ford, GDC 2017 "Overwatch Gameplay Architecture and Netcode" - Vault page: https://gdcvault.com/play/1024001/-Overwatch-Gameplay-Architecture-and. Members-only, and the Vault was in maintenance. Official blurb: ECS architecture, and a networked sim that "uses determinism for responsiveness and precision". - Details below are from an Edgegap summary **(secondary)**: https://edgegap.com/blog/game-backend-deep-dive-overwatch-2016-netcode-architecture-rollback - 16 ms command frames (about 60 Hz), 7 ms in tournament mode. - The client runs ahead of the server by RTT/2 plus one buffered command frame (about 96 ms lead at 160 ms RTT). - **Time dilation:** when the server reports input starvation, the client steps at about 15.2 ms instead of 16 ms to rebuild the server-side input buffer, then slows back down. - Sliding window of all unacked inputs in each packet (Quake/Fiedler-style redundancy). - The server repeats the last input when starved. - On mispredict the client resets to the server's movement state and replays its inputs. Movement is deterministic. - Movement, abilities and weapons are predicted by default. - Only 3 of about 46 client systems touch netcode. - Forum discussion of the "RTT/2 + 1 frame" claim **(secondary)**: https://gamedev.net/forums/topic/696756-command-frames-and-tick-synchronization **Implications for us** - Overwatch is the canonical "predict what the player controls, interpolate everything else" design, with adaptive client clock rate rather than a fixed input delay. - Overwatch does **not** predict physics piles. Rigid-body prediction is a separate, harder problem (see sections 4 and 6). --- ## 4. Rocket League: Jared Cone, GDC 2018 "It IS Rocket Science! The Physics of Rocket League Detailed" - Talk listing: https://www.rocketleague.com/news/rocket-league-at-gdc-2018. Free video on the GDC YouTube channel per https://gamedeveloper.com/design/video-the-rocket-science-behind-i-rocket-league-s-i-physics. I could not watch or transcribe it, so the details below are **[unverified]**. - Commonly reported **(secondary)**: - Bullet physics was integrated into UE3 alongside PhysX for gameplay physics, for determinism and source access. - Physics runs at 120 Hz on client and server, with about 60 Hz server updates. Steam forum (secondary): https://steamcommunity.com/app/252950/discussions/0/1693788202025800838 - The client predicts its own car and also the ball and other cars (extrapolating their last inputs) and rolls back on correction. This is widely cited from the talk but **not confirmed** by any primary text I could read. - Epic's help page on Rocket League's server **input buffer** settings, Default / STS (Sim Time Scaling) / CSTS (Continuous STS), describes the server nudging the client's sim speed so the input buffer stays filled (same idea as Overwatch's time dilation): https://www.epicgames.com/help/en-US/rocket-league-c5719357623323/gameplay-c7262179951387/rocket-league-input-buffering-settings-a5720166699547 (fetch returned 403; content from search snippet). **Implications for us** - Rocket League is the reference for "full rigid-body prediction with rollback" under a server-authoritative model. It works because there are few bodies (8 cars + 1 ball) and a cheap, deterministic sim. - Rolling back and resimulating our pile (many voxel bodies, 4 TGS substeps) per correction would cost far more CPU. Only the few bodies near or held by the player are candidates for this treatment. --- ## 5. Halo: Reach, David Aldridge, GDC 2011 "I Shot You First: Networking the Gameplay of Halo: Reach" - The talk was made free on GDC Vault in 2011: https://www.gamedeveloper.com/business/gdc-vault-adds-free-crawford-i-halo-reach-i-maxis-lectures. I could not reach Vault. - **(secondary)** summaries: https://edgegap.com/blog/game-backend-deep-dive-halo-reach-netcode-host-migration - Built on the Tribes networking model (Frohnmayer & Gift, GDC 1999): intentionally unreliable, prioritised state replication, plus reliable events and control data. - A per-client prioritisation engine decides what to send within the bandwidth budget. - Hosted-client model, 16 players. - Quoted figures: about 45 kbit/s max to one client from the host, about 1 kbit/s host upstream to replicate one biped in combat, 250 kbit/s minimum host upstream for 16 players, and more than 80% bandwidth reduction vs Halo 3. These are garbled in the secondary source, so treat them as approximate **[unverified]**. **Implications for us** - This is the third independent AAA confirmation (after Fiedler and Teardown) of the same pattern: priority-scheduled, unreliable, latest-wins state for bodies, and a separate reliable channel for discrete events (our terrain edits). --- ## 6. Middleware: Photon, Unity, Lightyear, Rapier **Photon Fusion 2** - Shared-mode physics manual: https://doc.photonengine.com/fusion/2-shared/manual/physics (fetched via search; direct fetch 404'd) - **Forecast Physics** extrapolates networked bodies into each player's *local* time so they are interactable. Every client runs full physics locally and reconciles the local result with the extrapolated network pose. - With Forecast disabled, remote bodies are kinematic and shown in remote time, which the docs call suitable for non-interactable physics. - Enabled per NetworkTransform behind a project-wide switch. - Fusion 2.1 notes: https://doc.photonengine.com/fusion/v2/getting-started/release-notes/whats-new-2-1. Forecast is available in Host, Server and Shared mode and avoids the CPU cost of full predicted resimulation. - Full prediction with resimulation is the Physics Addon (Host/Server only), "very CPU expensive": https://doc.photonengine.com/fusion/v2/addons/physics-addon-2.1 - Shared mode means each client has state authority over its own objects (a distributed-authority model like Fiedler's VR scheme). **Photon Quantum 3** (deterministic predict/rollback): https://doc.photonengine.com/quantum/current/concepts-and-patterns/mispredictions-and-entity-views - Relay-only server. Verified frames are identical on all clients; predicted frames reuse the last input. - Recommended small input delay: `OffsetMin` about 2 ticks; "soft lockstep" at ≥10. - `RollbackWindow` = 60; local rollback length = hard tolerance + RTT/2 + jitter. - Session config API: https://doc-api.photonengine.com/en/quantum/current/class_photon_1_1_deterministic_1_1_deterministic_session_config.html - Quantum uses fixed-point math for cross-platform determinism. This is well known, but I did not retrieve the specific doc page. **Unity Netcode for Entities** - Physics: https://docs.unity3d.com/Packages/com.unity.netcode@1.6/manual/physics.html - **Interpolated ghosts:** physics runs only on the server, and the client makes the bodies kinematic and plays snapshots. - **Predicted ghosts:** physics runs in the client's prediction loop and is re-run for every rollback tick. The docs warn this "can spiral", and batching options trade CPU for misprediction. - A separate client-only physics world can hold debris, with kinematic proxies of predicted ghosts. - Default quantisation of 1000 (1 mm) can cause visible corrections for physics ghosts, so raise it for those. - Interpolation: https://docs.unity3d.com/Packages/com.unity.netcode@1.6/manual/interpolation.html - Separate `InterpolationTick` and `ServerTick` timelines. - Buffer set by `ClientTickRate.InterpolationTimeMS` (formerly `InterpolationTimeNetTicks`). - Extrapolation of interpolated ghosts is capped at 20 ticks (about 1/3 s at 60 Hz) via `MaxExtrapolationTimeSimTicks`. - Prediction switching moves a ghost between the predicted and interpolated timelines with smoothing. For example, switch a body to predicted when the player approaches or touches it. - Time sync: https://docs.unity3d.com/Packages/com.unity.netcode@1.5/manual/time-synchronization.html - The interpolation delay adapts to RTT, jitter and packet arrival rate. - The client's delta time is scaled up or down so the command age tracks `TargetCommandSlack`. - `CommandAgeCorrectionFraction` defaults to 10% per frame. - Snapshots: https://docs.unity3d.com/Packages/com.unity.netcode@1.6/manual/ghost-snapshots and https://docs.unity3d.com/Packages/com.unity.netcode@1.6/api/Unity.NetCode.GhostSendSystem.html - Delta-compressed against up to **3 acked baselines** with a predictive scheme (`GhostDeltaPredictor`). - Per-chunk importance, scaled by age (time since last send) and distance. This is a priority accumulator in another name. - Optional `MaxSendRate`. - Prediction smoothing: https://docs.unity3d.com/Packages/com.unity.netcode@1.6/manual/prediction-smoothing.html. Per-component smoothing callbacks are applied after a rollback. The default translation action's thresholds are not documented on that page. **Unity Netcode for GameObjects** - NetworkTransform uses `BufferedLinearInterpolator` and sends delta updates as unreliable-sequenced since v1.8. From v2.3 the interpolator type is selectable and `MaximumInterpolationTime` is tunable. - Ownership-based authority, including a "distributed authority" topology: https://discussions.unity.com/t/netcode-for-gameobjects-2-3-0-released/1628951 and https://mp-docs.dl.it.unity3d.com/netcode/2.3.2/terms-concepts/distributed-authority/ (the latter notes the cheating trade-off). **Bevy Lightyear**: https://github.com/cBournhonesque/lightyear - Server-authoritative. - Features: - One-line client prediction with rollback. - Snapshot interpolation. - Pre-spawning (client spawns the predicted entity before the server confirms). - Configurable input delay. - Priority-accumulation bandwidth cap. - Avian physics examples. - Transports: WebTransport, WebSocket, Steam and UDP; WASM via WebTransport. - Release notes describe rule-based interpolation reused for remote-entity interpolation, fixed-tick frame interpolation, and post-rollback **visual correction**: https://github.com/cBournhonesque/lightyear/releases - I could not find a doc page on authority transfer (the book index fetched only the intro: https://cbournhonesque.github.io/lightyear/book/) **[unverified]**. **Rapier determinism** (Dimforge) - Rust: https://rapier.rs/docs/user_guides/rust/determinism/ - Locally deterministic by default. - Cross-platform with the `enhanced-determinism` feature, given the same insertion order, IEEE-754-2008 targets "including WASM", and nalgebra's `ComplexField` sin/cos instead of std. - Incompatible with the `simd8` feature. Current docs say `parallel` is allowed and thread-count independent; older pages said it was incompatible. - JS: https://rapier.rs/docs/user_guides/javascript/determinism. The WASM build is "fully cross-platform deterministic". Verify by MD5 of `world.takeSnapshot()` after N steps. JS `Math.sin`/`cos` are not safe for initialisation. - I found no Dimforge blog post specific to networked physics. **Implications for us** - Every mature stack splits bodies into two classes: - **Interpolated** (the server-only sim plays back from a buffer). This should be the default for our piles. - **Predicted / locally owned** (the client sim, reconciled or authority-transferred). Reserve this for the avatar, the held body, and possibly bodies in contact with it. - Unity's "prediction switching" and Photon's "Forecast" are two concrete ways to move a body between the classes. - Rapier's cross-platform WASM determinism is real but conditional (insertion order, no SIMD8, deterministic init math). Our server engine is our own Rust engine, not Rapier. Running the *same* engine compiled to wasm on the client is the precondition for cheap reconciliation. --- ## 7. Roblox network ownership **"Network ownership"** (Roblox Creator Docs): https://create.roblox.com/docs/physics/network-ownership - The server owns all parts by default. - The engine automatically hands unanchored parts to a client based on proximity to that player's character and the client's hardware capacity. No distance threshold is documented. - The owning client simulates the part locally ("more responsive") and reduces server load. - Anchored parts are always server-owned. - API: - `SetNetworkOwner(player)` assigns a client. - `SetNetworkOwner(nil)` forces the server; the docs warn this makes physics jittery for clients. - `SetNetworkOwnershipAuto()` returns the part to automatic. - Vehicles: assign the whole assembly to the driver on seat change. - **Security:** the server cannot verify client-owned physics. Clients can teleport owned parts and fake Touched events, so the server must validate. **Implications for us** - Roblox is the largest shipped example of automatic, proximity-based authority migration for general rigid bodies. - It is the cheapest route to zero-latency interaction with nearby bodies. It costs server-side validation (speed and penetration limits) and pops on hand-off unless smoothed. --- ## 8. Teardown multiplayer and voxel-engine devs **"Teardown multiplayer"** (Dennis Gustafsson, Voxagon blog, 2026-03-13): https://blog.voxagon.se/2026/03/13/teardown-multiplayer.html (primary; the most directly relevant source in this survey) - **Hybrid model.** Destruction is deterministic, and everything else is state-synced. - Voxel destruction was rewritten in **fixed-point integer math**. - Each breakage becomes a stream of deterministic **commands** ("cut hole of shape S at voxel x,y,z", ownership changes, joint reconnection, spawn/recolour). These go on a **reliable ordered** stream whose cost does not depend on object size. - A 2021 attempt that sent changed voxel data "choked the connection" on large objects. - **Body transforms, velocities and player positions** go over **unreliable, eventually consistent** state sync: newest wins, and loss or reorder is tolerated. - The server has a per-client **priority queue** favouring visible objects, with a budget of about **1 Mbit/s per client**. - Clients simulate locally and are corrected when state arrives. Under load, corrections are rarer and **visible snapping** occurs. - Steam Networking transport. Player-hosted, no dedicated servers. - **Late join** replays the recorded command stream onto the loaded level, which was cheaper than expected versus 30–50 MB saves. When the command buffer fills, join-in-progress is disabled. - The author now considers float "mostly safe" for determinism with care. - Not stated: tick rate, latency hiding, the fixed-point format. - Related: Shacknews interview (no networking detail): https://www.shacknews.com/article/135274/tuxedo-labs-teardown-interview; the 2026 multiplayer launch was on Steam on 2026-03-12 **(secondary)**: https://automaton-media.com/articles/newsjp/teardown-20260227-424779/ **Gabe Rundlett / John Lin** - I found no public material from either on networking voxel edits **[not found]**. - Other voxel engines found are server-authoritative with no edit prediction described: - Voxel Tools for Godot: https://voxel-tools.readthedocs.io/en/latest/multiplayer/ - Voxelize: https://docs.rs/crate/voxelize/latest **Implications for us** - Teardown is architecturally almost our design: voxel bodies, CSG-style edits, and server-authoritative rigid-body state. Its answer: 1. Ship **edits as compact commands on a reliable ordered channel** and apply them **deterministically on both sides**, using integer voxel ops rather than sending the resulting region. 2. Ship **body poses unreliable, latest-wins, priority-scheduled**. - Our CSG brushes are a natural command format. If the client can apply a brush bit-identically to the server (integer/fixed-point voxel grid ops), optimistic local application and reconciliation become trivial: confirm by sequence number, and the region resend becomes a fallback. --- ## 9. Optimistic world edits with reconciliation **Minecraft Java protocol (1.19+), block-change sequence and "Acknowledge Block Change"** ("Block Changed Ack"; wiki.vg now lives at minecraft.wiki): https://minecraft.wiki/w/Java_Edition_protocol/Packets - Glossary text: the client keeps a **sequence** counter "for local block changes", incremented on dig start/finish, use-item-on, and similar actions. It "handles latency to avoid applying outdated block changes to the local world" and is "used to revert ghost blocks". - The server echoes the highest processed sequence in Acknowledge Block Change. After the ack, the client shows the server's block state instead of its prediction. - Reference implementations of the client side: - **Geyser**: https://gitdab.com/GeyserMC/Geyser/commit/2ce7ff850ae96327e7a1fdd23f1457ac5b104789 - **Azalea** (Rust): https://git.matdoes.dev/mat/azalea/commit/1b348ceeffc61e49b19f2982e7a9de479c1678de - Both keep a per-position map of the last server-verified block state, suppress server block updates for positions with pending predictions, and on ack(seq ≥ n) restore the server-verified state for those positions. - Packet description **(secondary)**: https://mcpy.readthedocs.io/en/client/api/packets/play.html **Fortnite building prediction** - I found no primary Epic source **[not found]**. Only unsourced third-party claims (for example "client shows ghost piece, server validates") are online, and I did not use them. **General pattern: client-side prediction plus server reconciliation** - Valve, Bernier 2001 (section 2). - Unity NfE "Introduction to prediction": https://docs.unity3d.com/Packages/com.unity.netcode@1.4/manual/intro-to-prediction.html - Lightyear pre-spawning (section 6). **Implications for us** - The Minecraft scheme maps one-to-one onto CSG edits: 1. The client tags each edit with a seq and applies it locally (a "ghost" edit). 2. The client keeps the server-verified chunk/region state for touched regions and ignores server region updates for them while edits are pending. 3. On ack(seq), the client drops pending edits ≤ seq and adopts the server state, which is usually identical. If it differs, cross-fade or re-mesh. - Combined with Teardown's deterministic command application, mispredictions only happen when the server rejects or reorders an edit (permissions, a concurrent edit by another player). --- ## 10. Jitter buffers, adaptive delay, extrapolation and correction smoothing **Jitter buffer and interpolation delay** - Fiedler: - Delay = 3× send interval at 2–5% loss (10 pps → 350 ms, 30 → 150, 60 → 85): https://gafferongames.com/post/snapshot_interpolation/ - State-sync jitter buffer of 4–5 frames at 60 Hz: https://gafferongames.com/post/state_synchronization/ - 100 ms in the VR demo: https://gafferongames.com/post/networked_physics_in_virtual_reality/ - Valve: `cl_interp` 100 ms = 2 update intervals, extrapolation ≤250 ms (section 2). - Unity NfE: an adaptive interpolation delay from RTT, jitter and arrival rate, plus client time-scale adjustment (section 6). **Clock sync and time dilation** - Overwatch: the client steps at about 15.2 ms vs 16 ms to refill the server input buffer **(secondary)**. - Rocket League: STS/CSTS sim time scaling (Epic help). - Unity NfE: `CommandAgeCorrectionFraction`, 10%. - The common pattern: estimate server time from tick-stamped packets, then *slew* playback rate by a few percent instead of jumping the clock. **Dead reckoning with convergence** - Curtiss Murphy, "Believable Dead Reckoning for Networked Games", *Game Engine Gems 2* (A K Peters, 2011), pp. 307–328. - Listing: https://gameenginegems.com/gemsdb/article.php?id=46 - Book: https://www.oreilly.com/library/view/game-engine-gems/9781568814377/chapter-24.html - **Projective velocity blending:** each frame, project from the last *rendered* state (with a blended velocity) and from the newly received state, then lerp between the two projections over a blend time. In practice the last known acceleration converges faster with less oscillation. The excerpt describing this **(secondary)** is https://www.taylorfrancis.com/books/9780429105272/chapters/10.1201/b11333-22 - The technique is cited as standard in Ubisoft's GDC Watch Dogs 2 vehicle replication talk (https://www.gdcvault.com/play/1024010 is the search hit, unverified). - Related: Daniel Holden, "Dead Blending" (inertialization-style correction): https://theorangeduck.com/page/dead-blending **Avoiding visible snaps** - Fiedler: keep the sim state exact and render state + error offset, with exponential decay of 0.95–0.85 per frame by error size, and rotation slerp at 0.1 per frame (section 1). - Unity: per-component prediction-smoothing callbacks after rollback. - Lightyear: visual correction after rollback. - Valve and Unity: cap extrapolation (250 ms / 20 ticks) so bad guesses stay bounded. - Teardown admits visible snapping under load. **Implications for us** - We need (a) a server tick stamp on every pose message, (b) a per-entity ring buffer of timestamped samples, and (c) a render clock = estimated server time − adaptive delay (about 2× send interval plus a jitter margin), slewed rather than jumped. - Corrections then become render-only offsets that decay, never pose jumps. - Extrapolate at most about 100–250 ms, and preferably not at all for colliding bodies, per Fiedler. --- ## 11. Browser transports with Safari (2025–2026 status) ### 11a. WebTransport **Safari:** "WebKit Features for Safari 26.4" (WebKit blog, 2026-03-24): https://webkit.org/blog/17862/webkit-features-for-safari-26-4/ - Adds WebTransport over HTTP/3/QUIC with bidirectional/unidirectional streams, **datagrams**, and backpressure, mixing reliable and unreliable on one connection. - It falls back to HTTP/2 over TCP with the same API when QUIC is unavailable. - The blog also notes WebSocket's TCP head-of-line blocking. **caniuse:** https://caniuse.com/webtransport (checked 2026-10-27) - Safari macOS 26.4+ and **Safari iOS 26.4+**: supported. - Chrome 97+, Edge 98+, Firefox 114+. - About 91.6% global coverage. - `serverCertificateHashes`: Safari and iOS 26.4+ (https://caniuse.com/mdn-api_webtransport_webtransport_options_servercertificatehashes_parameter). - So **iOS is covered** from iOS 26.4. On iOS all browsers use WebKit (outside the EU alternative-engine exception), so the floor is OS 26.4 for every iOS browser. **WebKit bugs** - Bug 319830 (committed 2026-07): `datagramsReadableMode` was renamed to `datagramsReadableType`: https://bugs.webkit.org/show_bug.cgi?id=319830 - Bug 302980: datagram test fix (2025-12): https://bugs.webkit.org/show_bug.cgi?id=302980 **Third-party interop notes (secondary, measurement-based):** https://echo.semantic-ui.com/compat - **The floor is the OS (Network.framework) version, not Safari's version.** OS point releases can change behaviour, so re-test. - If the server omits `WT_MAX_SESSIONS`, `ready` never settles. If it is >1, also advertise `WT_INITIAL_MAX_DATA` and `WT_INITIAL_MAX_STREAMS_{UNI,BIDI}`, or Safari refuses. One quic-go server worked where another with the same SETTINGS did not. - `WebTransportError` messages are empty. - Flow-control credit is not released on FIN/RESET (WebKit bug 319818, **not independently verified**). It can deadlock around 16 MB or 7,600 streams, so do not open a stream per message. - User-installed root CAs are ignored. Use public WebPKI or hash pinning. - **HTTP/2 fallback silently drops datagrams.** Check `transport.reliability`, or pass `requireUnreliable: true`. - Safari uses `datagrams.createWritable()`; Chrome uses the older `datagrams.writable`. - `headers` on CONNECT is unimplemented. - WKWebView/in-app browser support is unconfirmed. **Bun:** issue #13656 "Add WebTransport support" is **open** (opened 2024-08-31; last comment 2026-09-18 asking for news): https://github.com/oven-sh/bun/issues/13656 - PR #29768 "Bun.serve: HTTP/3 (QUIC) support via `h3: true`" shows as merged by a Bun maintainer: https://github.com/oven-sh/bun/pull/29768. I could not determine which release ships it. - A community PR #40027 adds datagrams only (unmerged per the thread). - **Net: Bun has no shipped WebTransport server as of 2026-10-27.** **Sidecar options** - Go: `quic-go/webtransport-go`, with datagrams since v0.8.0: https://github.com/quic-go/webtransport-go/releases/tag/v0.8.0. Caddy's new passthrough is built on it. - Rust: `wtransport` (pure Rust; streams and datagrams): https://docs.rs/wtransport/ - Node: `@fails-components/webtransport` exists (libquiche-based N-API). **I found no current status or Bun compatibility info [unverified].** **Caddy reverse proxy** - PR #7669 "caddyhttp, reverseproxy: experimental WebTransport passthrough" was **merged ~2026-10-13 into milestone v2.12.0**: https://github.com/caddyserver/caddy/pull/7669 - It bridges Extended-CONNECT `:protocol=webtransport` sessions, including bidi/uni streams and datagrams, to an **HTTP/3 upstream** (`transport http { versions 3 }`). - It needs a global `servers { webtransport }` option, is off by default, and depends on #7976. - The latest stable release is v2.11.7 (2026-10-03), with no 2.12 release or beta visible: https://github.com/caddyserver/caddy/releases - **So stable Caddy cannot proxy WebTransport today.** Options: - Build Caddy from master. - Expose the WT sidecar on its own UDP port with its own certificate (chiyari already has wildcard `*.7x1.co` certs). - Use L4 UDP forwarding. **UDP through the VPS edge** - QUIC is UDP/443 (or any port). The chiyari to reisen tailnet path would carry UDP (WireGuard), but the edge must forward UDP, which Caddy's HTTP app does not do for arbitrary QUIC. - This needs an infra check; it is not researched here. ### 11b. WebRTC DataChannel **Browser side** - Unordered and unreliable via `createDataChannel(label, {ordered:false, maxRetransmits:0})`. `maxRetransmits` and `maxPacketLifeTime` are mutually exclusive. - MDN marks `maxRetransmits` Baseline "widely available" since Jan 2020: https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/maxRetransmits. I could not retrieve the per-Safari row. - Safari 26.4 release notes mention fixes to RTCDataChannel close events and "RTCDataChannelInit issues" (WebKit blog above). - Guide: https://web.dev/articles/webrtc-datachannels **Server stacks usable without a browser** - `node-datachannel` (libdatachannel bindings, N-API 8, Node ≥18.20): https://classic.yarnpkg.com/en/package/node-datachannel - **No published Bun confirmation.** Bun implements N-API, so it may work, but this is **[unverified]**. - geckos.io v3 (a game-oriented UDP-in-browser server) is built on it: https://github.com/geckosio/geckos.io/discussions/217 - `werift` (pure TypeScript; ICE, DTLS, SCTP, DataChannel, TURN): https://www.npmjs.com/package/werift-webrtc (the package name has moved around). Bun status unverified. - Pion (Go): https://pkg.go.dev/github.com/pion/datachannel. Pion's blog argues DataChannels suit games because they give unreliable messages without WebTransport: https://pion.ly/blog/index.xml - str0m (Rust, sans-IO, one UDP socket for all peers): https://docs.rs/str0m. ICE-lite is supported in the extracted `is` crate (https://docs.rs/crate/is/0.10.0). **Deployment** - A server with a public IP can run ICE-lite with host candidates only. Users behind UDP-blocking networks would need TURN over TCP/TLS, which defeats the purpose, or a WebSocket fallback. - geckos.io guidance is to open a signalling TCP port plus a UDP port range (or a single shared port). - Signalling can ride on the existing WebSocket. - **SCTP message size is a non-issue at our sizes.** Keep messages under about 1200 B to avoid SCTP fragmentation. Per-message overhead for IP+UDP+DTLS+SCTP is roughly 60–80 B (my estimate, not sourced). ### 11c. WebSocket over HTTP/2 / HTTP/3 - RFC 8441 (WebSocket over HTTP/2, 2018): https://datatracker.ietf.org/doc/html/rfc8441. It still rides one TCP connection, so **TCP head-of-line blocking remains**. It only multiplexes WebSocket with other HTTP streams. - RFC 9220 (WebSocket over HTTP/3, 2022): https://datatracker.ietf.org/doc/rfc9220/history/ - Each WebSocket is one QUIC stream, so loss on it still stalls that stream; there is no unordered delivery within one socket. - A vendor guide **(secondary)** says that as of early 2026 no major browser shipped it: https://websocket.org/guides/future-of-websockets/. An nginx ticket concurs: https://trac.nginx.org/nginx/ticket/1992 - **Neither helps our problem.** Only multiple independent streams or datagrams remove head-of-line blocking. ### 11d. How often UDP is blocked - Google, "The QUIC Transport Protocol: Design and Internet-Scale Deployment" (Langley et al., SIGCOMM 2017). IETF 99 MAPRG slides: https://datatracker.ietf.org/meeting/99/materials/slides-99-maprg-the-quic-transport-protocol-design-and-internet-scale-deployment-01.pdf - QUIC succeeded for **95.3%** of clients. - **4.4%** were blocked (UDP blocked or packet-size problems). - **0.3%** had poor performance (UDP rate-limited). - RFC 9308 (QUIC Applicability) cites 3–5% of networks blocking all UDP (Trammell16, Swett16) and requires a TCP fallback: https://rfc-editor.org/rfc/rfc9308 - I found no Zoom or Discord published numbers **[not found]**. **Implications for us** - As of 2026-10, **WebTransport with datagrams works on all four engines including iOS/macOS Safari 26.4+**, which removes the historical Safari blocker. It is the cleanest fit: one QUIC connection, reliable streams for edits and chunks, datagrams for poses. - Costs: - Bun cannot serve it yet, so we need a sidecar (Go `webtransport-go` or Rust `wtransport`; Rust fits our existing physics worker toolchain). - Stable Caddy cannot proxy it. - Safari has interop sharp edges (SETTINGS, CA trust, HTTP/2 fallback dropping datagrams). - About 4–5% of clients cannot use UDP and need fallback. - Keep the WebSocket as the always-works fallback: the same message schema over a reliable channel, with latest-wins coalescing. - A WebRTC DataChannel is the older Safari-proven alternative, with heavier server stacks (DTLS/SCTP/ICE) and no clean Bun story. --- ## 12. TCP head-of-line blocking on thin streams - **Thin-stream papers (Simula):** Petlund, Griwodz, Halvorsen et al. Game traffic is "thin" (small packets, low rate, few packets in flight). Thin streams rarely trigger fast retransmit (3 dupACKs), so loss recovery falls back to RTO with exponential backoff, and "severe latency penalties occur for all existing TCP variations". - Publications: https://web-backend.simula.no/sites/default/files/publications/Simula.ND.83.pdf (WoW traffic over real Internet), https://web-backend.simula.no/sites/default/files/publications/Simula.ND.112.pdf - Linux Journal summary by Petlund (2012): https://linuxjournal.rubdos.be/ljarchive/LJ/219/11180.html. The mods cut worst-case latency "by several seconds" in Age of Conan traces. The BZFlag demo was at 5% loss / 100 ms RTT. - I did not extract exact CDF numbers from the PDFs **[partially verified]**. - **Linux mitigations:** - `net.ipv4.tcp_thin_linear_timeouts` (off by default) allows up to 6 linear (non-backoff) RTOs when fewer than 4 packets are in flight: https://sysctl-explorer.vstack.com/net/ipv4/tcp_thin_linear_timeouts.html - The old `thin_dupack` was removed as "subsumed by RACK": https://lore.kernel.org/all/4B7D05ED.4060900@simula.no/t/ - **RACK-TLP (RFC 8985):** https://www.rfc-editor.org/rfc/rfc8985.html - Tail Loss Probe PTO = 2·SRTT (+ max delayed-ACK budget if one segment is in flight), capped by the RTO. - The reorder window starts at min_RTT/4. - So with TLP a lost tail packet is typically repaired in about 2–3 RTT rather than waiting for the RTO. - Linux's minimum RTO is 200 ms (`TCP_RTO_MIN` = HZ/5 in `include/net/tcp.h`). That is from my knowledge of the kernel source and was **not re-fetched here [unverified in this session]**. - **What this means in practice:** under 1% loss at 30–60 messages/s, roughly every 2–3 s one packet is lost, and every message behind it (all bodies) waits about 2–3 RTT, or ≥200 ms+ if TLP/RACK cannot fire. That is a visible freeze-then-catch-up. - Fiedler's observation matches this qualitatively: hitches every few seconds at 100 ms / 1% loss (section 1). **Implications for us** - Over a single WebSocket, any loss stalls *all* entity updates and also the edit acks, which is the "everything hitches together" symptom. - An interpolation buffer of about 100 ms hides jitter but not 200–400 ms retransmit stalls. - Mitigations short of UDP: - Latest-wins coalescing on the server send queue (do not queue stale poses behind a stall). - Bounded extrapolation. - Possibly enable `tcp_thin_linear_timeouts` on the server. - The structural fix is datagrams (WebTransport, with WebRTC as an alternative). --- ## 13. Client-side physics in the browser via WASM **Sizes** (from the jsDelivr package listings) - `@dimforge/rapier3d@0.19.3`: `rapier_wasm3d_bg.wasm` = **1,570,176 B (about 1.5 MB, uncompressed)**. The `-compat` variants embed the wasm as base64 (about 33% bigger). Listing: https://data.jsdelivr.com/v1/packages/npm/@dimforge/rapier3d@0.19.3 - `jolt-physics@1.0.0`: `jolt-physics.wasm.wasm` = 1,993,586 B, multithread build 2,405,086 B. This is an old version, so check the current one. Listing: https://data.jsdelivr.com/v1/packages/npm/jolt-physics@1.0.0 - JoltPhysics.js flavours: https://npmjs.com/package/jolt-physics - Jolt's cross-platform determinism needs the `CROSS_PLATFORM_DETERMINISTIC` build flag (about 8% slower), which the prebuilt npm builds do **not** set. PlayCanvas notes: https://developer.playcanvas.com/user-manual/physics/ammo-alternatives/ - Jolt maintainers cited Safari shared-memory problems as a blocker for threaded builds (older discussion): https://github.com/jrouwe/JoltPhysics.js/discussions/110 - Box2D v3 WASM: not researched. **WASM float determinism** - The WebAssembly nondeterminism doc: https://www.webassembly.org/docs/nondeterminism/ - Scalar f32/f64 arithmetic is IEEE-754 deterministic. - The exceptions are **NaN bit patterns** (and the NaN sign bit when produced from non-NaN inputs). - **Relaxed SIMD is explicitly nondeterministic across architectures.** Wasmtime notes on deterministic execution: https://docs.wasmtime.dev/examples-deterministic-wasm-execution.html - Blockchain users (DFINITY) disable threads and SIMD and canonicalise NaNs: https://forum.dfinity.org/t/how-is-deterministic-execution-of-webassembly-ensured/6335 - JS `Math.sin`/`cos` etc. are implementation-defined. Use your own transcendental functions in wasm (Rapier docs, section 6). **Feature support** (WebAssembly feature table, https://raw.githubusercontent.com/WebAssembly/website/main/features.json, and caniuse) | Feature | Chrome | Firefox | Safari | |---|---|---|---| | Fixed-width SIMD | 91 | 89 | **16.4** (https://caniuse.com/wasm-simd) | | Threads/atomics | 74 | 79 | **14.1 desktop / iOS 14.5** (https://caniuse.com/wasm-threads) | | SharedArrayBuffer | — | — | 15.2 macOS and iOS (https://caniuse.com/sharedarraybuffer) | | Relaxed SIMD | 114 | 145 | **flag only** | | JSPI | 137 | 153 | 27 | - SharedArrayBuffer requires cross-origin isolation (COOP: same-origin + COEP: require-corp/credentialless). This is standard; the caniuse page itself did not state it. **Implications for us** - A Rust engine compiled to wasm32 with fixed-width SIMD is fine on every engine. - Threads work in Safari but require COOP/COEP on the page. That constrains any cross-origin assets, so check the CDN and iframe needs. - Avoid relaxed-SIMD and keep NaNs out of state if client and server are meant to agree. - About 1.5–2 MB of wasm for a full physics engine is typical. Our own engine trimmed to voxel-body needs is likely similar or smaller. - Bit-exact client/server agreement needs the same code (our engine compiled for wasm32 and native), the same insertion order, no FMA contraction differences between builds, and deterministic math functions. Native x86 versus wasm agreement is plausible under IEEE scalar math but must be **tested** (hash state each tick, as the Rapier docs suggest). --- ## Cross-cutting takeaways (ranked by evidence strength) 1. **Render remote bodies in the past from a timestamped buffer.** - Evidence: Valve, Fiedler, Unity, NGO. - Add a server tick to every pose and an adaptive delay of about 2 send intervals plus jitter (about 67–100 ms at 30 Hz near), slewed clock, Hermite/linear + slerp. Cap extrapolation at 100–250 ms. - This alone fixes "applied on arrival" judder and is transport-independent. 2. **Priority-accumulator scheduling under a byte budget, with quantised, delta-against-acked-baseline poses.** - Evidence: Fiedler, Halo, Unity, Teardown, Lightyear. - About 45 B → about 10 B absolute, a few bytes delta. That is 4–10× more bodies per budget, so more bodies get 30–60 Hz. 3. **Unreliable, latest-wins transport for poses and a reliable ordered channel for edits and commands.** - Evidence: Teardown, Halo/Tribes, Fiedler. - In browsers this is now WebTransport (Safari/iOS 26.4+), keeping WebSocket as the fallback for about 4–5% of UDP-hostile clients. - It needs a non-Bun sidecar, and Caddy passthrough is not yet in a stable release. 4. **Edits as deterministic commands, applied optimistically with seq/ack reconciliation.** - Evidence: Teardown integer voxel commands, Minecraft block-change sequence/ack. 5. **Zero-lag interaction with physics bodies**, choosing one of: - (a) authority/ownership transfer to the interacting client: Fiedler VR, Roblox, Photon Shared. Cheap, but trust and validation are needed. - (b) client predicts only the held and nearby bodies and reconciles with smoothing: Unity prediction switching, Photon Forecast, Rocket League. This needs the engine in wasm, and full-pile rollback is too expensive. - Corrections are always hidden with a decaying render-only error offset. ## Items I could not verify - GDC Vault contents (Overwatch, Rocket League, Halo, Fiedler 2015): the Vault was in maintenance. - Valve wiki pages: HTTP 403. - Rocket League "predict ball + all cars" specifics. - Fortnite building prediction. - Gabe Rundlett / John Lin networking material. - `@fails-components/webtransport` status. - `node-datachannel` and `werift` under Bun. - The per-Safari row for DataChannel `maxRetransmits` (though MDN marks it Baseline 2020). - WebKit bug 319818. - Which Bun release contains the HTTP/3 PR. - Exact Simula thin-stream CDF numbers. - Linux `TCP_RTO_MIN` (from memory, not re-fetched).