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!


Sneak peak on basic usage. See 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 {
  currentTurn: string;

  @type({ map: Player })
  players = new MapSchema();

class GameRoom extends Room {
  onInit () {
      this.setState(new State());
  onJoin (client) {
      this.state.players[client.sessionId] = new Player();
  onLeave (client) {
      delete this.state.players[client.sessionId];
  onMessage (client, data) {
      // handle player messages


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

room.onJoin.add(() => {
  console.log(`${ room.sessionId } joined!`);

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

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.send("Hello world!");


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!