Build an RTS Game
Top-down camera, click-to-move navigation, unit selection, minimap, and wave spawning for real-time strategy.
7 steps 7 scripts 2 kits intermediate
The path
Add these in order. Each step builds on the one before it.
- Start: Top-down camera with pan, edge scroll, and zoom TopDownCamera.cs · RTS/strategy camera with WASD panning, edge scrolling, scroll wheel zoom, and optional target follow.
- Add click-to-move navigation with NavMesh NavMeshClickToMove.cs · Click-to-move character controller using NavMeshAgent. Click anywhere to navigate, with destination marker and path line.
- Add health to units HealthSystem.cs · Reusable health component with damage, healing, invincibility frames, and events.
- Show unit health bars HealthBarUI.cs · World-space or screen-space health bar with smooth fill, color gradient, and damage flash. Attach to enemies or use as HUD.
- Create patrol routes for AI units WaypointPatrol.cs · Enemy patrol between waypoints with configurable speed, wait times, and patrol patterns (loop, ping-pong, random).
- Add a minimap with unit indicators MinimapSystem.cs · Render texture minimap with player icon, enemy blips, objective markers, and zoom control.
- Spawn enemy waves for encounters WaveSpawner.cs · Wave-based enemy spawner with configurable wave definitions, spawn points, delays, and wave completion callbacks.
Kits for this path
Every script in this path
- Top-Down CameraRTS/strategy camera with WASD panning, edge scrolling, scroll wheel zoom, and optional target follow.
- NavMesh Click-to-MoveClick-to-move character controller using NavMeshAgent. Click anywhere to navigate, with destination marker and path line.
- Minimap SystemRender texture minimap with player icon, enemy blips, objective markers, and zoom control.
- Wave SpawnerWave-based enemy spawner with configurable wave definitions, spawn points, delays, and wave completion callbacks.
- Health SystemReusable health component with damage, healing, invincibility frames, and events.
- Waypoint Patrol AIEnemy patrol between waypoints with configurable speed, wait times, and patrol patterns (loop, ping-pong, random).
- Health Bar UIWorld-space or screen-space health bar with smooth fill, color gradient, and damage flash. Attach to enemies or use as HUD.