multiplayer
Skill1 starsChanged yesterdayApache-2.0View on GitHub
Use when a Godot game is played over a network: choosing a netcode model, prediction, interpolation or lag compensation, or when movement feels laggy, players rubber-band or hits do not register.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- sid-lakhani/agents-configtheir own version, first seen Oct 20, 2026
- Ar9av/game-exatheir own version, first seen Oct 11, 2026
- xenitV1/Antigravity-Workflowstheir own version, first seen Oct 8, 2026
- VoDaiLocz/kilo-kit-mcptheir own version, first seen Aug 21, 2026
- SKB3002/agenthubtheir own version, first seen Apr 20, 2026
- bcastelino/agent-skills-kittheir own version, first seen Feb 28, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- xenitV1/Antigravity-Workflows★ 130same name
- VoDaiLocz/kilo-kit-mcp★ 27same name
- Ar9av/game-exa★ 4same name
- SKB3002/agenthub★ 4same name
- sid-lakhani/agents-config★ 3same name
- bcastelino/agent-skills-kit★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- algorithmsSkill
- animationSkill
- anti-cheatSkill
- asset-pipelineSkill
- automation-hooksSkill
- calendarSkill
- cameraSkill
- console-certSkill
- debug-toolsSkill
- determinismSkill
- game-aiSkill
- game-audioSkill
- game-dataSkill
- game-designSkill
- game-juiceSkill
- game-planSkill
- game-playtestSkill
- gameSkill
- game-telemetrySkill
- godot-addonsSkill
- godot-diagnoseSkill
- godot-editor-bridgeSkill
- godot-export-releaseSkill
- godot-pitfallsSkill
- godot-shaders-vfxSkill
- godot-test-loopSkill
- inputSkill
- kit-reviewSkill
- kitSkill
- legalSkill
- llmSkill
- localizationSkill
- lookSkill
- mathSkill
- mobile-webSkill
- moddingSkill
- narrativeSkill
- new-gameSkill
- patternsSkill
- performanceSkill
- procgenSkill
- progressionSkill
- release-readinessSkill
- retroSkill
- savesSkill
- serversSkill
- steamSkill
- store-pageSkill
- typographySkill
- ui-accessibilitySkill
- ui-flowsSkill
- verify-before-doneSkill
- weekly-reviewSkill
- xrSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 144
Saves: Every frame (GGPO), or only the confirmed frame, the last with everyone's input (NetherRealm): one save a tick instead of up to 8, …
- Distinctive: line 149
Boundaries: Never roll back across a camera cut, a cinematic or a finishing move.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Networked games in Godot 4 (C#)
The server owns the truth; each client shows its own player at once and everyone else a little in the past; and every
claim about "it feels fine" is measured at 50, 100 and 250 ms with jitter and loss. The tested model is in
${CLAUDE_PLUGIN_ROOT}/examples/csharp/src/Example.Core/Net/ (Netcode.cs, Link.cs) with
${CLAUDE_PLUGIN_ROOT}/examples/csharp/tests/Example.Core.Tests/NetcodeTests.cs; the load and soak harness is soak with
tests/soak-fixture. Sources and measurements: ${CLAUDE_PLUGIN_ROOT}/docs/multiplayer.md. Hosting, stopping and
draining servers, join tokens, matchmaking and chat moderation are servers.
1. Pick the model
| Model | Use for | Costs |
| Client-server with prediction, reconciliation, interpolation, lag compensation | Shooters, action, more than 4 players, players you cannot trust | A server to run; others are seen about 100 ms in the past; "shot behind cover" |
| Snapshot interpolation only | Co-op, slow games, physics-heavy scenes, spectators | Your own input takes a round trip plus the delay to show |
| Rollback (GGPO) | 1 v 1 and small fighting or action games | A fully deterministic simulation that saves, loads and re-runs several frames per frame; Godot's physics cannot be stepped by hand, so not with RigidBodies |
| Deterministic lockstep | RTS with many units, 2 to 8 players | Same results on every machine (fixed-point, not floats), the slowest player sets the pace, joining mid-game is hard |
2. Client-server, step by step (Gambetta; Valve's Source networking)
- Fixed tick. Server and clients simulate in fixed steps with the same code (
Sim.Move); rendering interpolates between steps. Valve uses 66 ticks a second, Valorant 128; 30 to 60 suits most games. In Godot 4.7 that is physics interpolation, off by default (turning it on and resetting it after a spawn or teleport:performance; TRIBES "tweens" frames between ticks the same way). - Inputs, not positions. Each client sends numbered inputs, every packet repeating the last 3 unconfirmed ones: at 5% loss nothing is lost; with one copy, every lost packet is a correction the player sees.
- Server queue. The server applies each client's inputs one per tick, in order, waits a few ticks for a missing one, and works a backlog down two a tick. Applying them as they arrive loses inputs to reordering and moves other players unevenly (both happened in the C# example's tests before the queue).
- Or never wait (Overwatch:
${CLAUDE_PLUGIN_ROOT}/docs/gdc/overwatch-gameplay-architecture-netcode.md). Fixed 16 ms command frames (7 ms in tournament play), the client half a round trip plus one frame ahead. A starved server applies the last input again (Server.RepeatWhenStarved) and the client corrects a wrong guess; told the server ran dry, the client steps a few percent faster until inputs wait there, then slower (time dilation,Client.MaxDilation; the talk gives no figure, 2 to 5% measured best). Each packet carries every unacknowledged input, capped (Client.MaxWindow). At 250 ms through bursts of loss: 211 repeated inputs instead of 3,441 at a fixed rate, and no player frozen where the waiting server froze them 930 times. Above about 220 ms, stop predicting hit effects and cap the rewind (Server.MaxRewindMs); favour the shooter unless the victim's defence started first on the server; quantise positions (Overwatch: 1/1024 m), since most hit mispredictions were position mismatches. - Prediction and reconciliation. The client applies its input at once; a snapshot says the last input the server applied; the client takes the server's state, drops confirmed inputs and replays the rest. With the same code on both sides, the correction is exactly 0.
- Interpolation. Other players are drawn between the two snapshots around "now minus 100 ms" (Valve's default, two snapshot intervals at 20 a second; three times the send interval under 2 to 5% loss). The client's estimate of server time is eased towards each snapshot, never jumped: jitter would make everyone jump with it.
- Lag compensation. The server keeps a second of history, and a shot carries the shooter's view time (server time minus interpolation delay); the server rewinds the target to that moment. Cap the rewind (Valorant does), or a player on 500 ms kills people half a second after they reached cover.
- Checksums. Server and clients hash the state they agree on every so often; a mismatch is a desync found early.
Fast objects: extrapolate along a curve
Cars and anything fast that collides (Watch Dogs 2; tested in Net/DeadReckoning.cs): draw it at the owner's time minus
one offset, interpolating inside the snapshot buffer and extrapolating past it along the yaw rate, not a straight line;
blend corrections in (projective velocity blending) instead of snapping. Numbers, the offset rule and collisions:
fast-objects.md.
3. Sending state to many players (the TRIBES model)
Starsiege TRIBES (1998) ran 128 players over modems by sorting data by what its delivery needs, and sending each
player only what matters to them, as partial updates. The C# example's Net/Replication.cs is that model, tested.
| Data | Needs | Example | In Godot 4.7 |
| Not guaranteed | Nothing; late is useless | an effect, a footstep | Unreliable RPC |
| Guaranteed | Every one, in order | chat, a goal, a spawn, a kill | Reliable RPC, MultiplayerSpawner; in the state packets when it names an object (below) |
| Most recent state | Only the latest value | position, health, ammo | MultiplayerSynchronizer with Always, or a replicator (below) |
| Soonest possible | Every packet | inputs (3 copies), the player's own state | in every snapshot |
| Static | Once, at connection | weapon and vehicle definitions | the game's data; send its id |
The rules, in short (detail and measurements in tribes.md): OnChange sends reliably, so use it only for
values that rarely change; number unreliable packets and resend nothing, each kind of data deciding what a loss means;
keep a dirty bit per state group per client; send each client only its scope, most important first within a byte
budget, and cap how many creations or overdue objects jump the queue per packet (GhostReplicator.MaxOverridesPerPacket).
- Events with the state. A
ReliableRPC beside a synchronizer travels on its own, so "player 7 spawned" can reach a client before player 7 does. Send events in the state packets, numbered; a lost packet's events go back to the head of the queue, and an event naming an object goes only once that object's creation is in the same packet or acknowledged (Net/EventStream.cs; at 20% loss, 11 events reached the client before their object without the wait, 0 with it). - Bits, not bytes. A bool in 1 bit, an int in what its range needs, a float as a step in a range
(
Net/BitPacker.cs;GhostFormatper state group): a position at 1/1024 m in a 2 km world, health, an animation and a flag fit in 7 bytes instead of 20. Godot'sStreamPeerBufferworks in whole bytes. - The client sets its rate. Each client says how many packets a second and how many bytes each it can take, and
may change it while playing; the server caps that by its own uplink and feeds it to the byte budget (
LinkBudget).
Halo: Reach's rules for each mechanic (predict the look and let the host decide the outcome; ask where the lag is hidden; change the mechanic when that hides it; warp the logic and blend the look): halo-reach.md. Lobbies, linked state, host migration and crossplay: sessions.md.
4. Godot 4.7 specifics
ENetMultiplayerPeer.CreateServer(port, maxClients): the client limit defaults to 32. Do not pass a channel count on 4.7.x: it lands in the incoming-bandwidth slot and the server throttles every client to a few bytes a second (thearchitecturerunner warns:enet-server-channels). Use transfer channels 1..N on RPCs anyway.- RPCs:
[Rpc(MultiplayerApi.RpcMode.AnyPeer, TransferMode = MultiplayerPeer.TransferModeEnum.UnreliableOrdered, TransferChannel = 1)]for inputs, reliable for events that must arrive (chat, a goal scored). CallRpcId(1, MethodName.SendInput, ...)only afterConnectedToServer. CheckMultiplayer.GetRemoteSenderId()on the server: never trust what a client says it is. A client asks withRpcId(1, ...); the server method ([Rpc(MultiplayerApi.RpcMode.AnyPeer)]) runs the sameCanPerformcheck again before it changes anything (DayZ). - Replicate the smallest state (Arma Reforger's drawer is one float) and derive animation, sound and labels from it on
every peer. Put the synchronizer in the base scene so inherited variants replicate; parts that detach or spawn at
run time are their own scenes in a
MultiplayerSpawner. MultiplayerSynchronizerreplicates properties (ReplicationInterval,DeltaInterval, visibility per peer) but does no prediction, interpolation or input acknowledgement: build those on top, or use netfox (MIT; GDScript, Netfox Sharp for C# is experimental). Resources and other objects cannot be synchronised.SceneMultiplayer.AllowObjectDecodingstays false: decoded objects can run code.- In the
AuthCallback(SendAuth/CompleteAuth) the client sends its build id and sorted enabled feature toggles; the server drops a peer whose list differs, saying why (Sea of Thieves, Rare, GDC 2018). - Headless Godot runs at about 144 frames a second unless capped: set
Engine.MaxFpson a server to its tick rate (about a third less CPU). A dedicated-server export adds thededicated_serverfeature tag (OS.HasFeature("dedicated_server")). Build and run the headless server from the first multiplayer commit, started from a config file that names a scenario scene: the shared map plus one logic node, so maps are not copied per mode. - Several peers in one process:
GetTree().SetMultiplayer(new SceneMultiplayer(), branch.GetPath())per branch, handy for a test with a server and many clients in one Godot. - ENet has no simulated lag. For tests: a
MultiplayerPeerExtensionthat wraps ENet and delays, reorders and drops unreliable packets (in C#, override_PutPacketScriptand_GetPacketScript), or Linuxtc qdisc ... netemwhere the kernel has it (GitHub's Ubuntu runners, with sudo; not every container). Keep game logic testable without Godot, like the C# example'sSimulatedLink.
Chat players can all use: one window for typed and transcribed messages, quick messages and pings beside text
chat, a speaking icon per player, incoming lines optionally read aloud; in the US, the CVAA (legal):
chat.md.
5. Rollback and lockstep
- Determinism first: integer or fixed-point state, seeded random numbers kept in the state, no wall-clock time, no
Dictionaryiteration order. .NET floats can differ between machines; on one machine and build they repeat. - GGPO's test (SyncTest): every frame, roll back, re-simulate and compare checksums. Run it at the full rollback depth,
DeterminismCheck.SyncTest(sim, inputs, depth: 7), in CI and as everyone's debug mode (NetherRealm's main tool from day one: correct code looks unchanged). Depth 1 misses state that goes stale over several frames. - A fixed input delay plus a rollback window. NetherRealm (Mortal Kombat X, Injustice 2) shipped 3 frames of delay and 7 of rollback: 10 frames, 333 ms of round trip at 60 Hz, over 99% of their matches; beyond it the game pauses. Keep the delay constant: their lockstep's 5 to 20 frames of varying delay broke combo timing. GGPO predicts at most 8.
- Tested session:
Net/Rollback.cs(RollbackSession,RollbackSettings,SavePolicy) withRollbackTests.cs; it predicts the last remote input received, so it rolls back only where the other player changed input. - Time sync. Nothing pulls two peers' clocks together: the one ahead rolls back the most, every frame (NetherRealm's beta: most matches had one player at 7 frames every frame). Slow the peer ahead by more than about 1.5 frames, at most about 2 ms a frame; a net pause felt far worse. Measured at 190 ms, 4 frames ahead: mean depth 7.0 without, 3.0 with.
- Saves. Every frame (GGPO), or only the confirmed frame, the last with everyone's input (NetherRealm): one save a tick instead of up to 8, but each rollback goes back to it, and when it is about to leave the window the game rolls back with nothing wrong. At 250 ms: 2.40 re-simulated frames a tick against 0.41, worst tick 9 steps and saves against 14; at 150 ms the worst tick is heavier. Extra saves between the confirmed frame and now cut their rollbacks by 30%.
- Boundaries. Never roll back across a camera cut, a cinematic or a finishing move. Act on anything that cannot be rolled back (pause menu, cinematics) only once it is older than the window, when both machines have it.
- Visuals. Gameplay drives visual state and never reads it back (IK joint positions desynced once IK stopped running in re-simulated frames). Particles, cloth and IK run on the rendered frame only; reuse an effect whose spawn situation matches instead of re-spawning it, or a non-deterministic effect pops. Snap to the corrected state: blending caused foot sliding.
- Re-simulation budget, AI and bots, players' machines (For Honor, Spelunky 2): rollback-field.md.
6. Prove it
Logic tests run without Godot over a simulated link (fast, seeded); soak runs the real game:
pwsh ${CLAUDE_PLUGIN_ROOT}/ci/godot/hyperdot.ps1 soak -Clients 8 -Seconds 600 -MaxGrowthMbPerHour 50 -Json -QuietThe game takes part through flags and printed lines: it is started with --soak-role=server|client, --soak-port,
--soak-id and --soak-players (-PlayersPerClient, for many players per process; the server gets the total), prints [soak] ready, [soak] metric <name> <number> and, when it detects a problem itself (a
checksum mismatch, a lost connection), [soak] fail <reason>. soak fails on a crash, an engine error, a process that
never got ready, or memory that keeps growing (soak-failed, engine-errors, soak-leak; a metric that climbs:
-MaxMetricGrowth name=limit, soak-metric-growth). At the end it sends the
server SIGTERM and reports whether it quit cleanly (soak.stop; -RequireCleanStop fails soak-unclean-stop).
- at 50, 100 and 250 ms round trip with jitter and 2% loss: the predicted player matches the server exactly, no input is lost, other players move one tick at a time, rewound hits register
- a checksum compares server and client state; a deliberate desync is caught
- bandwidth per client is measured (
ENetConnection.PopStatistic) and under a budget soakwith the expected number of players for 10 minutes on each change, and for hours on a schedule (a GitHub job runs at most 6 hours: split longer soaks, or use your own runner)- a 5 second blackout: clients recover without the server dropping them (Spelunky 2: 8% had cuts over 3 s)
On a 4-core runner, 50 clients as separate processes took about 8 GB and a core; the same 50 in one process (a
SceneMultiplayer per branch) took 184 MB and a sixth of a core. Leave the first seconds after many clients connect
out of any assertion (a connection storm loses inputs), give soak a -Warmup that covers it, and have each process
write its results to a file before it quits. Full-world snapshots stop working somewhere past 80 to 100 players: send
each player only what is in its scope, as partial updates (section 3).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

