Skip to content

Add secure multiplayer design guidance to high-level multiplayer documentation#11891

Open
deathtaco1408 wants to merge 4 commits intogodotengine:masterfrom
deathtaco1408:deathtaco1408-secure-multiplayer-docs
Open

Add secure multiplayer design guidance to high-level multiplayer documentation#11891
deathtaco1408 wants to merge 4 commits intogodotengine:masterfrom
deathtaco1408:deathtaco1408-secure-multiplayer-docs

Conversation

@deathtaco1408
Copy link
Copy Markdown

Summary

This PR adds a short "Secure multiplayer design" subsection to the high-level multiplayer docs.

Why

The current page already warns that networked applications can become vulnerable to cheats or
exploits, but it does not give practical guidance on how to structure multiplayer logic more
securely.

This addition gives developers a short set of actionable recommendations:

  • treat client input as untrusted
  • prefer server-authoritative logic
  • validate RPC arguments
  • avoid trusting critical client-reported state directly

It also documents that high-level RPC calls should remain on Node-derived classes, which relates
to existing confusion reported in issue #89981.

Scope

Documentation only. No engine behavior changes.

Added guidelines for secure multiplayer design in Godot's high-level multiplayer API, emphasizing server-authoritative logic and validation of client inputs.
Added a section on secure multiplayer design, emphasizing the importance of server-authoritative logic and validation of client inputs to prevent cheating and desynchronization in networked games.
Added a note about RPC methods and Node-derived classes.
@deathtaco1408 deathtaco1408 requested review from a team as code owners March 31, 2026 03:56
@Calinou Calinou added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:multiplayer labels Apr 2, 2026
Comment thread tutorials/networking/high_level_multiplayer.rst Outdated
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>

High-level multiplayer is designed for convenience, not as a complete anti-cheat solution. If your
game has strict fairness, persistence, or security requirements, design your networking so that the
server remains the source of truth for important state.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
server remains the source of truth for important state.
server remains the source of truth for important states.

- Use server-authoritative logic for gameplay-critical decisions.
- Validate RPC arguments before applying them to game state.
- Avoid trusting client-reported positions, timers, cooldowns, or resource values without checks.
- Add sanity checks and rate limits to actions that can be triggered frequently.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Add sanity checks and rate limits to actions that can be triggered frequently.
- Add safety checks and rate limits to actions that can be triggered frequently.

In general, prefer the following patterns:

- Use server-authoritative logic for gameplay-critical decisions.
- Validate RPC arguments before applying them to game state.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Validate RPC arguments before applying them to game state.
- Validate RPC arguments before applying them to the game state.

automatically make gameplay logic secure. For competitive or persistent multiplayer games, treat
all client input as untrusted.

A common mistake is to let clients authoritatively decide important game state, such as player
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A common mistake is to let clients authoritatively decide important game state, such as player
A common mistake is to let clients authoritatively decide important game states, such as player

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:multiplayer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants