Hey there! LB requested a maze generation a couple of weeks ago.
In his (and mine) opinion, Pathfinding Object's maze generation is too limited and buggy. So I sat down and tried to program a maze generator, but failed.
Now, about 5 days ago, RickyRombo requested such an extension again - and z33z, author of the Pathfinding Object, posted a link to an open-ource dungeon generator.
It really impressed me, so I tried to program an extension that implements the library. It was really easy, and I'm really happy with the results.
Here are some screenshots and explanations.
All these were generated using the inbuilt painter for the Overlay Object.
[img:left]http://clickteam.info/looki/Pictures/Dungeon/0.png[/img]<-- A classic maze. Very random structure, many deadends.
This was generated using the default settings.
The same maze with rooms. Rooms are always rectangular.
The red rectangles are doors.
Many small rooms, doesn't take much longer to generate.
No deadends at all.
Not very random, but not very sparse either.
Random and sparse. Pretty boring.
Bigger mazes are possible, too! Even mazes 5 times as big are generated quickly on most computers.
No thick walls, but a grid.
If you enter 10x10 as size, the size will be 21x21.
The formula is pretty easy, (X*2+1). (X-1)/2 to convert it back.
Internally, the maze is stored in blocks with a wall at the top or left side, walls don't have their own block, that's why.
There are convertion expressions for those who don't want to use formulas.
The painter only works with Overlay now.
I'll add image export (BMP,PNG...) later.
Just look at the example to get some idea how it works.
Get the latest beta here. Have fun testing!