CtrlK
BlogDocsLog inGet started
Tessl Logo

pantheon-ai/colyseus-multiplayer

Build authoritative real-time multiplayer servers with Colyseus 0.17+. Use when implementing rooms, schema state sync, client message validation, matchmaking, authentication, reconnection handling, or server-side anti-cheat constraints. Keywords: colyseus, room lifecycle, schema, multiplayer, websocket, matchmaking, onJoin, onLeave, onDrop, allowReconnection.

Overall
score

99%

Does it follow best practices?

Validation for skill structure

Overview
Skills
Evals
Files

matchmaking-and-reconnection.mdreferences/

Matchmaking and Reconnection

Use this reference for room discovery, filtering, and reconnect workflows.

Matchmaking Rules

  • Set room metadata in onCreate for mode/region/skill filters.
  • Use metadata and seat availability in matchmaking selection.
  • Keep metadata consistent with room runtime state.

Reconnection Pattern

  1. In onDrop, mark player as disconnected.
  2. Allow reconnection for a bounded timeout.
  3. Restore session if token is valid.
  4. Expire and remove player if timeout passes.

Example Timeout Policy

  • Casual match: 20-30 seconds grace.
  • Ranked match: 10-15 seconds grace.
  • Tournament: strict policy with admin override.

Operational Checks

  • Reconnected clients rebind to prior player state.
  • Duplicate sessions for same player are rejected.
  • Expired reconnection tokens are invalidated.

Install with Tessl CLI

npx tessl i pantheon-ai/colyseus-multiplayer@0.1.0

references

matchmaking-and-reconnection.md

message-validation-and-security.md

room-lifecycle-and-state.md

SKILL.md

tile.json