Designing a multiplayer game
The strongest Plot games give every player a meaningful part in a result the group reaches together. Start from that relationship before choosing screens or technology.
Give each player a job
Ask what one player can know or do that the others cannot. A role does not need to be complicated: one person may see a clue, control a tool, make a choice, or confirm an answer. Avoid leaving one screen as the obvious leader while everyone else watches.
Make private information visually distinct and explain whether it should be read aloud, kept secret, or combined with another player's information.
Plot.gameState and
Plot.playerData are replicated to
every game copy, so UI-hidden data is not security-grade secret. That is fine
for cooperative social play, but do not use it for credentials, personal data,
purchases, or anti-cheat decisions.
Separate synchronized, transient, and local state
Model these separately in your game design:
- Game State belongs to the game session, is written by the host, and holds shared progress such as the phase, round, solved puzzles, and deadline.
- Player Data is additional session state that belongs to one player but is visible to the group, such as a clue, role, hand, score, or ready status.
- Channel messages are transient effects and frequently replaced values.
- Presentation state is temporary UI detail on one device, such as an open panel or animation, and should usually stay in the app.
Start with Plot.gameState for shared
state unless the value specifically belongs to one player. Never put
high-frequency realtime values in
Plot.gameState or
Plot.playerData; send them through
Plot.realtime.channels. This
separation makes reconnects, late joins, synchronization, and mobile performance
much easier to reason about later.
Store a player's current answer or vote in Player Data and shared results in Game State. Render progress from that synchronized state. A reliable channel listener does not wait for asynchronous state writes before recording delivery.
Coordinate around deadlines, not delays
Device clocks disagree, and one message can take longer to reach one player than another. When an event should happen at the same moment for everyone, represent it as a game-time deadline:
Persist that value in Game State and have every screen calculate its remaining time with
endsAtGameTimeMs - Plot.time.now(). Avoid
starting an independent thirty-second counter on receipt; network delay would
give each player a slightly different round. The
synchronized time guide includes the full pattern.
Design session states explicitly
A game usually needs more than its main play screen. Plan what a player sees while the game is:
- starting and waiting for
Plot.ready(); - waiting for the group;
- explaining roles or rules;
- actively playing;
- recovering from a temporary problem;
- showing a shared result or replay choice.
Do not let unresolved startup look like a frozen game. Give the player a short status message and a useful retry or exit path when appropriate.
Build for real devices
Treat a narrow mobile browser as the first viewport, then make the same app feel complete on desktop.
- Keep primary touch targets at least 44 by 44 CSS pixels.
- Do not require hover, precise dragging, or audio to understand an essential instruction.
- Handle browser zoom, dynamic mobile height, notches, and device rotation.
- Keep text readable in a dim room and never communicate state by color alone.
- Respect reduced motion and provide captions or text alternatives for important sound.
Test with several physical devices at once. Multiplayer timing and instructions often feel different in a real group than they do in several desktop tabs.
Plan graceful limits
Platform features can be unavailable because of browser support, user choice, or the current Plot release. Decide which features are required for the game and which have a fallback. A denied optional permission should not strand the whole group when a reasonable alternative exists.
Use the current API reference while implementing. Follow the Game State and Player Data guide for synchronized session state, the realtime channels guide for high-rate data, and the synchronized time guide for shared deadlines.