
AI Maze Game
Developed and published a full 3D offline FPS shooting game with AI-driven enemies, boss battles, and dynamic behavior systems. Designed a multi-weapon system (pistols, rifles, snipers) with progression-based upgrade mechanics. Built mission-based gameplay with survival and combat modes; integrated in-app purchases and ad monetization.
Project Overview
3D Maze Race Game is a procedurally generated competitive maze game developed in Unity using C#. In this project, the player competes against an AI-controlled bot to navigate a unique 3D maze and reach the finish point first.
Each maze is generated at runtime using the Depth-First Search (DFS) algorithm, ensuring that every level is fully connected and solvable. The AI bot uses the A* search algorithm with Manhattan distance as its heuristic to compute the optimal path from its current position to the goal and then follows that route autonomously.
To add strategic depth, the game includes collectible power-ups that provide temporary advantages, as well as a dead-end penalty system that punishes players for entering incorrect paths. The combination of procedural generation, algorithmic pathfinding, and competitive gameplay creates a challenging and replayable experience.
Key Features
- Procedural Maze Generation — Generates a new valid and solvable maze every time the game starts.
- DFS-Based Maze Creation — Uses Depth-First Search to carve pathways and guarantee connectivity.
- AI Opponent — An autonomous bot that solves the maze using A* search algorithm.
- Manhattan Heuristic — Applies Manhattan distance to efficiently estimate distances on the grid.
- Race-to-Finish Gameplay — The first competitor to reach the exit wins.
- Power-Up System — Collectibles that can boost speed or provide other gameplay advantages.
- Dead-End Penalty — Applies a disadvantage when the player enters dead-end paths, encouraging strategic navigation.
- Replayability — Random maze generation ensures a fresh challenge in every session.
Technical Implementation
Core Systems Developed
- Maze Generator — Creates the maze structure using recursive DFS and wall removal between cells.
- Pathfinding Engine — Implements A* with open and closed sets to compute the shortest path.
- AI Navigation Controller — Converts the generated path into movement instructions for the bot.
- Player Controller — Handles real-time movement and interaction with maze elements.
- Power-Up Manager — Spawns and manages collectible effects.
- Penalty System — Detects dead ends and applies temporary movement penalties.
- Game Manager — Controls race state, winner detection, and UI updates.
Technologies Used
- Unity
- C#
- Visual Studio
- Graph Algorithms and Data Structures
Algorithms Used
Depth-First Search for Maze Generation
DFS starts from an initial cell and recursively explores unvisited neighboring cells while removing walls. This process creates a spanning tree, guaranteeing exactly one connected path structure and ensuring the maze is solvable.
A* search algorithm for Bot Navigation
A* evaluates nodes using:
f(n) = g(n) + h(n)
Where g(n) is the actual movement cost from the start node, and h(n) is the estimated remaining cost to the goal using Manhattan distance. This approach guarantees an optimal path in a grid-based maze with uniform movement costs.
Development Challenges and Solutions
Generating Guaranteed-Solvable Mazes
The primary challenge was ensuring that every randomly generated maze could always be completed. DFS was selected because it naturally creates a fully connected maze with no isolated sections.
Building an Intelligent AI Opponent
The bot needed to make efficient decisions in real time. A* with Manhattan distance was implemented to compute the shortest path quickly and reliably.
Balancing Gameplay Mechanics
Power-ups and dead-end penalties were introduced to create a balance between algorithmic efficiency and player decision-making, making races more dynamic and engaging.
Skills Demonstrated
- Procedural Content Generation
- Artificial Intelligence and Pathfinding
- Graph Theory Algorithms
- Data Structures (Stacks, Priority Queues, Lists)
- Gameplay Programming
- Object-Oriented Programming (OOP)
- UI and Game State Management
- Algorithm Optimization
Learning Outcomes
This project deepened my understanding of graph traversal, heuristic search algorithms, and procedural generation. It also strengthened my ability to combine theoretical computer science concepts with engaging gameplay mechanics in a real-time interactive environment.

AI Maze Game