< Back

Maze generation

Recently, I have been experimenting with generating mazes through algorithms. The main focuses I had were generating an entirely random maze each time, displaying it, and the mazes always being completely solvable. I ended up researching famous algorithms, and eventually ended up working with Kruskal's Algorithm.

I created a version of the method in Python (for testing the logic of it), and then remade the algorithm in JavaScript and embedded it in a simple website. There's a preview that generates every time you load the page at the bottom of this page. Lastly, I decided to make a Unity game out of it, and transposed my poor Python script into an efficient C# generation file. After making a simple menu and player movement controls, the prototype was complete. All of the tests programs are available here, while the full downloadable game for Android is available here. Right now it's pretty glitchy and featureless, but I have big plans for other content coming soon. I also used the Unity3D project to generate the thumbnail in my portfolio by replacing the 2d rectangles with 3d rectangular prisms and doing some fancy lighting stuff.