Multiplayer Framework
Free and Open-source. Built on Node.js.
Supports your favorite engine & platform
- Server-authoritative
- Room-based system
- State synchronization
- Match-making API
- Scale horizontally or vertically
- JavaScript/Node.js ecosystem
- MIT License
Architecture / Stack
A solid stack so you can focus on your game instead of re-inventing the wheel.
Node.js Runtime
Node.js is an asynchronous event-driven JavaScript runtime, designed to build scalable network applications.
Learn about Node.jsNetworking Transport
WebSockets is used as transport layer. Documentation
Support for WebTransport is in our public roadmap.
Room-based system
On-demand, stateful rooms are spawned per client request.
See moreMessage Serialization
For state sync, we use our own binary delta serializer. For every other message, we use the fastest MessagePack serializer available for JavaScript.
Web / API Routes
Define your own custom API routes via Express or µWebSockets.js
See moreDatabase / Storage / Authentication
Bring your favorite Node.js tool here. You are free to choose which database or authentication provider to use.
(An official recommendation is coming soon).
Rooms & Match-making
Let clients spawn and join into multiple rooms.
Server-side
Write your server room code:
Expose the room for match-making:
Client-side
Let the client join the room. If no room has been found, the server will create one.
State Synchronization
An unique approach to room state synchronization.
Server-side
Define your synchronizable state structures
Mutate the state on within your room code:
Client-side
Listen to the changes coming from the server:
Scalability
Simple yet powerful scaling strategy
- Distribute rooms across servers and/or processes
- Allow cluster-wide match-making
- Leverage all your available CPUs
- Connect clients directly to their requested rooms
- Stateful processes keep track of their own rooms
Tooling
Built-in tools that accompany you from development to production.
Client-side Playground
Easily create client connections and inspect how they are exchanging data with the server
Read documentationRealtime Room Inspector
View and inspect the list of rooms spawned by the server.
Read documentationUnit Testing
Utility methods for testing your rooms with your favorite testing framework
Read documentationLoad Testing
Evaluate how your server behaves under high traffic.
Read documentationNode.js ecosystem
Bring your favorite tools to your Colyseus server.
Become a Sponsor
The sustainability of Colyseus relies on Colyseus Cloud subscriptions and sponsorships.
If you benefit from the project but are not yet using Colyseus Cloud, please consider sponsoring it.