BrowserGaming.com

Guides

How to build a browser game with AI

A step-by-step workflow for building a 3D browser game by directing an AI coding tool, taken from how the creators of shipped games say they did it.

Written
Last checked
Reading time
8 min
Sources
14

AI tools change week to week. Versions, prices and limits in this guide are as of Nov 15, 2026; check each tool’s own documentation for current ones.

You can build a playable 3D browser game in days by telling an AI coding tool what you want, without writing the code yourself. The people who have done it well work the same way: they keep the game small, plan each feature, let the AI write the code and the tools, play every change, and do the design themselves.

This guide follows four games in our index whose creators have described how they built them, and checks their advice against other developers and the tool makers’ own documentation.

What it took for four real games

Game Time Who wrote the code What the creator did
A Game About Capybaras Delivering Food About 15 days; 188 commits, 27,000 lines Claude Code, all of it Planned, played, tuned the feel, laid out the city in an editor the AI built
Great Taxi Assignment: Vibe City 65 hours over two weeks; about €72 of AI services Cursor with Claude Sonnet 3.7 Drew the city plan, placed the buildings, made the music, steered the fixes
fly.pieter.com About 3 hours for the first version; multiplayer 3 days later Cursor with Claude; Grok 3 for the first server Said what he wanted, one change at a time
Freeze Out Not stated Claude Code Designed and playtested

The taxi game won the first Vibe Jam in 2025. The capybara game won the 2026 jam out of 945 entries.

Choose a game you can describe in one sentence

Every one of these games is a single mechanic: fly and shoot, drive and deliver, throw snowballs.

Tomáš Bencko set out to make a tribute to GTA: Vice City and cut it down to taxi missions. Pieter Levels started by asking Cursor for a 3D flight simulator and nothing more. Leo, who made the capybara game, describes his whole game as a loop of three parts, and says the finished result is good for five to ten minutes of play, which is right for a jam.

A jam helps here. The Vibe Jam rules require a game that is free, needs no login and loads almost instantly, which forces a small scope.

Set up the smallest project that runs

You need three things on the first day:

  • An AI tool that can edit a whole project. The games here used Cursor or Claude Code.
  • Three.js. Levels did not pick it: Cursor reached for it on its own when he asked for a flight sim. Bencko used it with cannon-es for physics and Vite to build.
  • Version control. You will need to go back. Levels says he had to a few times, and Bencko restarted from an empty project four times.

Then write your rules down once, in the file your tool reads at the start of every session. Leo put the jam’s rules there, so the AI could not break them, along with coding conventions it would not guess. Anthropic’s advice for this file is to include only what the AI cannot find by reading the project. Another developer, who built a 76,000-line game, kept a 164-line file of constraints, each one learned from a debugging session.

One rule worth adding: AI tools learned Three.js from years of old examples. Three.js now publishes its own instructions for language models, which say to import it the modern way and to use the standard WebGL renderer by default. Point your tool at that file.

Our guides on choosing the stack and publishing cover the rest of the setup.

Plan each feature before the AI writes it

Leo planned every feature in Claude Code’s plan mode and saved each plan to a file, so a later session could pick it up. His tip is to ask the AI to interview you first, so it builds the feature the way you actually want it.

The tool makers say the same. Cursor’s guide calls planning before coding the most impactful change you can make. Anthropic suggests having the AI interview you until it can write a spec, then starting a fresh session to build from it.

This scales with the project. The 76,000-line game went through 87 written plans.

Work in small steps, and play every one

Leo sums up his loop like this: he thinks, the AI researches and plans, he approves, the AI writes the code, and he tests. He says most of his time went on brainstorming, planning and playing.

How the others describe it:

  • Say what you see. André Figueira built a racing game in five days by playing it, taking screenshots of what looked off, and telling the AI what was wrong in plain English.
  • Show a picture. Leo sent a screenshot of a PlayStation 1 game and asked the AI to research dithering. The game’s retro look came from that request.
  • Keep sessions short. Leo started a fresh session for every new feature and kept one long session only for bugs. Cursor says to start a new conversation when the agent gets less effective.
  • Stop after two failed fixes. Anthropic’s advice is to clear the session and write a better prompt instead of trying a third correction.
  • Do not automate the judging. Leo chose not to let the AI loop on its own, because only a player could tell whether a change was an improvement.

Levels reckons his first three hours went smoothly about 80% of the time.

Tune by hand, not by prompt

Asking the AI to make something “a bit faster” over and over wastes time and money. Leo’s fix was a rule: every property of every object must be adjustable with a slider and saved to a settings file.

He then built a small test map, drove around it, and tuned the handling himself with those sliders.

Have the AI build your tools, and do the design yourself

