Colyseus Authoritative Multiplayer
SkillSecurityUse when planning, implementing, or QA-reviewing MMOOMM realtime multiplayer with Colyseus rooms, server-authoritative simulation, room authentication, Schema state, fixed tick processing, client interpolation or reconciliation, reconnection, or MVP scaling. Applies to `@universo-react/colyseus-server` wrapping `@colyseus/core@0.17.43` and `@universo-react/colyseus-client` wrapping `@colyseus/sdk@0.17.42`.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Colyseus Authoritative Multiplayer skill
What this skill tells your AI
The instructions your AI receives, as published by teknokomo/universo-platformo-react in .agents/skills/colyseus-authoritative-multiplayer/SKILL.md and read by ahel’s review.
Use this skill for server-authoritative MMOOMM multiplayer work using the Universo Colyseus wrappers.
Version And Package Guards
- Server room code uses
@universo-react/colyseus-server, currently wrapping@colyseus/core@0.17.43. - Browser client code uses
@universo-react/colyseus-client, currently wrapping@colyseus/sdk@0.17.42. - The package registry currently exposes the client wrapper as client-targeted. Do not tell agents to import it from server modules unless registry metadata and compiler rules are deliberately changed later.
- Do not assume
colyseus.jsor the fullcolyseuspackage is available.
Required Output
For each multiplayer plan or implementation, state:
- room lifecycle hooks used;
- authentication and auth payload contract;
- authoritative state owner and Schema structure;
- message validation strategy;
- fixed tick and input queue behavior;
- client interpolation/prediction/reconciliation behavior;
- reconnect behavior and user-facing states;
- scaling assumptions for the MVP.
Workflow
- Authenticate with static
onAuthbeforeonJoinwhen possible. - Initialize room state in
onCreate. - Add clients and auth-derived player state in
onJoin. - Accept input intents from clients, not authoritative world state.
- Validate message shape with project Zod patterns when shape matters.
- Process queued inputs on a fixed server tick.
- Mutate Schema state as the authoritative source.
- Render clients with interpolation and optionally prediction/reconciliation.
- Use
onDrop,allowReconnection,onReconnect, andonLeavefor temporary disconnects and permanent leaves. - Clean up timers, external resources, and room-owned state in
onDispose.
Blocking Rules
- Do not trust client coordinates, inventory, physics results, or progression as authoritative.
- Do not use React state as canonical multiplayer state.
- Do not casually replace the room state root after initialization.
- Do not design flat oversized schemas that ignore Colyseus Schema limits.
- Do not skip auth because a room is "just a game".
- Do not show raw Zod, Colyseus, WebSocket, room, session, or server errors on normal user-facing surfaces.
- Do not require
@colyseus/commandfor MVP room logic; keep it optional until complexity justifies it and dependencies are approved.
References
- Read
references/colyseus-room-lifecycle.mdfor room hooks, auth, reconnect, and cleanup. - Read
references/colyseus-state-and-tick.mdfor Schema design, fixed tick, input queues, interpolation, and reconciliation. - Read
references/colyseus-reconnect-and-scale.mdfor reconnection UX and MVP scaling notes.
Signals
- GitHub stars
- 22
- Forks
- 3
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
colyseus-authoritative-multiplayer- Source
- github.com/teknokomo/universo-platformo-react