Scatter Maze

Published 2023-06-12


This is something that has been impossible for me to do - until now.

I always wanted to try and make what years ago I labeled as a "Scatter Maze."

That is, a screen full of random lines but done in such a way that all points could be reached around them.

Back on the Apple ][, I used horizontal and vertical lines intersecting each other, but at the time (I was 12) my brain couldn't fathom how to make certain it was possible to draw these lines and guarantee a path around them.

So - the monsters would hit the wall and start chewing. :) So - once you fought the monster, you could use the hole he munched through the wall to get you to get to the other parts of the dungeon. Not the best solution, but it worked.

Later I realized it could be done but I would need a VERY fast fill routine to even come close to exploring this idea.

And - here it is. No, it's not very fast but it's fast enough. Guaranteed to always leave a path to all points despite the random placement of walls. I set it so all vectors appear on a tight grid. If you want the freedom of all points and any size walls, just change the program to reflect this.

Interesting to watch, might even be useful for someone building a rather chaotic dungeon or something.

And with that, bedtime. Hope you like it !