Colyseus — HTML5 Multiplayer Games Made Simple (v0.5.0 update)

Endel Dreyer
2 min readJul 17, 2017

--

https://github.com/gamestdio/colyseus

Almost 2 years ago, the very first version of Colyseus was published. It started out as a wild and naive experiment for my own multiplayer experiments.

Since then, the community slowly started to try it out and release some games using it, such as:

The focus of Colyseus has always been to be the easiest solution for building multiplayer experiences using JavaScript and HTML5, while having a minimalist architecture. It still is in a sort of experimental stage, but steadily evolving into a concrete solution.

What’s new on v0.5.0?

  • Vertical scalability: Version 0.5.0 introduced a new architecture by using NodeJS’s cluster module. Now your game server can scale vertically. This architectural change should evolve towards horizontal scalability soon (#57).
  • Ranked matches: As you may already know, whenever a client requests to join a game session, the requestJoin(options) is called in the server-side to determine if that user is allowed to join the room. Previously, the first room in the list of available rooms returning true would be selected to connect. Now, you can return a float number (0..1) instead of boolean. The match-making service will select the room with highest number to connect. Read more.
  • Unique client / session ids: You can now identify when the same user is connecting more than once into the same room. The client.id is a unique identifier per user whilst client.sessionId is always unique. In short, if you don’t want to care about this, always use client.sessionId to identify your users.
  • Disposing rooms: Introduced the autoDispose property (default is true) which determines if the room should be automatically disposed when the last client disconnects from it. (thanks @seiyria) — also all intervals/timeouts set within this.clock will be cleared on disposal.

Breaking changes:

There’s a few breaking changes on both server-side and client-side. See links below if you’re migrating from a previous version to 0.5.0.

Roadmap for version 1.0.0:

We now have a clear roadmap for what’s still a must to release the version 1.0.0. One of the most requested features is the ability to filter the room state before sending patches to a particular client (#59).

Colyseus has its very first sponsor!

EvenNode provides Node.js hosting. Discount is available to Colyseus projects on request. Contact support for more information.

Go check them out!

Join us!

The community in the Gitter Channel is super friendly and open. If you have any question or just want to share your crazy ideas you’ll find lovely fellows over there! New contributors for code and/or documentation are always welcome too!

--

--

Endel Dreyer

Creator of Colyseus Multiplayer Framework — Expert on TypeScript/JavaScript, HTML5 and Node.js