Creating a multiplayer platformer in the browser

The goal

With this project, I wanted to learn two new skills: working with web sockets by implementing multiplayer using Socket.IO and making a game.

Designing multiple levels

The game was aimed to be very difficult, so it was also designed to have very few checkpoints. If you missed a critical jump, you could fall from the third to the first level.

The map was made in the Tiled Map Editor, allowing me to use the assets to create a map and add clipping masks to the game so that the user can stand on platforms.

Implementing multiplayer using web sockets

To implement multiplayer into the game, I used socket.io, allowing me to implement websockets with different socket pools quickly. In this, I created a pool for players to update the player's position and send it to all players inside the game. In this, I also send along the player's state, for example, if they are jumping. This allows us to play the correct animation for other users.

The end result

The result is a fun little platformer game that my friends and I have played for several hours that is right on the line between challenging and rage-inducing.