Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers Godot 4.3+ multiplayer basics: MultiplayerAPI, ENet and WebSocket peers, @rpc annotations, authority, and Godot 3 syntax migration.
86% 86%0 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 19 of 22 without it.
This test ran on v1. v4 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, C# follows.
Related skills: multiplayer-sync for state synchronization and interpolation, dedicated-server for headless export and server deployment.
Godot uses a client-server model built on top of MultiplayerAPI. One peer acts as the server; all others are clients. Every peer has a unique integer ID assigned by the network layer:
| Peer ID | Role |
|---|---|
1 | The server (always) |
2+ | Connected clients — randomly generated unique IDs, not sequential |
Multiplayer authority is the concept of ownership over a node. Only the authoritative peer should read input and drive that node's state. By default the server (peer 1) is the authority for every node. Call set_multiplayer_authority(peer_id) to transfer ownership to a client — on every peer, since the call is local and is not replicated.
Server (peer 1)
├── Owns game state by default
├── Spawns and validates objects
└── Routes RPCs
Client (peer 2, 3, …)
├── Sends input to server via RPC
└── Receives state updates from server
Both sides use the same three steps: create an ENetMultiplayerPeer, call create_server(port, max_clients) or create_client(address, port), then assign it to multiplayer.multiplayer_peer and connect the MultiplayerAPI signals (peer_connected, peer_disconnected, connected_to_server, connection_failed, plus server_disconnected — see §7). Check the create_* return value — it returns an Error, and a silent ERR_CANT_CREATE (port already in use) otherwise looks exactly like a hang.
The server is always peer ID 1; clients receive randomly generated unique IDs, so never assume they are sequential.
Full server and client implementations with every signal handler, in GDScript and C#: references/enet-setup.md
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.