🏆

Learn to build

How to make a tower defense game with AI

Tower defense is a favorite for builders because the rules fit in a few sentences: enemies walk a path, you place towers, towers shoot, don't let anyone through. That makes it a strong fit for AI. Paste a prompt into an AI coding tool such as Claude, Cursor, Bolt or ChatGPT and you'll have a playable browser game, with no coding needed.

Keep the first version small: one path, three tower types and ten waves. Balance is where tower defense gets fun, and it's easier to balance a few pieces than a lot.

How to do it in 3 steps

  1. Copy the Starter recipe. Use the Copy button below.
  2. Paste it into an AI tool. Start a new project, paste and let it build.
  3. Play to wave 10, then balance. If one tower is always the best pick, ask the AI to make it cost more or shoot slower.

Free Starter recipe

This is the Starter recipe from Ship Snatch. Copy it as is, or change the details to make it yours.

Read the full recipe
Build a small, playable browser game inspired by "Ship Snatch" (Tower Defense).
Concept: Ship Snatch is a browser-based, top-down hex tower defense and base builder with a claymation pirate vibe - you grow an archipelago hex by hex, place and upgrade defenses, and hold your Captain’s Keep against waves of enemy ships and sea monsters, solo or in co-op for up to 32 players.
Tone/hook (from the game's own page): Build your island fortress. Sink the fleet. Fast pirate tower defense, free in your browser.
Tech: use Three.js; keep it to a single page that loads instantly with no login or install.
Controls: touch controls (tap/drag) that work on a phone plus keyboard and mouse on desktop, shown on a short how-to-play screen.
Multiplayer: the original is listed as multiplayer. Start with a local or bot opponent, then add online play (e.g. WebSockets) once the core loop is fun.
Core loop: include a timer or round clock, levels, stages or waves that ramp up, progress saved in localStorage.
Audio: add simple sound effects and music (start audio on the first click/tap).
Steps: 1) get the core mechanic playable with placeholder shapes, 2) add win/lose conditions and restart, 3) polish feel, visuals and sound, 4) add your own twist (setting, character or one new rule).
Make it your own: don't copy the original's name, art, text or code.

Heads up: Starter recipes are learning templates written by Vibe1Up, not the creator's own prompt.

Play real tower defense games made with AI

See what's possible before you build. Each one is listed on Vibe1Up with credit to its creator.

Screenshot of Ship Snatch

Ship Snatch

by @radomir_3 · Three.js

Ship Snatch is a browser-based, top-down hex tower defense and base builder with a claymation pirate vibe - you grow an archipelago hex…

Chess Defence

by @indierdcr · Three.js

A strategy game where classic chess units battle zombie waves to protect the king in a tactical tower-defense twist.

Screenshot of Clickwasher TD

Clickwasher TD

by @hamsteroforion · Three.js

Place towers, defend the citadel, unlock the research tree.

More tower defense games →

Remix it: easy ideas to try

Once your first version works, paste one of these into the same chat:

FAQ

What's the simplest tower defense to start with?
One fixed path, a grid for placing towers, and three tower types. Everything else can come later.
How do I balance the waves?
Play it, write down where it gets too easy or too hard, and tell the AI. For example: "waves 6 to 8 are too easy, add 30% more enemies."
Can it run on a phone?
Yes. Tap-to-place works well on touch screens. Ask the AI to make the grid cells big enough for a finger.