Devlog: Sheerk Prairie maze
Added 2024-12-25 08:06:53 +0000 UTCMerry Christmas! Another small devlog, because I've spent a week trying to figure out how to optimally design the maze area in level 3 of CowHammer. I knew which overall shape I wanted it to be, so I first translated it into an undirected graph that I could program, hoping to make it fully procedural.
Sheerk Prairie maze as an undirected graph
I then spent a few days building a data structure that helped me generate all possible mazes. Initially, of course, I got hundreds of useless solutions, but then I started adding restrictions:
The route from the start (S) to the goal (O) had to change depth layers a minimum number of times. After a few experiments, I concluded that 5 changes per route looked best - anything below that was too simple.
Layer transitions had to happen between 2 and 4 rooms, so the player doesn't rush through a depth layer nor stays there for too long. We want our maze to have corners, but not to be entirely made out of corners.
Routes had to have at least one path intersection, to make them more interesting. I modeled those as bridges and tunnels.
With these restrictions, it turns out that there are only two possible routes (plus mirroring and very minor length variations) that reach O from S. So I drew them together and noticed something great: one half of those routes was the same, and the other half was mirrored. That meant that, with the right dead ends, I could build all maze combinations with a single model.
Modular maze schematic
And so I did.
Modular maze Blender model
Keep in mind that the maze will be configured randomly upon entering Sheerk Prairie, but it won't rotate while the player goes through it. That would probably be fun, but it wasn't designed for that, so cheeky players would probably figure out where to stand so the maze solves itself upon rotation. That or they'd get accidentally crushed by a moving wall. Plus, there will be an actual rotating maze in level 5 anyway.