3 ms·
Ah, this is very similar to some old maze generation toys I was working on a few years back. I was experimenting with adding a little extra stochasticity to the
by catpolice 9y ago
Ah, this is very similar to some old maze generation toys I was working on a few years back. I was experimenting with adding a little extra stochasticity to the mix. E.g. selecting from the last ~30 neighbors added creates interesting mazes with "multiple growth fronts" rather than one tendril or a uniform expansion at the edge. You can see a GIF example here: https://raw.githubusercontent.com/j-s-n/mazes/master/examples/algorithm3-thickness4-128x128.gif https://raw.githubusercontent.com/j-s-n/mazes/master/example...
(My code uses toroidal topology, which is why you can see things going off the edge and coming back on the other side.)
And things like varying whether new neighbors are added to the head or tail of the list adds a little perceptible chaos. It's too bad it looks like my demo site is down right now.
There's a (old, badly documented) JS demo here with about 6 variant algorithms: https://github.com/j-s-n/mazes-js https://github.com/j-s-n/mazes-js
And a better documented but still out of date Python example (that hand-encodes an animated gif here): https://github.com/j-s-n/mazes https://github.com/j-s-n/mazes