Tower Defense

Kenny Chou · August 28, 2025

I used to spend my time before classes playing the original Desktop Tower Defense. It had a long loading screen, it lagged when there are too many units, and it was written in Flash. I wanted to make a modern JavaScript version that’s smoother and more optimized, but I wasn’t a web developer… until LLMs came along.

It still took me about 30-40 hours to arrive at a playable, relatively bug-free state. Along the way, I picked up a lot of best practices for coding with Claude, which will be documented here. BUT the end result is a highly configurable, extendable, fast, browser-based tower defense game.

Tip: If you’re on a PC or Mac, use keyboard shortcuts (also see Menu -> Keyboard Shortcuts):

  • Numbers 1-5 chooses different towers
  • F changes the game speed
  • N spawns the next wave of enemies
  • M toggles the menu
  • spacebar pauses the game
  • U upgrades the selected tower
  • S sells the selected tower

I hope you enjoy the game, and please drop feature requests in the comments.