All guides

How to make an .io game

An .io game is a browser game where strangers drop into a shared arena with no lobby and no install. You need three things: many players in one room, movement that stays smooth over a network, and scoring the client cannot fake. The arena and scoring are the hard parts.

01What the genre actually requires

  • Instant join, no account, no lobby. A link opens and you are playing.
  • One shared arena holding dozens of players, not a private match.
  • Smooth movement despite latency, which means interpolating what you draw rather than snapping to the last message.
  • Scoring that survives a player opening the browser console.
  • A reason to come back; a leaderboard is usually enough.

02Start with the arena

Put every player in one room named after the arena, and let it be created on first join. Each player writes only their own position; everyone reads the rest from the state callback. That gets you a crowd of moving dots, which is the skeleton of every game in the genre.

Room size defaults to thirty-two and can go to 256. For an .io game, more players in one arena is the feature, but a full arena is also more traffic per player, so it is worth testing what your game actually feels like at forty before assuming it wants two hundred.

one room, one arenayoustate replicates to everyone in the room
One room holds the whole arena, up to 256 players. Every player's state reaches every other player, so more players in one room means more traffic per player as well as a better game.

03Make movement look right

Do not draw the last position you received. Store it as a target and move toward it a fraction each frame, so other players glide instead of teleporting. Send your own position on a fixed tick rather than every frame.

This single change is the difference between a game that feels broken on ordinary wifi and one that feels fine.

drawing the last packetjumps between updatesmoving toward it each framesmooth on the same connection
Drawing each packet as it lands makes other players jump. Storing it as a target and moving a fraction of the way there each frame produces smooth motion on exactly the same connection.

04Then make scoring fair

The moment there is a scoreboard, someone will try to write to it. Collisions, scoring and eliminations belong in server-side logic: clients send inputs, the server decides outcomes and updates state. Only then does a leaderboard mean anything.

Add the leaderboard once the score is trustworthy, not before, or you are publishing a ranking of who read the documentation for the console.

05Shipping it

An .io game lives or dies on whether a link works instantly for a stranger. Test the cold path: open your share link in a private window on a phone, on mobile data, and see how long it takes to be moving. That number is your real conversion rate.

Common questions

How many players can be in one arena?

Up to 256 in a single room, bounded by your plan's per-game concurrent limit. Because all state replicates to everyone in the room, traffic grows with players, worth measuring at your target size.

Do I need to write a game server?

Not for movement. For fair scoring you deploy a small piece of server logic, which runs authoritatively but is not a service you host or scale.

Try it on your own game

The free tier does not expire and asks for no card. Add one script tag and have two people playing in about a minute.