kikito wrote:I'll contribute with a presentation that I didn't do myself, but it's awesome nevertheless:
Nice. It seems I unwittingly implemented Prim's algorithm for maze generation.
EDIT: nope, it's the "growing tree" one, although I did use the term "frontier". I experimented with taking the newest and introducing a bias for older nodes, but I prefer the straight up random one, that works similar to Prim's.
Ref wrote:2. I get the same maze every time. (See that you have a shuffle function but ...)
that's odd... try adding math.randomseed(os.time()) not sure if I forgot that
A little help.
Tried seeding in a number of locations and calling random.shuffle a random number of times but still seem to get the same maze.
Overlooking something obvious.
See attachment for what I'm getting (added map overlay).
Great link! It looks like I happened to make something similar to that "growing tree" algorithm.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit! Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Ref wrote:2. I get the same maze every time. (See that you have a shuffle function but ...)
that's odd... try adding math.randomseed(os.time()) not sure if I forgot that
A little help.
Tried seeding in a number of locations and calling random.shuffle a random number of times but still seem to get the same maze.
Overlooking something obvious.
See attachment for what I'm getting (added map overlay).
Happens to me to, just never realised it was the same map.
Anyway here's another one that gives DIFFERENT mazes.
It's also animated. ( kinda )
Attachments
New Maze ( without loops )
love 2013-03-01 17-30-59-35.jpg (213.04 KiB) Viewed 7741 times
Zer0 wrote:
Anyway here's another one that gives DIFFERENT mazes.
Nice one. I like the visualization. However, the maze in the lower picture (the one with the tunnels) is not a maze. There are many parts in the maze that are not connected to the rest.
Edit: You were faster than me and removed the picture already.
micha wrote:Nice one. I like the visualization. However, the maze in the lower picture (the one with the tunnels) is not a maze. There are many parts in the maze that are not connected to the rest.
I know.
I am making a weave maze ( if that was the name ) I just need to figure that thing out.
EDIT: I am now done with the weave maze.
Attachments
Maze 2!
love 2013-03-01 17-48-04-85.jpg (215.04 KiB) Viewed 7737 times
Maze 1!
love 2013-03-01 17-48-06-51.jpg (215.03 KiB) Viewed 7737 times
Hi Zer0!
Once I weeded out all the threading stuff, it was apparent why we were seeing the same maze being generated.
Maze generating library is actually very easy to use & stable.
Thanks, greatly appreciated.
Attached script continuously generates random mazes.
The number of cells can be changed (on the fly) using either the arrow keys or wasd.
The 't' key shows the actually content of the maze map and 'f5' saves the maze to Love's hidden directory.
Plan to use with an A-star program.