Prototype: Maze Generation 2 December 23rd, 2009 by 31eee384
Never mind about it being a side-scroller. It’s going to be something much more deserving in my opinion: a survival/adventure game. I changed up the generation a lot since the last prototype, and now it forms long hallways equally in each direction as well as even rooms. The hallways can get pretty long sometimes, and I’m thinking about adding in some sort of intersection code to break it up a bit.
The idea of the game is that you have somehow been dropped into this gigantic maze-like cave, and you must explore the place to have any hope of escape. However, there are enemies down there–some trying to kill you, some not–so you must build up defenses, set traps, and be careful. Setting up defenses also means digging into walls–so don’t worry about the game being too maze-like; it’s bypassable.
Using this algorithm I’m hoping to create genuinely interesting levels, and that’s what the color in the background is. I’m not sure how I’m going to use it, but it’ll help alleviate some of the genericicity commonly found in procedural environments. I’m aiming for a level of complexity rivaling that of a certain dwarven game but in top-down single-player real-time graphical goodness. As I type this I realize I’m going to be lucky to get in movement before I get fed up with the project.
Also, if you notice the wall count indicator, I’ll preemptively let you know now that that’s just an estimate. The actual number of walls is never actually counted because that would either require me to loop through every pixel in the bitmap (160,000 pixel tests) or find out how many pixels a room is replacing, not counting the already-created hallways (another 30 minutes minimum of programming/debug time). It’s only used as a lower limit to the map generation; if a map doesn’t have a sufficient number of hallways it’s scrapped for a more spacious generation.
One Response
Eric Says:
Omg! This is the best thing ever! I love this website! You should make another maze generator that fills in the whole thing