WebSockets are the most popular technology for developing multiplayer HTML5 games. They allow bidirectional communications between clients and server using a single socket TCP.

We code our multiplayer HTML5 games in Javascript, both the client and the server side. More specifically, we use a game engine called phaser.io for the client and Node.js in the server.

There are several options for working with WebSockets. The most common and simple is Socket.io. We implemented sockets.io on our first projects. However, due to the increasing complexity and demands of our current projects we decided to change to SocketCluster.

Why we love doing HTML5 multiplayer games using SocketCluster

SocketCluster is an open source framework optimized to run with Kubernetes (K8s). It’s the base for our multiplayer development for the following reasons:

Because it’s faster and more versatile than socket.io. SocketCluster uses µwebsockets (coded in C++) and offers pub/sub.