# New Labs & maptile stuff

**URL:** https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789
**Category:** The Lab
**Created:** [June 11, 2015, 8:11am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789 "2015-06-11T08:11:32Z")
**Posts on this page:** 20
**Page:** 1

<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:11am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/1 "2015-06-11T08:11:32Z")

</div>

Labs right now are kinda boring. I like procedural generation for dungeons, but since the grammars are so simple in DDA, the game ends up creating only three or four types of maptiles in labs. There’s the big open room, the hallway intersection with four rooms, and those rooms with the annoying diagonal doors. I also really like the premade maptiles, but there aren’t enough of them. After you’ve seen them, you’ve seen them. Beyond the maptiles themselves, is the way they connect. There is always a wall running along the edge, giving you a clear idea as to where the tile is. And since there are always doors at all four faces, it’s really easy—barring turrets—to walk straight across an entire lab with no interruptions.

So my idea is to make a stock of premade tiles that can fit together in interesting ways. Rather than put walls along the borders, there will be partial rooms at the edges of the maptiles. When adjacent tiles connect, those rooms will combine into novel shapes. The tiles can be rotated to increase the number of possible combinations (and even flipped horizontally and/or vertically). Hopefully, those combo-rooms will keep the labs somewhat fresh even after a player becomes familiar with the tile set. And although the labs will still be on a fairly obvious a grid, by adding T-junctions, gates, turns, and dead ends to hallways, it should be a bit more maze-like.

Here’s a picture to illustrate:  
 ![](http://i.imgur.com/MvI6qLe.png?1)  
These are two of same tile side-by-side; it’s just they’re rotated to different degrees. At the corners you can see the partial rooms for this maptile, and down the middle how they join together seamlessly.

I’ve already made a starter stock of about twenty maptiles for anyone who wants to look them over.  
[https://mega.nz/#!fJMDDZzR!z-A4vtFPHsxR6WBBmp2V2ErIBJu7gk2dbV1ZbxtEDk0](https://mega.nz/#!fJMDDZzR!z-A4vtFPHsxR6WBBmp2V2ErIBJu7gk2dbV1ZbxtEDk0)

The terrain and furniture for these are done, but I’m still playing around with item frequencies and monster placement and traps and such. And there are no doubt mistakes in there since I’m still figuring out the jsons. I can handle that part OK, but the mapgen code is beyond me. So, it’s really up to someone else to decide if they want to make use of this stuff. If it works, I could also make sets for other buildings like mansions/bunkers/whatevers.

---

<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 11, 2015, 8:21am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/2 "2015-06-11T08:21:40Z")

</div>

Yes please, that fits in quite well with how we like to do things, but lab mapgen hasn’t gotten any love in a long time now.

---

<div class="post-metadata">

### Author: ![trelatyraelis](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/trelatyraelis/32/1054_2.png) [@trelatyraelis](https://discourse.cataclysmdda.org/u/trelatyraelis)
#### Post date: [June 11, 2015, 11:12am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/3 "2015-06-11T11:12:25Z")

</div>

Actually that’s a wonderful idea, good job.

---

<div class="post-metadata">

### Author: ![Shopkeeper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/shopkeeper/32/453_2.png) [@Shopkeeper](https://discourse.cataclysmdda.org/u/Shopkeeper)
#### Post date: [June 11, 2015, 11:49am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/4 "2015-06-11T11:49:44Z")

</div>

Looks cool and sounds like a great idea, I like it.

---

<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, 5:22pm UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/5 "2015-06-11T17:22:07Z")

</div>

Above ground buildings would require a little more work to place correctly. They’ll need edge, center, and corner pieces, and those will only be able to go in their respective slots rotated/flipped.

This is just a quick template/example with carpeting so you can see the tiles easier.

 ![](http://i.imgur.com/tTeETj8.png)

Even though I could mess around with the inner rooms and halls, the outer walls would always have the same shape so they’ll line up when stacked vertically. Stairs will also have to line up. Probably stairwell tiles would be tagged ‘upstair’ or ‘downstair’, and then those would get placed over each other.

It will need 3 tile types, however, it might not need separate tiles for z-level depth. Like I could label everything outside as a # on the map. Then, depending on the z-level, the game would interpret the # as open space, grass, or solid stone. It could make mansions of arbitrary height or depth. (Although i guess it would need to do the same with windows/doors too. Otherwise your basement would have windows looking out to solid rock.)

* * *

So as you can see they’d need more work to get working, and they would be less random than an underground dungeon, but above ground buildings might also be OK.

---

<div class="post-metadata">

### Author: ![Zireael](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zireael/32/956_2.png) [@Zireael](https://discourse.cataclysmdda.org/u/Zireael)
#### Post date: [June 11, 2015, 5:36pm UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/6 "2015-06-11T17:36:55Z")

</div>

These are amazing!

---

<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 11, 2015, 6:05pm UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/7 "2015-06-11T18:05:23Z")

