Back to the blog
Development / DEVELOPMENT NOTES

WebSockets, part 2: a multiplayer take on agar.io

From the Arkanoid example to a small multiplayer experience using a client–server architecture.

The agar.io-inspired multiplayer prototype

In the first WebSockets article, I used Arkanoid to explore a real-time application. This follow-up is a small agar.io-inspired project with multiple players.

A shared state across clients

The architecture still separates server-side logic from browser rendering. The difference is that one player’s actions now affect a state that the other players must observe too.

The agar.io-inspired multiplayer prototype

What I would improve next

  • Movement: smooth the changes received from the server on the client.
  • Identity: display each player’s name.
  • Scoring: make progress through the game visible.
  • Ranking: organise player results in a scoreboard.

These improvements separate basic communication from a clearer multiplayer experience. The video shows the prototype, while the repository explains how the communication is organised.

Source code

Explore the project on GitHub

Written by Sergio Soriano

Development, curiosity, and shared projects.

About Sergio Soriano