Variable Size/Shape Overmap Specials

I’ve been thinking a bit about how to make more random structured specials generate, and I’ve come up with a few ideas that I’d like to get some feedback on. The end goal is to allow people to create structures like labs through json.

The first thing it needs is a field containing a tile or an array of tiles for each connecting direction, like the json mapgen roads. So, there would be something like an array for straight connections, dead ends, perpendicular connections, 3-way connections, and 4-way connections. Next, there would have to be arrays for up and down connections (these would also exist in the other connection arrays where applicable). Then there will be a set of parameters to control how large it can grow in each direction, including a min, max, and possibly a skew size (if you want a size between 2 and 8, but skewed towards 3). Finally, I think there should be some way to specify a set of features that have to be generated, and the randomly generated portions will fill in the connections.

Another way to specify could be to set up an array of “edge” tiles, then an array of “filler” tiles. Given a size and the given sets of tiles, it would generate a randomly sized structure with edge tiles forming a border and filled in with interior tiles. I think that works better for open spaces, like a junkyard, while previous method would work better for more detailed and enclosed structures, like a mall or a lab.

Any thoughts/suggestions?

For the second way you suggested, you might want to check out Wang tiles.

Nice, if I’m reading it right that would let us have something like 4 different kinds of room connections and a near unlimited number of individual rooms, and I don’t see a reason offhand it couldn’t handle non-rectangular layouts.

Yeah my initial thought process is that it would work almost like a road drawing algorithm, laying out a main hallway instead of a road