Realm Rush

University
2022
Realm Rush view 1

01. The Overview

Realm Rush is a 3D isometric tower defense game. The core gameplay loop involves players strategically placing defensive towers on a grid-based map to prevent waves of enemies from reaching a designated end point. A key and unique feature of the game is its dynamic pathfinding system, where enemies recalculate their route in real-time as the player places towers, allowing for complex maze-building strategies.

02. The Challenge

The primary technical challenges in this project were:

  • Implementing a dynamic pathfinding system that responds to player actions in real-time.
  • Ensuring that the player cannot create an unbeatable level by completely blocking the enemy path.
  • Efficiently managing the spawning and movement of numerous enemy units.

03. The Approach

The approach to the technical challenges in this project were:

  • A novel hybrid C# and Python approach. C# scripts in Unity manage the game logic and grid system, while the core A* pathfinding algorithm is implemented in a Python script. IronPython is used as a bridge to run the Python script from within the C# environment.
  • Before a tower is placed, the game simulates the move and runs the pathfinding algorithm to check if a valid path to the destination still exists. The tower can only be built if a path remains.
  • The game uses a standard object pooling pattern to recycle enemy instances. When a new tower is placed, a notification is sent to all active enemies, prompting them to request a new path from the pathfinding system.

04. Key Features

  • Dynamic A* Pathfinding
  • Tower Placement System
  • In-Game Economy
  • Object Pooling
View Source Code

Technologies Used

UnityC#IronPython