</div>

This is a lot like what I was describing with the framework for the variable shape/size specials. I might have you make up a few test cases for me to use when (if) I get around to implementation.

---

<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 13, 2015, 11:29am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/8 "2015-06-13T11:29:40Z")

</div>

> [@vache](#):
>
> This is a lot like what I was describing with the framework for the variable shape/size specials. I might have you make up a few test cases for me to use when (if) I get around to implementation.

Yeah. If there’s some kind of algorithm that makes paths I could make better tiles.

What I made so far is for really simple and ‘dumb’ generation. Like, the game doesn’t have to do anything but slap the tiles next to each other. That’s the easy way to do it, but it ends up kinda samey and grid-like. It’s also possible for there to be rooms that are completely sealed off, or even whole sections of the map if the RNG is being mischievous. That would kinda suck for someone going into a lab, but it would really suck for a lab start if a player spawned in a closet that was only connected to another closet. (My answer was to put telepads in areas that might get sealed off, so they could at least get out, if not get back in again.)

Also, because every tile has to connect to every other tile, there is only one type of ‘plug’ at the edges. That really limits how much you can vary the rooms on a 24x24 grid. If you look through the example jsons, you can see they’re variations on just a few themes. But if there was a network of tunnels, I can make different types of edges, and thus more types of rooms/more expansive rooms.

Here’s an example pic to show what I’m talking about:

![](http://i.imgur.com/BwtBIdC.png)

I could make a set of tiles for main hallways that go straight, T intersection, 4-way intersection, dead end, and curve. Each map tile would have one type of edge allowing passage (marked here in green carpet) and another type for blocked edges (marked in red). In this pic along the north and east faces those edges would just end very abruptly, so there would also have to be another set with a red edge and an outer/rock edge.  
  
So, a hallway might look like this. (t)unnel (L)ab (e)dge and edge with (c)orner.

`
   cec
  ceLec
  eLtLe
eecLtLceeeeeeeeec
LLLLtLLLLLLLLLLLec
ttttttttttttttttLe
LLLLLLLLLLLtLLLLec
eeeeeeeeecLtLceec
         ceLec
          cec  
`  
That makes for a pretty huge lab. We could make it more compact, but then I’d have to figure out every combination of red/green/rock edges a tile could have -which is probably a lot. Or I could add more deadspace to the tiles, making a lab that’s spread out over a big geographic area, but which is made up of tight tunnels and smaller rooms embedded in solid rock.

Edit:  
Here’s a better/more compact way to do the same thing.  
(t)unnel, (e)dge and edge with (c)orner.

`
    cec
    ete
    ete
eeeectceeeeeeeeec
tttttttttttttttte
eeeeeeeectceeeeec
        etc
        etc
`

ANd a picture. Green and red edges for tunnel tiles. Red, purple, and white edges for the outer labs.

![](http://i.imgur.com/PGVpxyp.png)

---

<div class="post-metadata">

### Author: ![Vronkio](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vronkio/32/55_2.png) [@Vronkio](https://discourse.cataclysmdda.org/u/Vronkio)
#### Post date: [June 13, 2015, 11:38am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/9 "2015-06-13T11:38:53Z")

</div>

Sweet

---

<div class="post-metadata">

### Author: ![Imperator\_Urist](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/imperator_urist/32/464_2.png) [@Imperator\_Urist](https://discourse.cataclysmdda.org/u/Imperator_Urist)
#### Post date: [June 20, 2015, 1:25am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/10 "2015-06-20T01:25:12Z")

</div>

Keep going would love to see you do alot more, bunkers need some love.

---

<div class="post-metadata">

### Author: ![Pthalocy](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@Pthalocy](https://discourse.cataclysmdda.org/u/Pthalocy)
#### Post date: [June 20, 2015, 5:26am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/11 "2015-06-20T05:26:52Z")

</div>

Could this also be applied to mega-malls? I have yet to find one ingame for some strange reason, but hey. Very, very cool.

---

<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 22, 2015, 9:55pm UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/12 "2015-06-22T21:55:52Z")

</div>

> [@Pthalocy](#):
>
> Could this also be applied to mega-malls? I have yet to find one ingame for some strange reason, but hey. Very, very cool.

The malls right now are pretty good. I think real-word places look best when they’re handmade like that. Things like houses, malls, airports, stadiums, and other mundane places should look like the player expects or it breaks immersion. Procedural generations works best on weird places where you don’t have any expectations, like labs, temples, robotic factories, or any kind of ‘dungeon’.

There could be a less dramatic set of tiles for malls. Like, the mall stays pretty much the same, but it swaps out one type of store for another. Maybe one mall has a movie theater and another has a food court. Things like that.

---

<div class="post-metadata">

### Author: ![Pthalocy](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@Pthalocy](https://discourse.cataclysmdda.org/u/Pthalocy)
#### Post date: [June 23, 2015, 2:16am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/13 "2015-06-23T02:16:46Z")

</div>

Yeah, nothing nearly so drastic, just dumb block style replacing for different stores. That’s pretty much how malls work anyway - one store goes out of business, another moves in and occupies the exact same footprint/floorspace. The main idea would just be to keep people from taking two lefts and a right, to skip all the other rooms and head right for the liquor store any time they find a mall. That sort of thing.

I like your thinking though, regarding ‘dungeon’ style buildings. Well-thought, and I completely forgot about temples.

---

<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 30, 2015, 10:08am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/14 "2015-06-30T10:08:51Z")

</div>

I was thinking about how to use maptiles for more mundane things like houses. One thing CDDA lacks at the moment are downtown areas where the buildings are close enough to touch. Using pretty much the same idea for labs, we could make a block and then fill it in with the appropriate type of tile.

C=corner  
F=store front  
P=Parking

[spoiler][code]  
CFFFFFFFC  
CFFFFFFFC

or…

CFFFFC  
FPPPPF  
CFFFFC

or weirder shapes…

CFFFFFFFFC  
CFFFFCPPPF  
FPPPF  
CFFFC

[/code][/spoiler]

Then the buildings would touch. The interiors could have weird shaped rooms, but the outer walls should be regular so that we can stack them up 4 or 5 stories and they’ll always line up vertically.

So here’s a quick pic of what it could look like.

 ![](http://i.imgur.com/0fShTLT.png)

I just made one corner, but you can see two different types of storefront: one that juts out and one that’s a little recessed. Then there are two alleys giving access to the hollow interior to the block where there would be fire escapes and dumpsters. The bottom floor would be retail and above that would be small apartments.

---

<div class="post-metadata">

### Author: ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)
#### Post date: [June 30, 2015, 10:14am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/15 "2015-06-30T10:14:03Z")

</div>

Looks pretty cool.

Also, having tiles like that could help with adding buildings with more than one z-level.

---

<div class="post-metadata">

### Author: ![Gergoric](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/gergoric/32/467_2.png) [@Gergoric](https://discourse.cataclysmdda.org/u/Gergoric)
#### Post date: [June 30, 2015, 10:46am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/16 "2015-06-30T10:46:26Z")

</div>

And then some skyscrapers in between!  
Probably not more than 15 floors high and 3 floors deep.  
Maybe subway on multible levels.  
Let`s create megacities!

---

<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 30, 2015, 2:30pm UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/17 "2015-06-30T14:30:47Z")

</div>

One potential problem I’ve noticed with trying to structure buildings like that is if one shop is spread across two tiles you have to make sure the items are consistent. You could make it to where things like offices and bathrooms are the only things split across multiple tiles, that way they can fit into any shop or restaurant.

---

<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 30, 2015, 7:54pm UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/18 "2015-06-30T19:54:19Z")

</div>

> [@vache](#):
>
> One potential problem I’ve noticed with trying to structure buildings like that is if one shop is spread across two tiles you have to make sure the items are consistent. You could make it to where things like offices and bathrooms are the only things split across multiple tiles, that way they can fit into any shop or restaurant.

Yeah I thought it would have some type of generic retail space for those edges. Sorta like pawn shops. Probably all of the maptiles would be labeled, ‘historic downtown’, or something, because you wouldn’t know exactly what would be in it.  
Also, there have to be foyers and stairwells leading to the upper levels, so I might try to work those onto the edges somehow.

> [@Coolthulhu](#):
>
> Also, having tiles like that could help with adding buildings with more than one z-level.

Yeah, as long as there aren’t too many of then, as each wall-shape would require a whole different set of tiles. But that’s good for multilevel houses where you could have a collection of sets, where in each set the floors, and rooftops, line up vertically.

![](http://i.imgur.com/HVmRLL5.png)

And then swap maptiles from that set depending on the floor. So, on the horizontal plane it wouldn’t have any variation or connections, but vertically you would never know what you’d find on the second floor or in the basement.

That might be the easiest thing to add, since it would take less mapgen magic. Also once Z levels are in, new multilevel houses will need to be made anyway.

---

<div class="post-metadata">

### Author: ![trelatyraelis](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/trelatyraelis/32/1054_2.png) [@trelatyraelis](https://discourse.cataclysmdda.org/u/trelatyraelis)
#### Post date: [June 30, 2015, 8:34pm UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/19 "2015-06-30T20:34:47Z")

</div>

I downloaded the HOTLABS file, how does it work?

---

<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: [July 1, 2015, 12:16am UTC](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789/20 "2015-07-01T00:16:04Z")

</div>

> [@trelatyraelis](#):
>
> I downloaded the HOTLABS file, how does it work?

It doesn’t yet. It’s just for perusal so far. You can debug them in with the map editor if you wanna look at them.

[Next page](https://discourse.cataclysmdda.org/t/new-labs-maptile-stuff/9789.md?page=2)
