Hexagonal maze generator in Rust!
This was very interesting to make, I don't think I've coded with a hexagonal grid before! And neither have I coded in Rust. Learning Rust was actually the main purpose of this project.
You can choose the width, height and generation seed!
This is not a web thing, you'll have to download and compile this one if you want to try it yourself. But who knows, I might make a web version in the future!
It uses a maze generation algorithm that is biased towards long winding passages. I think mazes like this are interesting!
I also generate the entrance and exit using a neat algorithm that finds the longest possible path through the maze, while keeping in mind that the entrance and exit can only be at the edge.
This is the same result I have already achieved in my shaped maze generator; but in that case, I was using a naive implementation that tries and measures all possible combinations. The naive implementation was very slow. By time complexity, it was O(n^3). The new implementation is O(2n) which is actually equivalent to O(n). This basically means, it is incredibly fast and you can generate big mazes with it!