Mazes

While developing games, mazes are always a resource that comes handy. There are not many maze generators out there you can customize, making them yourself is slow and difficult and maybe you can't pay for the asset.

We thought developing an algorithm from scratch, able to generate fast a maze with given entrance and exit(s) and with an output easy to handle in any other context, was useful, challeging and a-maze-ing.

We learn why there aren't so many generators out there, as maybe a straight path is very easy to calculate but dead ends and crooked fake passageways are not so easy to model. Besides the random component, a hand-made heuristic behaviour is mandatory.

The key point was finding the heuristic and adjusting the two parameters that control it to obtain the maze we were looking for. Also determining at each step the allowed directions for the path and its length was crucial.

The result is quite fast, customizable maze generator, that gives a png of the maze and a txt file with a matrix representation.

Built With

Share this project:

Updates