Maze Generation Demo

This demo started as an afternoon project for a short challenge but took me down a rabbit hole of learning about the principles of different maze generation and maze solving approaches. I managed to apply some recursive programming and sharpen my prototyping skills even further. I will for sure encounter an opportunity to use some of these algorithms on a game project in the future.

 
 

To make this demo possible I designed and developed three different components. The first was the maze logic, which contains the maze generation algorithms (in the video “recursive backtracer” is shown) and holds the data about the maze once its generated. Maze generation is visualized by choosing a fixed rate for each step of the algorithm and placing a cube shaped marker on whichever cell the algorithm is targeting.

The second is the maze solver which uses recursion to search for the nearest exit. Similarly to the maze generation the solver places markers wherever it is searching and the algorithm is set at a slower fixed rate so it can be visualized.

Finally the maze is built using a wall prefab and a short script which updates which walls should be destroyed when the maze is being generated. This part is really simple as every cell is an even square and all start with their four walls intact.

Previous
Previous

C++ Game Engine - 2021

Next
Next

Procedural Generation - 2020