

A tower defense game where you don't click to shoot — you write code your towers run every tick, in Python, JavaScript, C++, C#, Rust, Zig or Lua. Prioritize threats with if, sweep swarms with for, and route air, armor and camo to the right tower. Better algorithms beat more towers.
Overview
A tower defense game where you don't click to shoot — you write code your towers run every tick, in Python, JavaScript, C++, C#, Rust, Zig or Lua. Prioritize threats with if, sweep swarms with for, and route air, armor and camo to the right tower. Better algorithms beat more towers.
Description
Compile & Defend is a tower defense game with no click-to-shoot. Every tower on the field runs your code, once per tick. Write a smarter script and your defense gets smarter — write a sloppy one and the swarm walks right through.
It's the tower defense game for people who'd rather refactor than micromanage.
There's no proprietary scripting dialect to learn. You write in a clean subset of a real language you already know — pick from Python, JavaScript, C++, C#, Rust, Zig, or Lua. They all compile to the same engine; the language only changes how your code is spelled. Switch anytime.
Your program is bound to each tower every tick — me is the tower, me.enemies_in_range is what it can see, me.shoot(target) pulls the trigger. From there it's all you!
The closest enemy isn't always the most dangerous one — so the naive shoot the first thing you see script will always get you started, and never win. Better algorithms beat more towers.
Everything is deterministic, so a script that wins today wins tomorrow.
Write once. Compile. Defend.
Explore
Community
... no lists at all!
So what you may do right now is:
Ratings
Steam
2 reviews
Technical
Steam
Pricing
Store
Community
No reviews yet.
Screenshots
Official
Official
OfficialGallery
Community
... no lists at all!
So what you may do right now is:
Steam

Official
OfficialVideo
Trailer - wishlist
Gallery
... no screenshots at all!
So what you may do right now is:
Community
... no lists at all!
So what you may do right now is: