GuidesJune 15, 20266 min read

Make a tower defense with AI

Build a tower defense with AI: a winding path, waves of enemies, towers you place and a coin loop. Play the first build, then tune the balance by chat.
By OddShed Team

What we are building

In a tower defense, enemies walk along a path and you place towers to stop them before they reach the end. You earn money for defeating enemies and spend it on more towers. It is a satisfying genre to build because the fun comes from balance: waves that push you, towers that feel worth their cost, and money that keeps you choosing.

Step 1: write a focused prompt

Name the genre, what the player does, the goal, and the vibe. For our tower defense:

A top-down tower defense where enemies follow a winding path and I place towers on the grass to shoot them. I earn coins for each enemy I defeat and spend coins to buy more towers. I lose if too many enemies reach the exit. Clean and colorful, with clear, readable shapes.

That gives OddShed the path, the place-and-shoot verb, the coin loop, the lose condition, and a readable look to aim for.

Step 2: play the first build

Send the prompt and play the game in the live preview as soon as it builds. Place a tower or two, let a wave run, and watch how it feels. Note whether the path is easy to read, whether towers hit reliably, and whether the coin amounts feel fair.

Step 3: get the core loop working

Tune the place-shoot-earn-spend loop first, one change at a time:

  • Let me click an empty grass tile to place a tower, and show its range before I confirm.
  • Make towers shoot the nearest enemy in range automatically.
  • Give me coins for each enemy defeated and show my coin total at the top.
  • Stop me from placing a tower if I cannot afford it.

Step 4: add waves and a goal

Now add the structure that makes a run feel like a game:

  • Send enemies in waves that get a little harder each time.
  • Show which wave I am on and how many enemies are left.
  • Give me a few lives, and take one each time an enemy reaches the exit.
  • End the game with a win screen if I clear the last wave, or a lose screen if I run out of lives.

Step 5: balance it

Balance is where a tower defense becomes fun. Play a full run, then nudge the numbers until it feels fair but tense:

  • If it is too easy, make later waves bigger or faster, or make towers cost more.
  • If it is too hard, give a bit more starting money or a slightly cheaper basic tower.
  • Add a second tower type with a different trade-off, like a slow but powerful one.

Change one number, play, and adjust again. Builds that change the game save a restore point first, so a balance experiment that goes wrong is one step back. Export the version you are happy with.

Step 6: polish, then share

  • Use clear, colorful shapes so the path and towers read at a glance.
  • Add a small sound when a tower fires and a coin sound when I earn money.
  • Add a short shake or flash when an enemy reaches the exit.

When it feels finished, share it by link or publish it to the public game library. For a different genre, try the guide on making a platformer with AI.

More guides

The strange idea is usually the good one.