NEVER assume 4.6 defaults (stretch mode, audio area_mask, RichTextLabel percent flags) without checking 4.7 migration notes.
Multiplayer Networking
Server authority, prediction/reconcile, secure RPCs, and interest culling — not a high-level multiplayer tutorial.
NEVER Do (Expert Networking Rules)
Core Architecture
NEVER use Reliable for high-frequency data (Position/Movement) — Reliable packets block all following packets until acknowledged (Head-of-Line blocking). Use UnreliableOrdered.
NEVER trust the client for shared state (Health/Money/Inventory) — Clients should only suggest actions. The Server MUST validate and broadcast the result.
NEVER hardcode the Server IP — Always allow for discovery (net_lan_discovery.gd) or pass the IP via CLI/UI.
Performance & Bandwidth
NEVER send the same data every frame — Use net_adaptive_sync_throttle.gd to only send updates when state changes significantly or at fixed Hz intervals (e.g., 20Hz).
NEVER use JSON for high-speed synchronization — String serialization is massive over the wire. Use bit-packing (net_packet_bit_packer.gd) to keep packets under 100 bytes.
NEVER broadcast to all peers if it's not needed — In large worlds, use Interest Management (net_visibility_grid_culling.gd). A player in the forest doesn't need the position of a player in the city.
Security
NEVER allow unlimited RPC calls per second — An attacker can flood the server with 1,000 "Attack" RPCs to crash the game. Use net_packet_rate_limiter.gd.
NEVER expose PeerIDs to the end-user — PeerIDs are internal. Always map them to persistent UserIDs (net_custom_id_mapper.gd) from a database.
NEVER run a dedicated server with a GUI enabled — Use --headless (net_headless_server_auto_start.gd) to save resources and ensure stability.
Decision Tree (transport / authority / sync Hz)
| Question | Prefer | Script |
|----------|--------|--------|
| Desktop/console LAN or dedicated UDP | ENet | MANDATORY net_enet_expert_config.gd |
| Browser / NAT-hostile peers | WebRTC (or WebSocket fallback) | Official Docs + peer wrappers; still use secure RPC scripts |
Delta-compression + network simulator concepts live in that reference (LLM-ignorance: unreliable vs reliable HoL blocking is NOT generic knowledge).
Reference
> Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.
Official Documentation
High-level multiplayer — RPC modes, authority, and peer lifecycle for host/join lobbies and server-validated actions.
Networking — Transport map (ENet / WebSocket / WebRTC / HTTP) so peer choice matches platform and NAT constraints.