Tooluck logoTooluck
SKILL.md

godot-multiplayer

Agent skill fromgamedev-skills/awesome-gamedev-agent-skills

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.

How to install godot-multiplayer

install godot-multiplayer
# install the awesome-gamedev-agent-skills pack with the skills CLI
npx skills add gamedev-skills/awesome-gamedev-agent-skills

# or add only this skill to Claude Code: copy the folder

skills/godot/godot-multiplayer/

# into

~/.claude/skills/godot-multiplayer/ (all projects)

.claude/skills/godot-multiplayer/ (one project)

skills/godot/godot-multiplayer/SKILL.md

Apache-2.0Full file
1# Godot Multiplayer (4.x high-level)
2
3Connect peers, call functions remotely with `@rpc`, assign authority, and replicate state
4with `MultiplayerSpawner`/`MultiplayerSynchronizer`. Targets **Godot 4.7** (ENet). Treat
5all client input as untrusted; keep the server authoritative.
6
7## When to use
8
9- Use when adding networked multiplayer: hosting/joining over ENet, calling RPCs,
10 assigning per-node authority, or auto-spawning/syncing nodes across peers.
11
12**When *not* to use:** local split-screen (no networking); raw TCP/UDP/WebSocket protocol
13work (low-level `PacketPeer`); HTTP requests. For save/persistence → `save-systems`.
14
15## Core workflow
16
171. **Create a peer** (`ENetMultiplayerPeer`), call `create_server(port, max)` or
18 `create_client(ip, port)`, and assign it to `multiplayer.multiplayer_peer`. The
19 server's unique ID is always `1`; clients get random positive IDs.
202. **Handle connection signals** on `multiplayer`: `peer_connected(id)`,
21 `peer_disconnected(id)`, `connected_to_server`, `connection_failed`,
22 `server_disconnected`.
233. **Define RPCs** with `@rpc(...)`. Call them on a `Callable` via `rpc()` (all peers) or
24 `rpc_id(peer_id)` (one peer). Inside, `multiplayer.get_remote_sender_id()` tells you who
25 sent it.
264. **Keep RPC signatures identical** on every peer that runs the script — Godot checksums
27 all `@rpc` methods in a script; a mismatch prints errors that can name an unrelated RPC.
28…

Excerpt shown under the repository's Apache-2.0 license.

More skills in awesome-gamedev-agent-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates