Skip to main content

Overview

Godot provides a comprehensive networking system for creating multiplayer games. The system is built around MultiplayerAPI for high-level multiplayer functionality and various peer implementations for different networking backends.
Godot’s multiplayer system uses a client-server architecture by default, where one peer acts as the authoritative server.

Multiplayer Architecture

Client-Server Model

Godot uses a client-server architecture where:
  • Server - Authoritative peer that manages game state (peer ID = 1)
  • Clients - Connect to the server and send/receive updates
  • Peer-to-Peer - All peers can communicate, but one is designated as server

MultiplayerAPI

The MultiplayerAPI class provides high-level networking functionality:

Key Features

  • RPC (Remote Procedure Calls) - Call functions on remote peers
  • Automatic synchronization - Sync properties across network
  • Connection management - Handle peer connections/disconnections
  • Authority system - Control which peer owns which nodes

Basic Setup

RPC System

Remote Procedure Calls allow you to execute functions on other peers:

Basic RPC

RPC Modes

RPC Configuration Options

Use unreliable or unreliable_ordered for frequent updates like position that can tolerate packet loss.

Multiplayer Authority

Control which peer has authority over a node:

MultiplayerPeer

The MultiplayerPeer is the low-level networking backend:

Transfer Modes

Network Signals

Key signals for managing multiplayer connections:

Getting Connected Peers

On Android, enable the INTERNET permission in export settings, or all network communication will be blocked.

Best Practices

Always validate important game state on the server to prevent cheating. Clients should request actions, not dictate state.
Use reliable for critical events (damage, spawning) and unreliable for frequent updates (position, rotation).
Batch data when possible and avoid calling RPCs every frame. Use property synchronization for frequently changing values.
Always implement proper cleanup when peers disconnect to avoid orphaned nodes and data.
Use network simulation tools to test your game with realistic latency and packet loss.

See Also

High-Level Multiplayer

Learn about spawning and synchronization

Low-Level Networking

Understand ENet and WebSocket implementations

HTTP Requests

Make HTTP/REST API calls