A Multiplayer Game in Claude Code in an Hour for $31: Step-by-Step Breakdown with Prompts

A Multiplayer Game in Claude Code in an Hour for $31: Step-by-Step Breakdown with Prompts

A developer built a browser multiplayer game in Claude Code and played it with friends. Model price comparison, voice briefs to the agent, multiplayer through a relay, publishing, and ready-made prompts to repeat it with your own idea.

You want to build something of your own with vibe coding, but a business-card website sounds boring, and "a game" sounds like a job for a studio. One developer tested this on himself: in a single evening he built a browser multiplayer game in Claude Code about giant titans in a blocky style and played it with colleagues, one of whom joined from a plane over the Atlantic. He wrote no code by hand: he dictated, played, and dictated again. Below is what he did step by step, what it cost, and ready-made prompts so you can repeat it with your own idea.


In short, if you are pressed for time

What it costs. The first version of the game on Haiku 5.5 cost about $5, and on Sonnet 5.5 and Opus 5.5 it cost $24–25. The whole project, multiplayer included, came to $31.44 in tokens, of which $17.30 went on fixes during play.

How the work is organized. First a simple single-player game, then one long voice brief, then rounds of "play, notice what annoys you, tell the agent." The author did not try to get a perfect game from a single prompt.

How multiplayer works. Players are connected through a Twilio relay, which is needed for people whose networks do not allow a direct connection to each other. The game is published on Netlify hosting, and you can simply send the link to friends.

What not to do. Do not use other people's characters or brands in a game that you publish or sell. The author made a fan game for himself; for your portfolio and clients you need your own world.


What the author ended up with

A browser game in a blocky style: you play a soldier and fly on two cables (left and right mouse buttons), Shift sharply pulls you toward the anchor point, and Space speeds you up. The goal is to cut a titan at the nape of the neck. You can also play as a titan: you walk to the opponents' base and break through the wall. Multiplayer has two modes, a wall assault and soldiers against soldiers; bots fill empty slots, and Tab opens a kill table. There is also free flight, a tutorial, and first-person and third-person views.


Step 0. Pick a model

The author gave the same task to three models to see how much the "seed" of the game costs:

ModelFirst versionWhat came out
Haiku 5.5about $5playable: shadows, animations, fall damage off a cliff
Sonnet 5.5$24–25almost as pricey as Opus
Opus 5.5$24–25the best version, and the one he developed further

After that, all the work ran on Opus 5.5 in Claude Code, in fast mode. The regular Claude desktop app or Codex will also do; the author says plainly that his way is only one option. He kept several agents in separate terminal tabs.

The author's tip that saves the most time is voice input. We type 40–80 words per minute but speak about 200. He dictated the game brief in one long stream of thought.


Step 1. The first single-player version

The prompts below are ours: we put them together from what the author told the agent. Your details go in the square brackets.

```

Build a single-player browser 3D game: [your idea, for example "soldiers on cables hunt giants in a blocky world"].

Everything must run in the browser, with no installation.

It needs: a map with tall and low buildings, mouse and keyboard controls, health, fall damage, simple enemies, a main menu, and a controls screen.

Do not use other people's characters, names, or brands; invent the world and the heroes yourself.

When you finish, run the game locally and give me a link so I can play right away.

```


Step 2. The big voice brief: turn it into multiplayer

This is a retelling of what the author dictated to the agent, without any anime names. Note the last line: he explicitly allowed the agent to ask questions.

```

Turn this game from single-player into multiplayer.

  1. The player chooses a side: soldiers or giants. Playing a giant must not be boring: it should feel powerful, just with different mechanics.
  2. Flight fuel runs out too fast: scatter canisters around the map so players do not have to go back to base.
  3. Show how close the player is to the enemy's weak point: a screen color or an indicator, so it is clear when to strike.
  4. Add a table of kills and deaths. Respawning should be a little annoying, and take longer and longer toward the end of the match.
  5. Players on the same team compete over who kills more. If there are few people on the enemy side, bots take their places.
  6. Make several kinds of giants with their own abilities. No one should have an "instant win" button.

If you lack context, ask me and I will answer.

```


Step 3. Play it yourself and dictate what is wrong

The main idea of the video: you do not need to sit over a perfect plan, "the agent builds for pennies," and you can only work out what to fix by playing. Here is what the author found over several rounds:

A template for such rounds:

```

I played it. Here is what gets in the way:

Fix these in order. Do not touch what works. After the fixes, restart the game and briefly tell me what changed and which keys are new.

```


Step 4. Networking, optimization, and publishing

When he liked the game, the author asked the agent to finish the current fixes, check that everything works, hand him the page, and only then work on speed: with several players, lag begins. He also wanted statistics on how many people are in matches and automatic distribution across worlds, so that no single world overflows.

```

Get multiplayer working over the internet, not just on my computer. I need the fastest and simplest path.

  1. Players must be able to connect even if their networks block direct connections, so use a relay, for example Twilio. Tell me which account and which keys are needed and where to put them. The keys must not sit in code that the player can see.
  2. Add a lobby: quick play, a private room, world selection, and automatic distribution so that one world does not overflow.
  3. Optimize the game for several players at the same time.
  4. Publish the game on Netlify and give me the link.
  5. Count only the number of players and matches, with no IP addresses or personal data.

```

The author asked to save players' IP addresses. We advise against that: it is personal data, and an online counter does not need it.


Honestly: money, time, and what can go wrong

Money. $31.44 for the whole project, by the author's count, of which $17.30 went on fixes along the way. About 90 million tokens passed through the agent, but most of them came from cache: he worked for roughly an hour straight, and frequent requests within one session cost less than the same requests spread across several days. Build the game in one sitting.

Time. About an hour of agent work, plus the time to play and check. Without your own play sessions you will not get a good game; that is your part of the work.

What can break.

Legal. The author made a fan game based on a well-known anime and in the style of a well-known blocky sandbox, for himself and his friends. If you publish a game, charge money for it, or show it to a client, you must not use other people's characters, names, or the recognizable style of another brand. Invent your own world; it also makes the project yours, not someone else's, in your portfolio.


If it did not work


How to continue on AI SKILLS

A game like this is a good first portfolio project: the client sees a finished thing they can enter by link. If you want to build similar things for clients, such as mini-games for promotions, interactives, and apps, three sections will help.

The Skills for Claude Code, Codex, Antigravity section has skills for game development: they give the agent ready-made techniques so you do not have to explain everything from scratch. In Cerebrum, Vibe mode builds apps right in the chat, with no terminal. And in Learning there is a vibe coding course: from how any app is built to how to sell what you make.


See also on AI SKILLS