← All courses

C++

Build a Tower Defense Game using C++, Raylib & A* Pathfinding

Build a maze-style tower defense game with Raylib (a simpler, immediate-mode alternative to SFML) and a from-scratch A* pathfinding implementation: enemies navigate a grid using open/closed sets and a Manhattan-distance heuristic, and legally reroute around every tower a player places, since placing a tower re-runs A* to make sure the goal never gets sealed off entirely.

8 lessons

Start the first lesson

Curriculum

  1. 1Raylib: Setup and InstallationπŸ“ quiz
  2. 2The Grid: Modeling the MapπŸ“ quiz
  3. 3Why A*? From BFS to HeuristicsπŸ“ quiz
  4. 4Implementing A*: The Priority Queue & Path ReconstructionπŸ“ quiz
  5. 5Enemies: Following the PathπŸ“ quiz
  6. 6Towers: Targeting, Shooting & Blocking the GridπŸ“ quiz
  7. 7Waves, Gold, and Game OverπŸ“ quiz
  8. 8Final Project: Finish Your Tower Defense Game

Every lesson is open, take them in order or jump straight to what you need.