junmystery/agent-guidance-rust/godot-multiplayer
Claude Code and agent skill by junmystery/agent-guidance-rust
- community
Checking that the SKILL.md file is still in the repository.
Build networked games with Godot 4.7 high-level multiplayer: set up an ENetMultiplayerPeer server/client, define RPCs with the @rpc annotation (call via rpc()/rpc_id()), set per-node multiplayer authority, and replicate state with MultiplayerSpawner and MultiplayerSynchronizer. Use when adding multiplayer/networking to a Godot project, writing @rpc functions, or syncing player/world state across peers.
Install
npx vskill@latest install junmystery/agent-guidance-rust/godot-multiplayerSKILL.md
The same SKILL.md was published earlier as gamedev-skills/awesome-gamedev-agent-skills/godot-multiplayer.
Godot Multiplayer (4.x high-level)
Connect peers, call functions remotely with @rpc, assign authority, and replicate state with MultiplayerSpawner/MultiplayerSynchronizer. Targets Godot 4.7 (ENet). Treat all client input as untrusted; keep the server authoritative.
When to use
- Use when adding networked multiplayer: hosting/joining over ENet, calling RPCs,
assigning per-node authority, or auto-spawning/syncing nodes across peers.
When *not* to use: local split-screen (no networking); raw TCP/UDP/WebSocket protocol work (low-level PacketPeer); HTTP requests. For save/persistence → save-systems.
Core workflow
- Create a peer (
ENetMultiplayerPeer), callcreate_server(port, max)or
create_client(ip, port), and assign it to multiplayer.multiplayer_peer. The server's unique ID is always 1; clients get random positive IDs.
- Handle connection signals on
multiplayer:peer_connected(id),
peer_disconnected(id), connected_to_server, connection_failed, server_disconnected.
- Define RPCs with
@rpc(...). Call them on aCallableviarpc()(all peers) or
rpc_id(peer_id) (one peer). Inside, multiplayer.get_remote_sender_id() tells you who sent it.
- Keep RPC signatures identical on every peer that runs the script — Godot checksums
all @rpc methods in a script; a mismatch prints errors that can name an unrelated RPC.
- Assign authority per node with
set_multiplayer_authority(id); gate input/RPCs by
is_multiplayer_authority().
- Replicate state with
MultiplayerSpawner(auto-instances scenes on clients) and
MultiplayerSynchronizer (auto-syncs selected properties).
- Validate on the server. Don't trust client-reported positions/results.
Patterns
1. Host or join (ENet)
2. RPCs: client sends input to the server (any_peer, call_local)
This script sits on a player avatar whose authority is the owning client (Pattern 3), so the server is not the node's authority. A server→clients RPC on such a node must be "any_peer" and check that the sender is the server.
3. Per-node authority (each player controls their own avatar)
4. MultiplayerSynchronizer config (editor + replication)
Pitfalls
- RPC signature checksum. Every
@rpcmethod in a script must exist with the same
declaration on both client and server builds — even unused ones. A mismatch causes errors that may point at the wrong function. Argument names/count are not checked, but the set of RPCs and their annotations are.
- Default `@rpc` is `"authority"`. Clients calling it are ignored unless you set
"any_peer". Use "call_local" so the host (also a player) runs it too.
- `RPC 'x' is not allowed on node ... from: 1. Mode is "authority"` → the server called
an "authority" RPC on a node a client owns. "Authority" means the node's authority, not the server. Use "any_peer" plus a get_remote_sender_id() == 1 check, or move server-driven RPCs to a server-owned node (e.g. a game manager).
- NodePaths must match across peers. RPC routing uses the node's path/name; spawn nodes
with identical names on all peers (use MultiplayerSpawner or add_child(node, true) for readable, deterministic names).
- Trusting the client. Never let clients set authoritative state (health, position,
hits) directly. Send intent, validate on the server, then broadcast results.
- RPC on non-Node classes fails.
@rpcmethods must be onNode-derived classes, not
plain Resource/RefCounted.
- RPCs don't serialize Objects/Callables. Pass plain data (ints, strings, arrays,
dictionaries, PackedArrays).
- Forgetting to reset the peer. To disconnect cleanly, set
multiplayer.multiplayer_peer = OfflineMultiplayerPeer.new().
- Android needs INTERNET permission in the export preset or all networking is blocked.
References
- For
MultiplayerSpawnersetup, transfer modes/channels,SceneMultiplayer
authentication (auth_callback/complete_auth), a lobby skeleton, and dedicated-server export notes, read references/replication-and-rpc.md.
Related skills
godot-nodes-scenes— instancing the scenes that get spawned/synced.godot-signals-groups— connection signals and event flow.godot-export— exporting a headless dedicated server build.
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 repositoryCheckingskills/godot-multiplayer/SKILL.md
Popularity
- 7-day trend score
- 5
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/junmystery/agent-guidance-rust/godot-multiplayer)