Multiplayer Game Server for Node.js

Focus on the gameplay instead of networking.

If you're a solo indie developer, small or large game studio, Colyseus will allow you to deliver realtime or turn-based multiplayer games in record time.

Supported platforms

Colyseus comes with official support for these platforms.

Need a client for a different platform? Share your interest on the discussion board!


Awesome companies supporting the development of Colyseus:

How it works

Have a glance on the usage of the framework.
See presentation overview, and more examples.


              import { Room } from "colyseus";
import { Schema, MapSchema, type } from "@colyseus/schema";

class Player extends Schema {
  @type("number") x: number;
  @type("number") y: number;

class State extends Schema {
  @type("string") currentTurn: string;
  @type({ map: Player }) players = new MapSchema();

class GameRoom extends Room {
  onCreate () {
      this.setState(new State());

      this.onMessage("fire", (client, message) => {
        // handle player message
  onJoin (client) {
      this.state.players[client.sessionId] = new Player();
  onLeave (client) {
      delete this.state.players[client.sessionId];


              const client = new Colyseus.Client("ws://localhost:2657");

try {
  const room = await client.joinOrCreate<State>("game");
  console.log("joined successfully", room.sessionId);

  room.state.players.onAdd = function(player, i) {
    console.log("player joined!", player);

  room.state.players.onRemove = function(player, i) {
    console.log("player left!", player);

  room.state.players.onChange = function(player, i) {
    console.log("player has been updated!", player);

  room.onStateChange((state) => {
    console.log(`${ room.sessionId } has a new state:`, state);

  room.send("fire", { angle: 42 });

} catch(e) {
  console.error("couldn't join room:", e);


Authoritative server. Designed to be intuitive and simple to use.


A selection of games powered by Colyseus, made by the community.

Work for hire

Hi, I'm Endel. I'm working as a full-time freelancer since 2018.


Get in touch!