Random Maze Generation

Posted by beam on Aug. 16, 2007, 4:19 a.m.

Wow, it's been a long time since I've last posted. I've been busy, but just not with Game Maker. Lately I've been working on a roguelike (more on that later), but earlier today I felt like taking a break, and GM's icon was just sitting on my desktop begging to be opened.

Still with ideas fresh in my head from the various things I've read about random maze generation, I figured it wouldn't be tough to make one for Game Maker. I was mistaken of course, but I do finally have a working example after 3 or 4 rewrites.

Screenshot

About

All this does is generate a random maze, and lets the player walk around in it. The way it works is easy, all it is is an array, a stack, and three scripts. All of the array data is bit-packed, I didn't need to use multiple arrays to simulate structures.

Anyway, check it out. Maybe someone will learn something from it.

Download

Download (gm6) (updated 8/18/07)

Notes (updated)

The script files are now more split up. Instead of just maze_create, there is maze_create and maze_draw.

Comments

FireflyX 17 years, 3 months ago

Nice idea. You know what would be cool? Make it 3D

Grand-High Gamer 17 years, 3 months ago

There is a 3D one on the GMC somewhere.

noshenim 17 years, 3 months ago

just 3D looking or 3D……… O_O

anyway this is pretty good, but adds an extra cell or something to the end..

beam 17 years, 3 months ago

_player_, what do you mean?

also LOL 3d

if i wanted to make 3d games i wouldn't be using gm

ludamad 17 years, 3 months ago

Well, anyone could make 3D graphics to it - but a 3D maze would be really cool. Like paths in all 3 dimensions :P.

JW 17 years, 2 months ago

Also made one of these once. :)