This skill guides an agent through Godot 4.7 high-level multiplayer: creating an ENet host or client, handling connection signals, defining @rpc methods, assigning per-node authority and replicating state with MultiplayerSpawner and MultiplayerSynchronizer. It treats all client input as untrusted and keeps the server authoritative.
It includes patterns for hosting and joining, client-to-server RPCs with validation, per-player authority, a synchronizer configured entirely from code, and host or join from command-line arguments. A two-instance headless smoke test starts a server and a client and checks both logs for the handshake and for error lines.
What You Get
- A core workflow from creating the peer to server validation and a two-instance smoke test
- GDScript patterns for host and join, RPCs, per-node authority, a code-configured synchronizer and command-line host or join
- A shell recipe that runs a server and a client headless and greps both logs for errors and handshake lines
- A gotcha list for RPC modes, checksum mismatches, node path mismatches, untrusted clients and Android permissions
Common Use Cases
- Adding host and join to a Godot co-op game over LAN or the internet
- Fixing an RPC that is rejected or a spawned node that is missing on clients
- Giving each player authority over their own avatar while the server validates actions
- Checking that a networked build starts and connects before asking a person to test it
What Makes It Unique
Most multiplayer guides stop at the API. This skill adds a runnable two-process check using command-line user arguments, with a pass condition read from the logs, and falls back to asking the user for logs when no Godot binary exists. It also explains the default authority RPC mode trap, where a server call to a client-owned node is dropped.
Under The Hood
The agent loads the SKILL.md and, when needed, a reference on RPC arguments, spawn functions, visibility filters, authentication and a lobby skeleton. For the smoke test it runs commands in your project: it starts a headless Godot server in the background and a headless client, both wrapped in timeouts, with logs written to files and searched with grep. The server listens on a local port and the client connects to the loopback address, so it uses the local network. The skill also has the agent edit GDScript to read host and join arguments. It makes no calls to outside services.