Blog

How to vibe code a game with AI (from the idea in your head to the full game)

Also in: Português

To vibe code a game, you direct and an AI coding agent builds: you write one page about the game, pick tools the agent can run from text files, give it rules, ask for the smallest playable version in grey boxes, and then play, write notes and let it fix, over and over. Art, music, sound, voices and films come after the game is fun. Two real games show every step here: Broodfall, a tower defence roguelite on Steam, and Glorified, a horror game in Unity that is still in development. For the full story of one game, every failure included, watch the Glorified devlogs.

Watch on YouTube

1. Start with one page

Broodfall's first design document was 1,217 words. Its pitch: a tower defence roguelite where you are the monster, an escaped bioweapon growing across a city of intelligent insects. "Towers are limbs, creep is skin, organs are the build, meat is the economy." Every decision the developer, Malcolm Collins, made after that went into the document with his name, the date and his own words. It is about 27,500 words today, and the agent reads it as the source of truth.

2. Pick a stack the agent can drive from text

If the agent cannot run it and test it alone, pick something else.

3. Give the agent rules

Write them in a file the agent reads every session (for Claude Code: CLAUDE.md). Broodfall's first one: "don't tell me something is done until you have run thorough e2e tests as a player, I couldn't even start it." Glorified's: every mechanic gets a test, one Unity job at a time, every step ends with a note and pictures. When the agent makes the same mistake twice, write a rule.

4. Day one: grey boxes

Ask for the smallest version you can play today. Broodfall went from its design document at 10:23 to a playable slice at 11:00 the same morning, with an autoplayer and 16 tests. Glorified's plan said about four days for its first three steps; it took one day: tank controls, fixed cameras, three powers and a capsule that shoots back.

5. The loop: play, write notes, fix

Good notes say what you did, what you saw and what you expected. Glorified's notes from its second week: "her model slides back", "a box killed me for no reason", "the side dodge is hard to trigger". Each became a fix and a test.

6. Tests and a bot that plays

Broodfall has 75 test files and about 800 tests, including one with the designer's words in its name: "generally in a game wave one should be mostly or only war caste". Glorified's bot plays its whole tutorial before every push; the game runs more than 460 tests. But, as the Glorified devlog says: "a bot that passes is not a fight that feels good." Only you can tell if it is fun.

7. The biggest mistake: art too early

On Glorified's first night the agent built all nine characters in 3D: about $42, a third of it thrown away by morning. The real cost was attention. The rule since: grey boxes for the whole first play-through. Find the fun, then the art.

8. Art, 3D characters and textures

9. Music, sound effects and voices

10. Cutscenes, comics and AI in the game

11. Ship it

Broodfall's trailers are captured from the real game frame by frame, titles set in type. Its Steam page went live on November 4 and had about 430 wishlists two days later. Answer Steam's AI question honestly; Broodfall's page says it was built in part as a test of the RFab API.

What it cost

Broodfall's board art about $200, its recorded film and newsreel work about $150, the Steam fee $100; Glorified's eleven days of game art about $60. The biggest cost is your time playing the game.

Tips for beginners

  1. Ask for small steps, and play each one.
  2. Never trust "done": ask for a screenshot, a clip or a test result.
  3. Commit after every working step.
  4. When the agent fails the same way twice, write a rule.
  5. Play your own game early, while it is still ugly.

Want a full tutorial on one of these steps? Tell us in the video's comments.

All posts