A 3D first-person shooter game made with Unity in which the player must traverse and destroy a randomly-generated maze. This game was made as part of a course assignment for COMP 521 Modern Computer Games in fall 2020 at McGill University. The goal of the assignment was to implement maze generation algorithms.
The game generates a random unicursal path leading to the edge of the canyon and a random perfect 5x5 maze that spans the canyon.
You can play the game on GitHub Pages HERE!
- Standard Assets (for Unity 2018.4) by Unity Technologies
- Terrain Tools Sample Asset Pack by Unity Technologies
Due to copyright reasons, these assets are not included in this repository. They must be downloaded from the Unity Asset Store and imported into the Unity project.
You must have Unity version 2019.4.9f1 installed on your computer. Other versions of Unity may have compatibility issues.
Clone the master branch of this repository with git clone --single-branch https://github.com/christopher-boustros/Unity-FPS-Maze-Game.git
, or alternatively, download and extract the ZIP archive of the master branch.
Open the Unity Hub, click on the Projects tab, click on the ADD button, and select the root directory of this repository.
Click on the project to open it in Unity.
In the Project window, double click on the MainScene.unity
file from the Assets/Project/Scenes
folder to replace the sample scene.
Download and import the Standard Assets (for Unity 2018.4) and Terrain Tools Sample Asset Pack by Unity Technologies from the Unity Asset Store. Then, delete the Assets/Standard Assets/Utility/SimpleActivatorMenu.cs
file, which is not supported by Unity version 2019.4.
Click on the play button to play the game.
W = move forward
A = move left
S = move backward
D = move right
Space bar = jump
Left-click = throw projectiles
You must pick up projectiles along the path leading to the edge of the canyon. Once at the edge, you must traverse the maze that spans the canyon by jumping between adjacent maze cells to reach the other edge of the canyon. Once you have reached the other edge, you must throw projectiles to destroy one maze cell that is part of the maze solution to make it impossible to traverse the maze again.
If this is accomplished, the game is won. If instead the player falls into the canyon, runs out of projectiles, or destroys the maze solution before reaching the other side, the game is lost. In either case, a win/loss state is indicated.
-
The implementation of the
MazeCell
class andInitializeGrid()
method of thePathGenerator.cs
script is inspired by Richard Hawkes's implementation here. -
The implementation of the
ThrowProjectile.cs
script is inspired by Duan Li's implementation here.
No code in this repository is copied from the above sources.
This repository is released under the MIT License (see LICENSE).