Vibe Coding: Building a Tower Defense Game with 99% AI

"Vibe coding" is basically guiding AI to build something through prompts and feedback instead of writing code yourself. You describe what you want, test it, tweak the prompt, repeat. Inspired by Vibe Jam 2025, I decided to try it out and build a tower defense game.

Game Screenshot

Prompt-driven development

My very first prompt was super simple:

"I need to make a tower defense game, with a green theme, matrix futuristic style, using Three.js. Should look like Warcraft 3 old tower defense maps. To then have multiplayers in future. enemies go from top to bottom."

Claude helped me refine this into a more detailed plan. The first couple versions were learning experiences, I threw them away because they weren't maintainable or scalable.

Instead of writing code myself, I developed a workflow that looked more like this:

  1. Play the game, find bugs or think of cool new features
  2. Ask Claude Code to fix those bugs or add those features
  3. Test what Claude built
  4. If it worked, awesome! If not, I'd throw it away and try a different prompt. Or understand the problem and try a different prompt.

The rule was "no manual fixes". This forced me to get better at describing what I needed. And I'll be honest, it wasn't 100% AI made, I had to download sound effects myself (AI-generated ones were pretty bad), made a few CSS tweaks, fonts setup, devops deployment, but that's it.

AI as a tool-builder

The real shift happened when I realized I was asking for the wrong things. At first, I'd say stuff like:

Make enemies more dynamic with better spawn timing and lower health

But that often led to messy code or results that weren't quite right. What if Claude build me tools instead?

Create a Debug Panel that lets me adjust game variables like speed, health, and spawn rates in real-time

Debug Panel

Now I could tweak the game myself without asking Claude for every little change. Instead of asking AI to solve specific problems, I was asking it to build me tools to solve them myself.

Read more about this on the Github Repo: Green Tower Defense

04 April, 2025 - update: implemented a better performance system. Took some time to get it right, but now the game runs mostly at 60fps, some times 30fps in not high end mobile. Still have lots of issues to fix, but it's a nice improvement. But, Im just thinkg that to make a better game exp, no way to only AI code at this point anymore, and for now.