Entering the Multiplayer Game Dev Zone

My learning to make multiplayer games consists of decreasingly failed attempts which eventually become successful attempts!

One more obsession these days is the Paper.io game, a strategic game aiming at acquiring as much land (territory) as possible. Simon and Neva have gotten pretty good at it in just about a week’s time:

Simon came up with a smart winning strategy and Neva implemented it absolutely crashing all her 8 opponents

Simon decided to try building a paper clone, a very difficult task, considering this would become his first multiplayer project. The current status of the project is the multiplayer part is actually working, but the actual game functions have many bugs:

The bug is that you don’t expand your paper correctly. This happens because I’m using a terrible algorithm to expand paper.

Simon managed to get the multiplayer part to work using a pre-built library called socket.io

Without socket.io, the client has to request messages from the server before the server can share them. Now with socket.io, the server can just spit messages to the client as much as it wants to.

Simon’s code: https://replit.com/@simontiger/PaperClone#index.js
Simon’s notes developing the game

A couple days later, Simon and Neva were hanging with their favorite bunch of friends again. “I have a slightly unorthodox idea”, I heard Simon say. Their new thing is coming up with a list of ideas that can be coded very quickly, vote on them and implement them together within a minimum amount of time. The only problem is that the online editor they use for team projects, Replit.com, doesn’t update in real time which leads to annoying tension (they can’t see each other typing). “What if I make my own platform that everyone can use?” Simon suggested. Yesterday, they tried using socket.io to create such a platform, at least for idea sharing and maybe also for coding. That proved too hard though, so they ended up making a Discord bot for idea sharing instead and are planning to use VS Code Live Share to create team projects in.

This is one of the examples of short as-fast-as-possible team challenges they make, a particles visualization with gravity switching zones and magnets that cause the particles to change color:

One Reply to “Entering the Multiplayer Game Dev Zone”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s