After lots of back and forth this implements the recursive backtracking algorithm. For efficiency reasons, it also should use multiple starting cells, and instead of classes uses structs. Other than that it should hopefully rely on bitwise operations for calculating paths, as these are faster.
This project generates 2D pixelart mazes.
Sources mainly from OpenGameArt.org, editing via Audacity for audio, and Avidemux & Shotcut for video, LibreSprite was used to edit & make some assets.
Provides a little game experience within the labyrinth. With collectible objects and some tiny additional challenge.
These instructions will help you get the project up and running on your local machine for development and testing purposes.
- Clone or download the repository
git clone https://github.com/n-c0de-r/MazeGenerator.git
-
Open the project in Unity
-
Attach the
MazeGenerator
script to an empty GameObject in your Unity project -
Call the
GenerateMaze()
function to generate the maze
MazeGenerator mazeGenerator = new MazeGenerator(sizeX, sizeY);
mazeGenerator.GenerateMaze();
- Use the
maze
array to display the maze in the Unity scene
int[,] maze = mazeGenerator.maze;
-
Open the project in Unity
-
Run the project and follow the instructions given in the User Interface.
If you want to contribute to the project, please follow these guidelines:
- Fork the repository
- Create a new branch (
git checkout -b my-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push the branch (
git push origin my-feature
) - Create a new Pull Request
This project is not licensed under any particular license.
-
Wikipedia - Provided link in the assessment task
-
Stack Overflow - For hinting at Jamis Buck
-
Jamis Buck - GitHub - This guy is an institution on mazes
-
Jamis Buck - Maze Blog - His visual representation helped me pick the right idea
-
Everyone on OpenGameArt.org
-
Rock sprite by vk
-
Brick, Steampunk and Jungle sprite by KnoblePersona
-
Ancient Temple Music by Alexandr Zhelanov
A maze generated using the MazeGenerator
script.