Skip to main content

Introduction to Vibe Coding for Multiplayer

Written by John Harley

I have spent years designing games and working on game dev teams, but I cannot write code. In November 2026 I gave myself a test: could I work with Claude to take a game concept all the way to a live two-player game running on brainCloud? Four days later I had one.

This is an account of how it went, including the parts that went wrong, for anyone who is curious about vibe coding a multiplayer game and not sure if it is realistic.

Main Menu

Multiplayer, Picking your Dice to Battle with

How the four days went

The game I created is Duel of Dice, a two-player dice game with a battle phase, and a shop between rounds. The original concept had existed for a while as a ticket and a set of mockups, waiting for developer time. Claude changed that.

Progress

  1. A playable bot game (days 1 and 2). Claude turned the original concept into a working browser game in one pass, as a single HTML file. The rules worked but the balance did not: some games ended with players still holding their two starting dice. I fixed that by having Claude run large batches of simulated games and price the shop offers from the results. Next I asked Claude to add six bot opponents with their own personalities. This gave me a single-player way to feel the game loop. Next I shared with a couple people on my team over a lunch break to broaden the feedback.

  2. Async multiplayer (day 3). Because the game is turn-based, I chose a simple asynchronous design: players are matched through brainCloud, and each browser checks the server for the opponent's move. Claude wrote a server script that acts as the referee, so players cannot cheat on dice rolls. By the end of the day, two browser windows could play against each other.

  3. Real-time multiplayer (day 4). Coming in the next day, brainCloud let me know my API/DAU was really high. If the game got traction, additional usage costs could hit me at the end of the month. Turns out async polling the server constantly adds up in API calls, so I would need move the multiplayer architecture to brainCloud's RTT model (real-time connections). I was anxious that a big architecture change after already implementing async polling would make a horrible mess of things, but Claude added RTT without rewriting the game. A small "your move" signal now tells the opponent's browser when to update.

Battle Results:

After Battle, spend your coins to upgrade your dice

Randomized shop offers help replay

Someone Wins, Someone Loses.

Close game. Winner gains ELO and moves up on the worldwide leaderboard
​

What got in the way

Claude wrote all of the code, but it was not a hands-off process. Most of the friction came from one fact: Claude cannot see your live system, so I became its eyes.

  • I was the go-between. Claude cannot log in to the brainCloud portal, so I created the settings it asked for, ran each test build, and pasted the results back. Two things made this workable: builds that show their own error messages on screen, and Claude testing against a simulated brainCloud before handing me anything.

  • Claude does not always give perfect advice. For the two-player lobby, Claude recommended a setting that makes no sense when the minimum and maximum players are the same. It proposed I enable "Allow early start without max participants". I challenged it and Claude realized it was not necessary, but a first-timer might not. Asking Claude to provide reasons behind each recommendation makes bad ones easier to spot.

  • Claude got too technical. Claude responded to my descriptive tone by leaning into a technical process. It provided a formal test plan that was long and slow to complete. So I complained. In response Claude cut it to four steps I could work through and report on easily. Takeaway: Don't be afraid to tell Claude when to ease up on the technical jingo.

  • Async polling for multiplayer meant API Usage costs of running the game crept up. The first real-time version made more API calls than brainCloud recommends (over 630 per session, against a recommended limit under 500). Thankfully brainCloud let me know. So I asked Claude to optimize and switch to RTT. The switch took about four builds with a few connection bugs along the way, and usage dropped below 250 calls per daily active user.

  • Hosting and the app secret needed a friend. Claude built the game as an HTML page, but I had nowhere to host it, so I did wind up asking a teammate for help with that. Claude also put the app secret straight into the page, which got us up and running promptly, but Claude warned me not to go live like that. I again relied on a coworker's help to integrate the App Secret properly. If you plan to release a game publicly, plan for working through those issues.

What I would tell a first-time vibe coder

  1. Make the build explain itself. Ask Claude to put debugging information on screen, such as a status line that shows the reason for a failure. Then you can paste exactly what happened back to Claude instead of guessing.

  2. Ask for reasons. A recommendation with no other information can keep things short but a recommendation with a "because" is something you can challenge with your own common sense.

  3. Tell Claude to cool it when he is too technical. State your goals and what is not working for you, and Claude will adjust it's level to your preference. No need to tough it out.

  4. Choose your multiplayer approach early. I built single-player, then async, then real-time. Each switch was a good learning step, but it burned tokens I would have saved by starting with real-time in mind. Even so, I was able to build everything without hitting my token limits ever. YMMV.

  5. Sort out hosting and secrets. Know where the game will live and how to handle your app secret. In my next project I plan on soloing these efforts.

Conclusion

It really feels like a lack of coding skills are no longer a barrier to making something fun. Start with a defined vision and use Claude as a development partner. Depending on the scope of your game, you could have something good within the week. My biggest takeaway? Decide which multiplayer approach fits your game before starting to build.

Play the game

Wanna try it out? Pick a bot opponent, or let the game look for a human while you play a bot.

Play Now:

Where to go next

Did this answer your question?