godot-adapt-single-to-multiplayer
Expert patterns for adding multiplayer to single-player games including client-server architecture, authoritative server design, MultiplayerSynchronizer, lag…
от thedivergentai★ 1 019 звёзд на GitHub
Установить godot-adapt-single-to-multiplayer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
NEVER Do (Expert Multiplayer Rules)
Security & Authority
- NEVER trust client-reported state — Clients own their 'Input', NOT their 'Position' or 'Health'. Server must validate every coordinate and health change.
- NEVER use
get_tree()groups for authority checks — Useis_multiplayer_authority(). Group registration is non-deterministic in high-latency joins. - NEVER allow unrestricted RPC rates — A malicious client can call a 'FireWeapon' RPC 10,000 times per second. Always implement rate-limiting (
net_rpc_rate_limiter.gd).
Movement & Lag
- NEVER skip Client-Side Prediction — Movement without prediction feels 'heavy' and unresponsive. Predict movement locally, then correct only on server disagreement.
- NEVER sync peers at 60Hz — Sending entire state every frame will saturate client bandwidth. Use a lower tick-rate (20-30Hz) and interpolate between packets.
- NEVER snap peer positions — Abrupt position updates cause 'jitter'. Store a buffer of past states and lerp between them with a 100ms delay.
Bandwidth & Sync
- NEVER sync 'Full Floats' if possible — Quantize Vector3 data (truncating decimals) to save 50%+ bandwidth. Use
MultiplayerSynchronizerwith delta-sync enabled. - NEVER ignore 'Late Joiners' — Players who join mid-game won't see existing environmental changes. Broadcast a full world-state 'Snapshot' on peer connection.
- NEVER test on 0ms ping — Everything works on localhost. Use a simulator (
net_latency_simulator.gd) with 150ms ping to identify sync bugs.
Available Scripts
MANDATORY: Architecture decision tree first, then golden-path scripts. Deep latency workflows →
references/latency-testing.md.
Authority / transport bridges
multiplayer_sync.gd
MANDATORY when adding MultiplayerSynchronizer interpolation for remote peers. Trigger: authority owns transforms; non-authority interpolates.
rpc_bridge.gd
MANDATORY signal→RPC bridge. Trigger: gameplay emits local signals; bridge validates authority and fans out RPCs.
Prediction / lag / lobby
net_prediction_reconciliation.gd
CharacterBody prediction + input-buffer replay for server reconciliation.
net_snapshot_interpolation.gd
Snapshot interpolation / jitter buffers for remote peers.
net_auth_server_validator.gd
Authoritative validation (position, speed, actions).
net_rpc_rate_limiter.gd
RPC flood / macro protection.
net_interest_management.gd
Distance-based visibility to cut bandwidth.
net_delta_compression_sync.gd
Quantization + significance checks for delta sync.
net_lag_compensation.gd
Server-side rewind for hit registration.
net_lobby_late_join_sync.gd
Late-joiner world snapshot bootstrap.
Diagnostics
net_latency_simulator.gd
MANDATORY before ship — see references/latency-testing.md.
net_debug_overlay_monitor.gd
RTT / loss / jitter overlay.
net_upnp_discovery_logic.gd
UPNP port mapping for listen-server / P2P hosts.
Architecture Patterns
| Pattern | When | Script golden path |
|---|---|---|
| Authoritative server | PvP, economies, cheat risk | rpc_bridge.gd → net_auth_server_validator.gd → prediction/recon |
| P2P lockstep | 2–4 co-op, low cheat risk | Deterministic inputs + net_upnp_discovery_logic.gd |
| Hybrid / host authority | Party games 4–8 | Host authority + late-join snapshot |
Migration golden path (no inline host/join tutorials)
- Separate input (client) from simulation (authority).
- Set
multiplayer_authorityper player node; clients send intents only. - MANDATORY
multiplayer_sync.gdfor property replication / remote interpolation. - MANDATORY
rpc_bridge.gdfor gameplay events that cross the wire. - Add prediction / lag compensation scripts only for the genres that need them.
- Validate with latency-testing reference +
net_latency_simulator.gdat ~150 ms RTT.
Expert insights (WHY — keep in body)
- Client prediction — WHY: without local sim, RTT doubles perceived input lag. Replay buffered inputs after server correction (net_prediction_reconciliation.gd).
- Interpolation buffer — WHY: raw sync packets jitter; lerp between snapshots with ~100 ms delay (net_snapshot_interpolation.gd).
- Hit rewind — WHY: clients fire at past world state; server
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/authority-and-security.md
- references/latency-testing.md
- references/migration-notes.md
- references/prediction-and-reconciliation.md
- scripts/multiplayer_sync.gd
- scripts/net_auth_server_validator.gd
- scripts/net_debug_overlay_monitor.gd
- scripts/net_delta_compression_sync.gd
- scripts/net_interest_management.gd
- scripts/net_lag_compensation.gd
- scripts/net_latency_simulator.gd
- scripts/net_lobby_late_join_sync.gd
- scripts/net_prediction_reconciliation.gd
- scripts/net_rpc_rate_limiter.gd
- scripts/net_snapshot_interpolation.gd
- scripts/net_upnp_discovery_logic.gd
- scripts/rpc_bridge.gd
FAQ
Что делает скилл godot-adapt-single-to-multiplayer?
Expert patterns for adding multiplayer to single-player games including client-server architecture, authoritative server design, MultiplayerSynchronizer, lag compensation (client prediction, server reconciliation), input buffering, and anti-cheat measures. Use when retrofitting multiplayer, porting to online play, or designing networked gameplay. Trigger keywords: MultiplayerPeer, ENetMultiplayerPeer, SceneMultiplayer, MultiplayerSynchronizer, rpc, rpc_id, multiplayer_authority, client_prediction, server_reconciliation, lag_compensation, rollback.
Как установить скилл godot-adapt-single-to-multiplayer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл godot-adapt-single-to-multiplayer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…