This is the least obvious lesson and the most useful one. Leo calls it the biggest multiplier of the whole project: not the game code, but asking the AI to build the editors that let him build the game faster.

He used a level editor to place mountains, rivers, roads and houses by hand. The AI also wrote the road system behind it: joining intersections, adding sidewalks and guardrails, and flattening the terrain under a new road.

Bencko did the same thing with different tools. He drew a plan of the city in Illustrator, imported it, and placed buildings as plain blocks in the Three.js editor. The AI wrote the scripts that converted between the editor’s format and the game’s.

Letting the AI design the levels does not work yet. The developer of the 76,000-line game says level design failed completely, and Leo built his map by hand for the same reason.

The AI is fast at systems and tools. Layout, pacing and taste stay with you.

Expect physics to fight you

Both jam winners lost time here.

Bencko’s car had wheels that spun around the wrong axis, a body that could be rocked into the air, and a habit of flipping over in gentle turns. His diagnosis is that language models still struggle with the physical world: orientation, axes and directions. He also found they tend to stack one patch on another instead of fixing the cause.

What helps:

  • Say the obvious out loud. State which axis is up and which way the vehicle faces.
  • Rebuild one system, not the game. Bencko’s fourth attempt at the driving model is the one that shipped.
  • Choose fun over realism. Leo’s stack of food first slid around realistically. He replaced that with a simple chance of dropping an item once the stack leans too far, and says it plays better.

Make art and sound without an artist

There are two routes, and the games here used both.

Generate the assets. Leo sketched each object with image generators, asked for at least three angles of it, and turned those into a 3D model with Tripo. It did not always work first time: one bridge still had flaws after 20 attempts. Both he and Bencko used Suno for music and ElevenLabs for sound effects.

Generated models are heavy, so compress them. Figueira shrank one model from 247 MB to 15 MB.

Generate everything in code. Freeze Out has no model or texture files at all. Every character and building is drawn by code that Claude Code wrote, so there is nothing to download before the first match.

The second route loads fastest, which matters when a jam bans loading screens.

Add multiplayer late, and keep it simple

Levels shipped a single-player game first. Three days later he added a small Python server that receives every player’s position and sends it to everyone else ten times a second.

Leo’s version is the same idea: one shared city, with each player’s position and food stack relayed to the others about ten times a second. He warns that the traffic grows with the square of the player count, so five players is easy and fifty is not. He kept the weather, the day and night cycle and the particles on each player’s own machine to keep it light.

Seeing other players move is enough for a first version.

Spend the end on polish

Leo’s summary is that the time moves from coding to deciding: planning, testing and taste are now the bottleneck. Bencko stopped development for several days just to work on the music.

The first version is rarely fun. Simon Willison says the first version of his strategy game was no fun to play, and that it took twelve major iterations to get somewhere good.

The AI cannot tell you whether the game is fun. You find out by playing it and by watching other people play it.

What AI will not do for you

The two jam winners are professional developers: Leo had been an iOS engineer for almost nine years and Bencko is a frontend developer. Leo and Levels both say it was the first game they had ever made.

Bencko’s conclusion is the most careful one. He found this way of working fast and enjoyable, and well suited to prototypes and jam games. He also found that it needs an experienced person alongside to catch flaws, that a growing project gets harder to manage without planning, and that responsibility for the result stays with the person.

That is the right expectation to start with. The AI will write the code. Deciding what the game is, and whether it is good, is still your job.

Sources

  1. Leo: How I made $25k in 15 days with a game built entirely by Claude Code (Medium, July 2026) ↗
  2. Leo: jam updates on the editor, road system and physics (X, April 2026) ↗
  3. Tomáš Bencko: I Tried Vibe Coding: How I Created GTA with Artificial Intelligence (April 2025) ↗
  4. Pieter Levels: launch post for fly.pieter.com (X, Feb 22, 2025) ↗
  5. Pieter Levels: on Three.js and loading it with one script tag (X) ↗
  6. Pieter Levels: multiplayer over a Python WebSocket server (X, Feb 25, 2025) ↗
  7. NewKrok: Freeze Out, posted to the three.js forum (November 2026) ↗
  8. André Figueira: 5 days to a neon racing game I described more than I programmed (June 2026) ↗
  9. supertommy: I made a Mario Galaxy game with Claude Code and Three.js in 53 days (Hacker News) ↗
  10. Simon Willison: Battle Drones, a vibe coded RTS (October 2026) ↗
  11. Anthropic: Best practices for Claude Code ↗
  12. Cursor: Best practices for coding with agents (January 2026) ↗
  13. three.js: instructions for language models (llms.txt) ↗
  14. Cursor Vibe Jam 2026: official rules ↗

More guides

All guides