Shard<S: SimState>) are inspired by Colyseus’s Room API.
TL;DR
- Choose Colyseus if your game is the whole product, you’re already deep in Node, and you don’t need an app database / auth / file storage backing it.
- Choose Pylon if your game is one feature in a larger app, you want game state + app data + auth in one binary, or you don’t want to operate a Node server.
Architecture
| Pylon | Colyseus | |
|---|---|---|
| Runtime | Rust binary | Node.js |
| Game model | Shard<S: SimState> with tick loop | Room with setSimulationInterval |
| State sync | Snapshot delta over WebSocket | Schema-encoded deltas over WebSocket |
| Auth | Built-in | Bring your own |
| Database | SQLite/Postgres built-in | Bring your own |
| File storage | Built-in | Bring your own |
| Live queries (non-game data) | ✅ | ❌ |
| Single binary | ✅ | ⚠️ Node + your code |
Game-loop primitives
Both:- Run a fixed-rate tick loop server-side (Colyseus:
setSimulationInterval(ms), Pylon:tick_rate_hzinShardConfig) - Maintain authoritative state on the server
- Broadcast snapshot deltas to subscribed clients
- Accept inputs from clients (Colyseus:
onMessagehandlers; Pylon:apply_input_json) - Support reconnection
- Have built-in matchmakers
Where Colyseus is better
- More mature — 8+ years of production use, more integrations, more examples for specific game genres.
- Schema encoding — Colyseus’s
@typeschema decorators produce extremely compact binary deltas. Pylon’s snapshot delta is JSON; smaller for typical game state, but Colyseus is more bandwidth-efficient at scale. - Unity / Unreal SDKs — first-class. Pylon’s realtime client today is JS + Swift; for Unity you’d use Pylon’s WebSocket protocol manually (it’s simple, but not turnkey).
- Game-specific features — voice chat integration, lobby UIs, more nuanced matchmaker filters.
- Larger community — more discord activity, more YouTube tutorials, more stack overflow answers for game-dev specific problems.
Where Pylon is better
- Backend in one binary — Colyseus is “your game state”. You need Postgres or another DB for player profiles, leaderboards, cosmetic inventory, and a separate auth system. Pylon ships all of that in the same process.
- Live queries for UI — Pylon’s sync engine +
useQuerylets you build the lobby UI, friend list, leaderboard, etc. with server-authoritative reactive data. Colyseus rooms can broadcast state, but they’re not designed for “show me all my friends online” queries. - Auth + sessions — magic codes, OAuth, RBAC, all in the binary. Colyseus has middleware hooks but you build the auth flow.
- Single deployment unit — one Rust binary on a VPS. Colyseus needs Node + your DB + your auth service + your storage.
- Performance ceiling — Rust runs faster than Node for tick loops with non-trivial physics. For pure state-broadcast games (where the bottleneck is the network), they’re comparable.
- AOI built-in — Pylon’s
area_of_interestis part ofShard. Colyseus’s@filterdecorators provide manual per-property filtering; spatial AOI isn’t a primitive.
Self-host shape
| Pylon | Colyseus | |
|---|---|---|
| Install | cargo install pylon-cli | npm install colyseus + write your server |
| Run | pylon serve | node index.js |
| Backing services | None (SQLite included) | Postgres + Redis (for multi-process) |
| Process model | Single binary | Node app + dependencies |
Use case fit
| If you’re building… | Recommended |
|---|---|
| MMO with persistent world + characters | Pylon (game shards + entities + auth in one) |
| Quick web/mobile multiplayer (.io game style) | Either; Colyseus for Unity, Pylon for web |
| Turn-based strategy with matchmaking | Either |
| Real-time twitch shooter | Pylon (Rust tick loop) or Colyseus (mature Node) |
| Game with deep social features (chat, leaderboards, inventory) | Pylon (built-in) |
| Existing Node app adding multiplayer | Colyseus (drop into your stack) |
| Game where the backend is the product | Colyseus |
| Game that’s one feature in a broader app | Pylon |