Colyseus — HTML5 Multiplayer Games Made Simple (v0.5.0 update)
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:
- GunFight.io — made by @tinydobbins
- Splatty.io — made by @bmovement
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 returningtrue
would be selected to connect. Now, you can return a floatnumber
(0..1
) instead ofboolean
. 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 whilstclient.sessionId
is always unique. In short, if you don’t want to care about this, always useclient.sessionId
to identify your users. - Disposing rooms: Introduced the
autoDispose
property (default istrue
) which determines if the room should be automatically disposed when the last client disconnects from it. (thanks @seiyria) — also all intervals/timeouts set withinthis.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.
- Server-side migration highlights (from 0.4 to 0.5)
- Client-side migration highlights (from 0.6 to 0.7)
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.
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!