Runners in tower defense games collect prizes dropped by defeated enemies and return them to the tower. This tutorial walks through implementing a runner class and managing multiple runners.

The Runner Class

The runner class handles basic functionality. Each runner has default speed and hit points. The initial design separated runner logic from graphics using dedicated UI classes. This approach makes it easy to swap graphics systems later.

Key features include:

  • Speed upgrades through card selection
  • Prize inventory system
  • Position and visibility controls
  • Getter functions for tower communication

Managing Multiple Runners

The runner group controls all runner movement. It schedules free runners to collect prizes using physics groups within the update routine. The system uses tweens to move runners from tower to prize and back. When a runner returns, it triggers a game event that updates statistics.

Watch Tutorial