godot-setup-multiplayer
SKILL.md
Setup Multiplayer Networking (Godot 4.x)
Core Principle
Godot 4.x replaces the old remote func system with the High-Level Multiplayer API using MultiplayerSpawner, MultiplayerSynchronizer, and @rpc annotations. Authority determines who controls what—server authority is the default safe pattern.
What Changed from Godot 3.x
| Godot 3.x | Godot 4.x |
|---|---|
remote func |
@rpc annotation |
remotesync |
@rpc(any_peer, call_local) |
master |
@rpc(authority) with is_multiplayer_authority() |
slave |
@rpc called from non-authority |
get_tree().network_peer |
multiplayer.multiplayer_peer |
| Custom sync | MultiplayerSynchronizer |
| Custom spawn | MultiplayerSpawner |