AI Game Dev
Home › Tutorials › Start here: your first game with AI, part 2

Choose your tools: an engine and an AI agent

Four quick decisions before your first game: browser or engine, which engine, what it costs, and which AI agent. It ends with a clear pick for beginners.

Before you ask an AI to build a game, you choose where the game runs, which engine or library to use, and which AI agent writes the code. None of these choices is hard. This part goes through them in order and ends with a pick for your first game.

How an AI agent builds a game

An AI coding agent, such as Claude Code, Codex or Cursor, writes most of the code for you. It works through text. It reads files, runs commands and reads the output. It cannot click around in an editor the way you do.

So the best tool for you is the one where the agent can see, change and check the whole game through text. Then it can change a file, run the game, read the errors and try again without you.

Pick an engine below and watch an agent fix one bug. Blue steps it does alone. Orange outlines are steps it can do, but slowly or with mistakes. A hand means it stops and waits for you to click in the editor.

One bug, five steps. Try Phaser first, then Unreal.

Decision 1: the browser or a full engine?

There are two kinds of tools.

A web library runs the game in a browser. Phaser is for 2D games. Three.js is for 3D. Phaser comes with scenes, input, sound, physics and an asset loader. Three.js gives you mainly the renderer, so you add the other parts yourself. Part 1 showed the difference.

A full engine, such as Godot, Unity or Unreal, gives you all the parts and a visual editor.

For a first game with an agent, the browser is a good place to start:

  • Everything is ordinary text files. The agent edits a file, and that is the whole change.
  • The agent can check its own work. A tool called Playwright opens the game in a hidden browser, presses keys, takes a screenshot and reads the errors.
  • There is a huge amount of public web code, so models know these libraries well.
  • The game reloads in under a second after each change, so every try is cheap.

The browser has limits. To sell on Steam, you must wrap the game in a desktop program such as Electron or Tauri. Consoles are practically out of reach. Large open worlds and thousands of physics objects hit the browser’s speed limit sooner. There is also no editor to drag things around, so you place things by asking.

Pick a full engine if you need consoles, heavy 3D, or an editor for someone on the team who does not program.

Decision 2: Godot vs Unity vs Unreal

For an agent, the big difference is how each engine saves your scenes and levels. Switch between the tabs below to see a scene file the way an agent sees it. Then ask it to make the player faster.

Godot: one readable line per setting. Unity: text tied together by long ID numbers. Unreal: binary bytes a text tool cannot read. The lines are simplified examples.

Godot 4 is the easiest engine for an agent. Scenes are short text files. Godot builds and runs with no window, so the agent can test the game alone. Its language, GDScript, is simple and close to Python. Godot 4 renamed many things from Godot 3, and models sometimes mix the two. Write “Godot 4” in every prompt. For a Godot game in the browser, use GDScript, because C# projects cannot export to the web.

Unity sits in the middle. Models write its language, C#, well, and there is a lot of public Unity code. Its scene files are long and full of ID numbers, though. It also often takes a minute or more to start from the command line, so each test is slow. Pick Unity if you need consoles from day one or want the Asset Store.

Unreal is the hardest place for an agent. Levels and Blueprints are binary files that the agent cannot read, and its C++ builds are long. Pick it only if you already know it.

Decision 3: what will it cost?

Nothing, to start. Phaser, Three.js and Godot use the MIT licence. It is a short open-source licence that lets you use the code for anything, including games you sell. There is no fee and no royalty. A royalty is a share of your sales that you pay to the engine maker.

Unity is free until your revenue and funding pass $200,000 a year. Above that you need Unity Pro, at $2,310 per seat per year. Unreal is free until a game earns $1 million. After that, Epic takes 5% of the revenue above $1 million.

Move the slider to see what each engine would cost at a given revenue.

Prices checked on 2026-10-27. They change often, so check the vendor's page before you sign anything.

Decision 4: which AI agent?

Claude Code, Codex and Cursor all work the same basic way. They read files, run commands and read the output. This series uses Claude Code, and part 3 is a real recorded Claude Code session that you can follow step by step.

Whichever agent you use, two things help the most:

  • Give the agent one way to start the game. Write it in the project’s instruction file for the agent, CLAUDE.md or AGENTS.md. If the agent has to guess how to start the game, it guesses differently every session.
  • Give the agent a way to see the result, such as a screenshot after a short run or a log with every error. Without it, the agent judges the game by its code, and code that looks right often plays wrong.

You may also read about MCP servers. They let an agent use an engine’s editor through tools such as “create node” or “take screenshot”. You do not need one to start. Add one later, only for jobs that files and commands cannot do.

The pick for your first game

  • Start with a 2D browser game in Phaser, written by Claude Code. Part 3 does this. The agent can build, run and check the game on its own. If your idea is 3D, use Three.js instead.
  • If you want an editor to place things by hand, use Godot 4. It is free, its scenes are text, and the agent can still test the game alone.
  • If you need consoles from day one or the Asset Store, use Unity.
  • Use Unreal only if you already know it.

Models get better fast, so look again before you commit to a big project.

Next: your first game, a platformer in three prompts.

Was this useful?

Next in Start here: your first game with AIYour first game: a platformer with a double jump and coins, in three prompts
Open →