# Variable Size/Shape Overmap Specials

**URL:** <https://discourse.cataclysmdda.org/t/variable-size-shape-overmap-specials/9780>\
**Category:** The Lab\
**Created:** [June 10, 2015, 6:45pm UTC](https://discourse.cataclysmdda.org/t/variable-size-shape-overmap-specials/9780 "2015-06-10T18:45:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [June 10, 2015, 6:45pm UTC](https://discourse.cataclysmdda.org/t/variable-size-shape-overmap-specials/9780/1 "2015-06-10T18:45:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Sunshine](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@Sunshine](https://discourse.cataclysmdda.org/u/Sunshine)\
**Post date:** [June 11, 2015, 8:29am UTC](https://discourse.cataclysmdda.org/t/variable-size-shape-overmap-specials/9780/2 "2015-06-11T08:29:32Z")

</div>

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

> **[Wang tile](https://en.wikipedia.org/wiki/Wang_tile)**
>
> Wang tiles (or Wang dominoes), first proposed by mathematician, logician, and philosopher Hao Wang in 1961, are a class of formal systems. They are modelled visually by square tiles with a color on each side. A set of such tiles is selected (for example the set in the picture). Then copies of the tiles are arranged side by side with matching colors, but without rotating or reflecting the tiles. The basic question about a set of Wang tiles is whether it can tile the plane or not, i.e., whether an ...

  

> **[Introduction to Wang Tiles](http://procworld.blogspot.com/2013/01/introduction-to-wang-tiles.html)**
>
> This is guaranteed to be a very colorful post. Since the early days of computer graphics, texturing has been the favorite method to bring ...

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [June 12, 2015, 2:52am UTC](https://discourse.cataclysmdda.org/t/variable-size-shape-overmap-specials/9780/3 "2015-06-12T02:52:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)\
**Post date:** [June 12, 2015, 7:00am UTC](https://discourse.cataclysmdda.org/t/variable-size-shape-overmap-specials/9780/4 "2015-06-12T07:00:19Z")

</div>

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
