Guide
Vibe coding games: how to build a game by prompting an AI agent
Andrej Karpathy named the method in February 2025, and a browser flight sim made it famous weeks later. Here's the workflow, the tools and their prices, and the problems to plan for.
Key points
- Start with a game you can finish in a weekend, and put it under Git before the first prompt.
- Have the agent build one small feature at a time, and play the game after every change.
- Add automatic checks (tests, a linter, screenshots) before the codebase grows past what you can read.
Vibe coding a game means describing the game you want to an AI coding agent in plain language, letting it write the code, and steering by playing the result rather than by reading every line. It works best for small web games built with tools like Claude Code, OpenAI Codex or Cursor on top of Three.js, Phaser or Godot. The catch is that the code can quickly grow beyond what you understand, so developers working on bigger projects add tests and checks early.
What vibe coding means
Andrej Karpathy, a co-founder of OpenAI and former director of AI at Tesla, coined the term in a post on X on February 2, 2025. He described a way of working where you "forget that the code even exists": he spoke to Cursor's Composer agent through a voice-dictation app, accepted every change without reading the diffs, and pasted error messages back in until things worked. He presented it as good enough for throwaway weekend projects, not as a way to build serious software.
Since then the phrase has stretched. Many people now use it for any project where an AI agent writes most of the code and the person directs it, even when that person does review the work. The Vibe Jam, an annual vibe coding game jam run by Pieter Levels, puts it this way in its FAQ: the AI is your "primary development tool" and you steer the creative side.
Why games suit vibe coding
Games give you fast, visible feedback. You can tell within seconds whether a jump feels right or an enemy moves the wrong way, and you can describe the problem in words an agent can act on ("the player falls through the floor after the second jump"). Small browser games also need little setup: one HTML file and a JavaScript library are enough to get something playable.
The same feature creates the main weakness. An agent can't see or feel the game unless you give it a way to, so visual bugs, bad game feel and slow frame rates are where vibe-coded games most often go wrong.
How to vibe code a game, step by step
1. Pick a scope you can finish
Choose one core mechanic and one screen: a flight toy, a lawnmower on a small planet, a single-room arena. Write a short design brief before you prompt. Mowtopia's developer, frederik (@froessell on X), wrote a requirements document split into 7 milestones and had Claude Code work through it one milestone at a time, he wrote on X. He says Claude Code built most of the game in 2 days. Read more on our Mowtopia page.
2. Choose a stack the agent knows well
- Plain HTML canvas and JavaScript: the least setup. Pieter Levels' flight sim started as vanilla HTML and JavaScript.
- Three.js: a JavaScript 3D library, MIT-licensed. Both Vibe Jams recommended it.
- Phaser: a free, MIT-licensed 2D framework for browser games, with Canvas and WebGL rendering.
- Godot: a free and open-source 2D and 3D engine (MIT) if you want desktop or mobile exports. Unity and Unreal can also be driven by agents (Mowtopia is a Unity 6 game), but expect more setup. Our guide to AI game engines compares the options.
Web stacks have one practical advantage: the agent can run the game in a headless browser and take screenshots of it.
3. Set up version control before the first prompt
Create a Git repository and commit after every working step. Agents sometimes break things that used to work, and a commit history lets you roll back in one command instead of prompting your way out.
4. Prompt in small steps
Ask for one feature per prompt, and say how you'll know it works ("add a score counter in the top left that goes up by 1 per coin"). Keep a short project file (CLAUDE.md or AGENTS.md) with your stack, rules and design notes. Claude Code reads CLAUDE.md at the start of every session and can use an existing AGENTS.md instead, according to Anthropic's docs.
5. Playtest after every change
Play the build yourself after each step, and give the agent its own way to check. In one example shared on X by Jurly (@jurlycat), Claude Code took screenshots of a 61 KB WebGPU ocean in headless Chrome, and separate subagents reviewed them while the creator gave notes. See our story on the WebGPU ocean built with an agent that screenshots its own work.
6. Add checks as the game grows
Once the game is more than a toy, ask the agent to write tests and run them before each commit. Mowtopia ended with 60 passing tests, according to its developer. For larger projects, see the CI rules behind Pixkrieg below, and our roundup of 6 open-source tools that let coding agents playtest the games they build.
Tools at a glance
Prices are from each company's official pricing page as of October 2026, in US dollars, and change often.
| Tool | What it is | Good for | Price (October 2026) |
|---|---|---|---|
| Claude Code (Anthropic) | Coding agent in the terminal, IDE, desktop app and browser | Any stack, including Godot and Unity projects on your machine | Included with Claude Pro ($20/month, or $17/month billed annually) and Max (from $100/month); not on the free plan |
| Codex (OpenAI) | Coding agent with a CLI, IDE extension, desktop app and cloud | Any stack; runs tasks in the cloud | Free and Go ($8/month) plans get Codex in the ChatGPT desktop app; Plus ($20/month) adds the web, CLI and IDE extension; Pro from $100/month; also usable with an API key at API rates |
| Cursor | AI code editor with agents and a CLI | Developers who want to see and edit the code | Free plan; Plus $8, Premium $30, Super $100 and Ultra $200 a month. Plus offers only Grok models; on Premium and up, third-party models are billed separately at API list prices. Plans also bundle Grok and X features |
| Replit | Browser-based coding with Replit Agent, which writes, tests and fixes apps and launches them | Browser games with no local setup | Core $20/month ($18 billed annually), Pro $100/month ($90 billed annually) |
| Rosebud AI | Browser-based AI game maker: describe a game or start from a template, with free game hosting | Beginners who don't want to touch code | Free (8,000 credits a week); paid plans $15 to $100/month |
| Bolt | Browser-based AI app and website builder | Quick web prototypes | Free (1M tokens a month); Pro $25/month |
| Lovable | Chat-based builder for websites and web apps | A game's website, or simple web apps around a game | Free plan; paid plans use credits (see Lovable's pricing page) |
For a wider comparison that includes no-code game makers, see our guide to the best AI game makers.
Vibe-coded games and projects to learn from
fly.pieter.com
On February 22, 2025, Pieter Levels (@levelsio) posted on X that he had asked Cursor to "make a 3d flying game in browser with skyscrapers" and, after many rounds of back-and-forth, had a working flight sim in vanilla HTML and JavaScript. He built most of it live on X. On his blog, Levels describes it as one of the first vibe-coded games and the first to go massively viral, and says it reached $1M in annual recurring revenue in 17 days. On March 5, 2025, 404 Media reported that the game was making more than $50,000 a month, by its creator's account. Those figures are his own and haven't been independently confirmed.
The Vibe Jam
Levels then ran the Bolt Vibe Coding Game Jam in April 2025. Entries had to be at least 80% written by AI (code, assets and so on), free to play and instantly playable on the web with no login, according to the jam's archived page. More than 1,000 games were entered, and $17,500 in prizes went to The Great Taxi Assignment by @tomasbencko (gold), Vibeware by @mattgordonxyz (silver) and Vector Tango by @scobelverse (bronze). The jam's 2026 press page says Karpathy was among the 2025 judges.
The Cursor Vibe Jam 2026 ran from April 1 to May 1, 2026, raised the bar to at least 90% AI-written code, and offered $40,000 for the top three plus 12 special prizes of $1,000. For a newer jam, see our story on the Epic AI MegaJam and its $65k in prizes.
Mowtopia
A cozy Unity 6 game about mowing tiny round planets. Its developer wrote on X that Claude Code built most of it in 2 days and that it has a 15 MB web build. The concept art, 3D models, icons and audio all came from AI tools on Magnific, including Meshy for the models, he wrote.
Pixkrieg
A multiplayer real-time strategy game that runs in the browser and on phones, with a Rust client compiled to WebAssembly and an authoritative Rust server. A Codex Insider article says agents using Codex and Claude Opus made about 3,700 commits in 2 weeks; it doesn't name the developer, and AIGamer couldn't confirm the figures. More in our story on how agents wrote Pixkrieg's 3,700 commits under strict CI.
Common problems and how developers handle them
Code that grows past what you understand
Karpathy flagged this in his original post: past a point, he said, he'd have to sit down and study the code to follow it. In a small game that's fine. In a bigger one, fixes start breaking other features. According to Codex Insider's unconfirmed account, Pixkrieg was kept in shape with rules that block a merge rather than guidelines in a prompt: Rust's clippy linter in pedantic mode, 90% test coverage, mutation tests (which plant bugs to confirm the tests catch them), and a review agent before every merge, according to Codex Insider. Smaller projects can borrow the cheap parts: tests, a linter and a second agent that reviews the first one's work.
Visual bugs and performance
Agents can't judge how a game looks or feels without help. Giving them screenshots of the running game is the most common fix. Sinda (@SKatalystAI), who made a 52 KB neon city, wrote on X that Claude took screenshots of its own work and a fresh critic agent reviewed them in 3 rounds. For frame rate, set a measurable target ("hold 60 fps on a mid-range laptop") and ask the agent to profile against it.
Asset quality
Coding agents write code; they don't make art on their own. Many vibe-coded games use simple shapes, procedural art (Pixkrieg generates all its art and sound from code), or assets from separate AI tools; Mowtopia's 3D models came from Meshy. Mixing several generators can make a game look inconsistent, so pick one style and stick to it.
Store rules and AI disclosure
Before release, Steam developers fill in a Content Survey, and one section covers generative AI. Valve's Steamworks documentation says that section is about AI used to make content that "ships with your game, and is consumed by players," such as artwork, sound, narrative and localization, and that efficiency gains from AI tools built into development environments are not its focus. Code is not among the examples Valve lists. GameDiscoverCo spotted the reworded form on January 16, 2026, and PC Gamer reported that it also covers AI content used in marketing. AI content made during development is reviewed like any other content; games that generate content with AI while running must also describe their guardrails against illegal output. About 1 in 3 Steam Next Fest demos in October disclosed AI, and some players want a filter for them; see our story on AI disclosure at Steam Next Fest.
FAQ
What does vibe coding a game mean?
It means describing a game to an AI coding agent in plain language and letting it write most or all of the code, while you test the result and steer. Andrej Karpathy coined the term on X in February 2025.
Can you vibe code a game with no coding experience?
Yes, for small games. Browser tools like Rosebud AI let you describe a game in plain language or start from a template. Larger projects are another matter: they get much easier if you learn basic Git and can read error messages.
What's the best tool for vibe coding games?
It depends on how close to the code you want to be. Coding agents like Claude Code and Codex work with any engine on your own machine; Cursor suits people who want to see the code; Rosebud, Replit and Bolt run in the browser with no setup.
Can you sell a vibe-coded game on Steam?
Yes. Steam accepts games made with AI tools, but asks developers to disclose AI-generated content that ships in the game and is consumed by players. Valve says it reviews that content the same way as content made without AI.
Do you have to disclose AI-written code on Steam?
Valve's Steamworks documentation doesn't list code among the content its AI section covers, and says efficiency gains from AI tools used during development are not the focus. The section targets content players consume, such as art, sound, narrative and localization. Check the current Content Survey when you submit, since Valve has reworded it before.
How long does it take to vibe code a game?
Simple games can take hours: Levels posted his first flight sim build the day he started. Mowtopia took about 2 days, according to its developer, and Pixkrieg about 2 weeks of agent work, according to an unconfirmed Codex Insider report.
Sources
Compiled by AIGamer from the sources below, which we last checked on 29 October 2026. Prices and features change; check the tool's own site before you buy.
- Andrej Karpathy (@karpathy) on X: Post coining "vibe coding"
- Pieter Levels (@levelsio) on X: Post announcing the flight simulator built with Cursor
- Pieter Levels, levels.io: fly.pieter.com, my first vibecoded flight simulator which reached $1M ARR in 17 days
- 404 Media (Emanuel Maiberg): This game created by AI 'vibe coding' makes $50,000 a month. Yours probably won't
- Vibe Jam (official site): Bolt Vibe Coding Game Jam 2025
- Vibe Jam (official site): Cursor Vibe Jam 2026
- Vibe Jam (official site): Cursor Vibe Jam 2026 press release
- frederik (@froessell) on X: Mowtopia build notes and stack
- Codex Insider: Pixkrieg, a multiplayer browser game with a Rust server
- Jurly (@jurlycat) on X: Post sharing a 61 KB WebGPU ocean built with Claude Code
- Sinda (@SKatalystAI) on X: 52 KB neon city built with a critic agent
- Valve, Steamworks documentation: Content Survey: Generative Artificial Intelligence Content
- GameDiscoverCo (@gamediscoverco.bsky.social) on Bluesky: Post on Steam's rewritten AI disclosure form
- PC Gamer (Andy Chalk): Steam updates AI disclosure form to specify that it's focused on AI-generated content that is consumed by players
- Anthropic: Claude Code overview (docs)
- Anthropic: Claude pricing
- OpenAI: Codex pricing
- Cursor: Pricing
- Replit: Pricing
- Replit: Replit Agent
- Rosebud AI: Pricing
- Rosebud AI: Rosebud AI Game Maker
- Bolt: Pricing
- Lovable: Pricing
- Godot Engine: GitHub repository
- Phaser: GitHub repository
- Three.js: GitHub repository
Written in our own words; quotes are marked and credited. How we report