hermeticormus/claude-code-game-development/multiplayer-networking
Claude Code and agent skill by hermeticormus/claude-code-game-development
- community
Checking that the SKILL.md file is still in the repository.
Netcode reference patterns: a model comparison, a common mistakes catalog (rubber-banding, desync, bandwidth), delta encoding and quantization, reconciliation smoothing, a Unity library comparison, NAT traversal, and Godot MultiplayerSynchronizer, prediction, interpolation, and ENet setup. Use when writing or debugging networked game code.
Install
npx vskill@latest install hermeticormus/claude-code-game-development/multiplayer-networkingSKILL.md
Multiplayer networking pattern library
Reference patterns for game multiplayer netcode.
Netcode model comparison
| Model | Best for | Latency tolerance | Bandwidth | Determinism required | |
|---|---|---|---|---|---|
| Rollback | Fighting games | Very tight | Low | Yes | |
| Lockstep | RTS, lockstep RTS | Tolerant | Very low | Yes | |
| Client prediction + reconciliation | FPS, MOBA, action | Medium | Medium | No | |
| Server-authoritative + interpolation | Racing, MMO movement | Tolerant | Medium-high | No | |
| Pure state snapshots | Slow-paced games | Very tolerant | High | No |
Common mistakes catalog
"Rubber-banding when player runs forward"
The player's client predicts forward motion. Server agrees and confirms. No rubber-band. Then player turns; client predicts turn; server says "no, you didn't turn yet" because the turn input hadn't reached the server when the server's last tick fired. Server position is one tick behind; client snaps back.
Fix: smooth reconciliation. When server position differs from predicted, interpolate over 100-200ms rather than snapping.
"I shot them dead-on and missed"
Favor-the-target policy. Server's "current" state is what counts; if your shot took 50ms to reach the server, the target may have moved. Either:
- Switch to favor-the-shooter (lag compensation)
- Use projectile weapons (the projectile travels in server time, no compensation needed)
"I was shot around a corner"
Favor-the-shooter policy working as intended. The shooter saw you at their lag-compensated time; you've since moved behind cover. You're dead on the server before you visually see the threat.
Mitigation: limit lag compensation window (e.g., 100ms max, not 250ms).
"Multiplayer works in lab, breaks on mobile data"
Mobile cellular has higher jitter and occasional packet loss. Check:
- Tick rate too high for cellular bandwidth budget
- No packet loss tolerance (UDP without reliability layer)
- No connection migration on IP change (mobile data → WiFi)
- Power-save modes throttling background packets
"Desync after 30 seconds in lockstep RTS"
Nondeterminism. Audit:
- Float math anywhere in game state → switch to fixed-point
- RNG → seed at game start, use same RNG instance for all clients
- Iteration order over collections → use ordered collections (List, sorted Dictionary)
- Time-based logic → use tick count, not wall clock
- Third-party libraries → check determinism guarantees
"Bandwidth balloons at high player counts"
Need interest management:
- Don't replicate everyone to everyone
- Each client subscribes to entities within its area of interest (visible + nearby)
- Cell-based partitioning or proximity-based subscription
"Rollback budget exceeded constantly"
Either:
- RTT too high for the chosen input delay; increase input delay
- State serialization is too slow; profile + optimize
- Game state contains nondeterministic elements making rollback impossible
"Players desync on resume from sleep / app backgrounding"
Game logic kept advancing while suspended (timer-based), or stopped while suspended (frame-based). Either way, syncing the resumed client requires state download from server.
Pattern: on resume, request full state from server before resuming play.
Bandwidth optimization patterns
Delta encoding
Quantization
- Position: from 32-bit float to 16-bit fixed-point (sub-mm precision over 1km range): 50% size reduction
- Rotation: from quaternion to compressed quaternion (smallest 3 + sign bit): 4 bytes → ~1.4 bytes
- Velocity: 8-bit per axis when bounded: 32 bytes → 3 bytes
- Time stamps: relative to a known epoch, 16-bit fits ~64 seconds at 1ms precision
Bit packing
Priority queues
When bandwidth budget is tight:
Reconciliation smoothing
Library comparison (Unity)
| Library | Type | Maturity | Recommendation | |
|---|---|---|---|---|
| Netcode for GameObjects (NGO) | First-party from Unity | Active | Default for new projects | |
| Mirror | Open source, community-maintained | Mature | When NGO doesn't fit your model | |
| FishNet | Open source, performance focus | Mature | When you need raw performance | |
| Photon Fusion | Commercial, hosted | Mature | When you want hosted matchmaking + rooms | |
| Nakama | Open source backend, multi-engine | Mature | When you want generic multiplayer backend | |
| PlayFab | Microsoft commercial | Mature | Enterprise / live ops focus | |
| Edgegap | Dedicated server hosting | Mature | When you need dedicated server scaling |
For Godot: built-in MultiplayerAPI is solid for small projects. Nakama for larger projects + backend services.
For Unreal: built-in networking + replication graph is industry-standard.
NAT traversal reference
| Connection type | Strategy | |
|---|---|---|
| Both peers same LAN | Direct connection | |
| One peer has public IP | Direct to public peer | |
| Both peers behind NAT (cone or restricted-cone) | STUN | |
| Both peers behind symmetric NAT | TURN (relay through server) | |
| ICE handles selection between STUN + TURN |
Steam's P2P API + Photon Cloud + Nakama all handle this for you. If self-hosting, integrate coturn (open source TURN server) or use Cloudflare's tier.
Godot MultiplayerSynchronizer Setup
Client-Side Prediction with Reconciliation
Entity Interpolation for Remote Players
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/multiplayer-networking/skills/multiplayer-networking/SKILL.md
Popularity
- Repository stars
- 65
- Repository forks
- 11
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hermeticormus/claude-code-game-development/multiplayer-networking)