intermediate

Build an RTS Game

Top-down camera, click-to-move navigation, unit selection, minimap, and wave spawning for real-time strategy.

7 scripts · 2 systems

Learning Path

Follow these steps in order to build your RTS Game.

Included Scripts

Movement Beginner

Top-Down Camera

RTS/strategy camera with WASD panning, edge scrolling, scroll wheel zoom, and optional target follow.

3D RTSRPG
  • WASD/arrow key panning with configurable speed and smoothing
  • Edge-of-screen mouse scrolling with adjustable zone size
  • Scroll wheel zoom with min/max limits and smooth interpolation
2022.3+ · 2.6 KB
AI & Pathfinding Intermediate

NavMesh Click-to-Move

Click-to-move character controller using NavMeshAgent. Click anywhere to navigate, with destination marker and path line.

3D RTSRPG
  • Click-to-move navigation using Unity NavMeshAgent
  • Visual path line rendered with LineRenderer component
  • Destination marker prefab spawned at click position
2022.3+ · 2.1 KB
UI Intermediate

Minimap System

Render texture minimap with player icon, enemy blips, objective markers, and zoom control.

RTSRPG
  • Render texture-based minimap with dedicated orthographic camera
  • Automatic player following with optional rotation-match
  • Dynamic icon registration and unregistration for any tracked object
2022.3+ · 3.2 KB
Utilities Intermediate

Wave Spawner

Wave-based enemy spawner with configurable wave definitions, spawn points, delays, and wave completion callbacks.

FPSRTS
  • Configurable wave definitions with multiple enemy types per wave
  • Multiple spawn points with automatic round-robin distribution
  • Adjustable delay between spawns and between waves
2022.3+ · 3.0 KB
Health & Combat Beginner

Health System

Reusable health component with damage, healing, invincibility frames, and events.

PlatformerFPS
  • Damage and healing with clamped health values
  • Invincibility frames with configurable duration after taking damage
  • UnityEvent callbacks for health changed, damaged, healed, and death
2022.3+ · 2.4 KB
AI & Pathfinding Beginner

Waypoint Patrol AI

Enemy patrol between waypoints with configurable speed, wait times, and patrol patterns (loop, ping-pong, random).

RPGRTS
  • Three patrol modes: Loop, PingPong, and Random
  • Configurable move speed, rotation speed, and arrival threshold
  • Wait timer at each waypoint with adjustable duration
2022.3+ · 2.3 KB
UI Beginner

Health Bar UI

World-space or screen-space health bar with smooth fill, color gradient, and damage flash. Attach to enemies or use as HUD.

RPGFPS
  • Smooth fill animation with Lerp for satisfying health changes
  • Color gradient that shifts from green to yellow to red automatically
  • Damage flash effect on the background image when health decreases
2022.3+ · 2.4 KB

Related Systems

RTS Starter Kit

intermediate 6 files

Real-time strategy foundation with camera, click-to-move navigation, unit selection, minimap, and wave spawning.

RTS
Top-down camera with WASD pan, edge scroll, and zoom Click-to-move navigation using NavMesh agents Box selection and click selection for units Render texture minimap with unit blips and zoom

Enemy AI Kit

intermediate 6 files

Complete enemy AI pipeline: state machine, patrol, chase, health, and wave spawning with debug visualization.

RPGFPSGeneral
Finite state machine with clean enter/execute/exit lifecycle Waypoint patrol with loop, ping-pong, and random patterns Player detection with radius, FOV, and line-of-sight checks Chase behavior with give-up distance and return-to-origin