Back to projects

Software · Shipped 2023

Balloons TD

A full tower-defense game built from scratch in Python and Pygame — pathfinding, collision detection, upgradeable towers, and wave economy, all at a smooth 60 FPS.

Year
2023
Role
Solo build
Stack
Python, Pygame, OOP, Game Dev
Balloons TD gameplay

Overview

I recreated the core of the classic Bloons TD as a fully playable game in Python with Pygame — towers, projectiles, path-following balloons, collisions, upgrades, and escalating waves. The point wasn’t to clone art; it was to reverse-engineer the systems of a game I love and rebuild them cleanly from scratch.

Balloons TD gameplay screenshot

The challenge

A tower-defense game is several interlocking real-time systems: pathfinding, collision detection, tower targeting, an upgrade tree, and wave management — all of which have to stay in sync while holding a steady frame rate.

Approach

  • Clean class hierarchy — separate, reusable classes for towers, balloons, projectiles, and game state, designed so new tower and balloon types slot in easily.
  • Phased build — game loop and rendering first, then balloon pathfinding, then towers and projectiles, then the economy and upgrade systems, testing at each stage.
  • Performance — spatial partitioning for collision checks and object pooling to cut allocation overhead, holding 60 FPS even with hundreds of balloons and projectiles on screen.

More Balloons TD gameplay

What I learned

This was my crash course in real-time systems: game loops, event handling, and performance profiling. It drove home how much clean architecture pays off when a system gets complex, and that debugging real-time code needs a different toolkit than ordinary request/response software.

Full source is on GitHub.