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
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 — longer production history, more integrations, more examples for specific game genres.
- Schema encoding — Colyseus’s
@typeschema decorators produce compact binary deltas. Pylon’s shard payloads are simpler JSON today; Colyseus is usually more bandwidth-efficient at scale. - Game engine SDKs — Unity SDK support and codegen tooling. Pylon’s realtime client today is JS + Swift; for Unity you’d use Pylon’s WebSocket protocol manually.
- Game-specific primitives — rooms, matchmaking, state-sync patterns, and per-client state views are mature.
- Larger community — more tutorials and 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 supports per-client filtering through StateView patterns, but spatial AOI is not the same high-level primitive.
Self-host shape
Both deploy to a Linux VPS. Colyseus’s “standard Node.js application” is straightforward to deploy; Pylon ships as one Rust binary (it spawns a bundled Bun runtime for any TypeScript functions/SSR you add), which keeps the deploy close to “drop and run.”
Use case fit
Migrating from Colyseus
The mental model translates almost directly:Honest weakness
Pylon’s realtime shard system is newer. Colyseus has 8 years of production hardening, edge-case fixes, integration guides, and deployment patterns. For mission-critical multiplayer where every minute of downtime costs money, Colyseus’s maturity is a real asset. Pylon’s shard implementation is built on the samepylon_realtime primitives the Pylon team uses internally. It’s tested, but not yet at Colyseus’s deployment-count level.