LIFE ABOVE. WORK BELOW. Sign in

How to make a game with AI.
Two agents, one game.

Vibe coding games, in plain English: Claude Code writes the game, Codex makes the art, and you play it in your browser. No coding needed.

Games are the most fun thing you can build with AI. You can tell in two seconds whether the jump feels right or the beetle is too fast, so every message you send makes the game a little better. That’s why vibe coding games has taken off: you describe the game, an AI agent builds it, you play it and say what to change. You hardly ever look at the code.

But you’ve probably seen what comes out when nobody takes care of the rest: AI slop. Games that look like a hundred others. Muddy, mismatched graphics, a hero that changes face from one screen to the next, buttons that don’t belong to the game, and a feel that says nobody really cared. You can spot it at a glance, and so can everyone you send it to.

A good game needs more than code that runs. It needs a look of its own: a hero you remember, a world that hangs together, menus that match. The way to get there is to use two agents, and give each one the job it’s best at.

Claude Code for the code.
Codex for the art.

Above ground, a person plays a game on their phone. Below ground, one mole writes code at a terminal while another paints a pixel sprite, and they pass it through a tunnel.

What a game
is made of.

Every game, from Tetris to the one you’re about to make, has the same three parts. You don’t need to build any of them yourself, but knowing their names makes it much easier to ask for what you want.

Pick an engine,
or let it pick.

Many games people vibe code are browser games: they run on a modern phone or laptop from a link, with nothing to install. Three free options do almost all the work:

OpenAI’s own Game Studio plugin for Codex makes the same call: Phaser by default for 2D, Three.js for 3D. If you’re not sure, just say “2D” or “3D” and let the agent choose.

Claude Code
writes the game.

Give the code to Claude Code, Anthropic’s coding agent. It’s careful with game logic, keeps the project tidy as you add levels and enemies, and tells you what it changed in plain words. Physics, collisions, a score, a pause menu, touch controls for phones: that’s its home ground.

A game also has to be played to be tested. On Krot, Claude Code has its own browser, so it doesn’t just write the game: it opens it, plays it, takes a screenshot and fixes what looks wrong, often before you’ve seen it.

What Claude Code can’t do is paint. It draws with code, using shapes and colours, which is fine for a menu and a score, but not for a mole with a helmet and a headlamp.

Codex makes
the game assets.

Codex, OpenAI’s coding agent, has an image generator built in. It comes with paid ChatGPT plans (Plus and up), with no extra account; pictures just use up your Codex allowance faster than text does. Ask it for a character, a sprite sheet, a tileset or a title screen and it makes the pictures and saves them straight into your project, where the game can use them.

A pixel-art platformer: a mole in a miner’s helmet jumps between mossy dirt ledges in a cave lit by lanterns, past glowing teal crystals and a beetle. Three hearts top left, a crystal counter reading 12 top right.
“Deep Dig”, a game that doesn’t exist yet. Codex made this screenshot for this post.

With the Game Studio plugin it also knows the game-specific steps: lining sprite frames up on an even grid, keeping one anchor point so a character doesn’t wobble as it runs, and checking it all in the browser. It’s good at the look around the game too: the colours, the fonts, the menus and the page your game lives on. Codex can write game code as well; here we give it the art, so each agent does the part it’s best at.

A sprite sheet of the mole: rows of frames for standing, running, jumping and digging.
The hero, frame by frame.
A tileset: grass-topped dirt, plain dirt, stone, roots, crystal ore, a ladder, a lantern, planks and tunnel wall.
The blocks the levels are built from.
A pixel-art menu kit: wooden Play, Settings and Quit buttons, full, half and empty hearts, a teal crystal, a pause button and a blank wooden panel.
Buttons, hearts and a panel for the menus.

Honestly, it isn’t magic every time. The game screenshot came out right on the first try. The sprite sheet took three, and Codex never quite got the background perfectly flat. That’s normal, and it’s exactly where the two agents meet: Claude Code cuts the sheet into frames and cleans up the edges in code.

Four tips for good AI game assets:

What you
can make.

Not just platformers. A 3D kart racer in Three.js. A cozy puzzle for phones. A word game for your family, a quiz for your classroom, a tiny game for your shop’s website. Here are two more that Codex imagined for this post:

A low-poly 3D kart race on a twisting canyon road at sunset, with flat-shaded rocks and cacti, and a small race display: lap 2 of 3, 2nd place, speed.
A 3D kart racer Codex imagined, the kind people build with Three.js.
A cozy garden puzzle game on a phone: a board of flower and fruit tiles to match, level 14, a moves counter and three boosters.
A cozy puzzle game for phones, also imagined by Codex.

Start with a game you’d happily play for five minutes. You can make it bigger next week.

Vibe coding a game,
step by step.

  1. Say what the game is, in one paragraph.

    Ask Claude Code first. Copy this and fill in the brackets:

    Copy this

    I’d like to make a small browser game. It’s [the idea in one sentence]. The player [what you do: jump, dodge, match, steer]. It should work on a phone too. Please start with plain shapes so I can test how it plays, and explain things simply.

  2. Get it fun before it’s pretty.

    Claude Code builds it with plain boxes and circles first. Play it, and say what feels wrong: too slow, too hard, the jump is floaty. Good art can’t save a game that isn’t fun, and changing boxes is much quicker than changing finished art.

  3. Hand the art to Codex.

    Say this to Claude Code. On Krot, it calls Codex in for you. Or switch the project to Codex and ask it directly.

    Copy this

    Ask Codex to make the art for this game. First, one screenshot of how it should look: [the style, e.g. cozy 16-bit pixel art, warm colours]. When I like it: a sprite sheet for the hero, a tileset and the menu buttons, all in that style, saved in the project.

  4. Swap the boxes for the art.

    Claude Code puts Codex’s pictures into the game, checks that every frame lines up, and plays it again in its browser. Then you play it, and keep talking: a new level, a boss, a high-score table, music.

  5. Send it to someone.

    Ask for a link you can send to friends. A browser game opens on their phone with nothing to install, which is the best part.

Claude Code and Codex,
together on Krot.

On your own, using two agents together is a chore: two apps, two terminals, copying pictures from one to the other, explaining the game twice. Krot puts both on your Krot Box, your own computer in the cloud, in the same project, working on the same files.

You bring the subscriptions: a Claude plan with Claude Code (Pro is $20 a month in the US) and a ChatGPT plan with Codex (Plus is $20 a month). Krot is 14 days free, then $12.99 a month on the Founder plan. New to all of this? Start with our beginner’s guide.

Questions
people ask.

Can I make a game with AI if I’ve never coded?

Yes. You describe the game in your own words, the agent writes the code, and you play it and say what to change. Start small: one screen, one idea.

Is Claude Code or Codex better for making games?

Both can write game code. We use Claude Code for the code, because it’s careful with game logic and keeps a growing project in order, and Codex for the art, because it has an image generator built in. That’s our favourite split, not a rule: try it, and swap if one works better for you.

What’s the best engine for a game made with AI?

For a browser game: Phaser for 2D and Three.js for 3D. Both are free and widely used, so AI agents know them well.

Can AI make game assets like sprites and tilesets?

Yes. Codex makes characters, sprite sheets, tilesets, buttons and title screens with its built-in image generator. Make one style picture first, then ask for each asset in that style.

Your turn.
Press start.

Think of a game you’d like to play. Describe it to Claude Code, play the plain version, hand the art to Codex, and put it together. And if you make something, I’d really love to play it: support@getkrot.com.

Get started

14-day free trial. Bring your Claude and ChatGPT subscriptions.