Author Topic: Procedurally Generated Building Environments  (Read 7799 times)

Alex E

  • Rogueliker
  • ***
  • Posts: 118
  • Karma: +0/-0
    • View Profile
    • Email
Procedurally Generated Building Environments
« on: June 20, 2012, 08:17:44 AM »
I've played a lot of roguelikes, and I've seen a lot of randomly generated environments. I've seen nicely generated dungeons and wilderness, but I don't think that I have played a game that has had an exceptional building generator.

I've played a few roguelikes that create a rectangular outline of a building, and then divide the space inside a few times to create rooms of varying shape. But I just don't think it looks "random" enough.

What's your opinion on randomly generated buildings in roguelikes? How would you go about making them?
Would using predefined tiles be the best way to go about it?

How about the inside of said buildings? Where would the cabinets go? How about the tables? 

I ask this because the current roguelike I am creating takes place in modern time, and I don't think my current procedural building generation is varied or detailed enough  :).

Pueo

  • Rogueliker
  • ***
  • Posts: 263
  • Karma: +0/-0
    • View Profile
    • Email
Re: Procedurally Generated Building Environments
« Reply #1 on: June 20, 2012, 06:30:25 PM »
Hm, that's a good question.  It's a little difficult, though, because "buildings," by definition, are not random.  They are planned and constructed with a specific purpose purpose in mind, whether it be residential, industrial, or commercial.  

So, the most logical solution would be to choose a "purpose" for the building, find out what is needed to fulfill that purpose, and put it into a building.  

Say, for example, you wanted a residential building.  You determine that for a good residential "feel," you need at least 200 sqti (square tiles, like square feet, but instead of feet, you use tiles to measure) of space.  So, your building is something like 10x20 or 20x10 or 20x20 or anything that gets you at least 200 sqti. You could also slap X amount of rectangles together, whose total sqti is at least 200 sqti, giving you L- or U- or H- or some-other-letter-shaped houses.  Then, you figure a residential space needs at least one bedroom, bathroom, kitchen, dining room,  patio, etc.  So, within your 200+ sqti, you put in at least one of those things; maybe limit the kitchen/dining room/patio to only one (no need for 3 kitchens!).  Of course, each type of room also has unique furniture/appliance needs, as there's no need for an oven in the bedroom.  So put the right furniture/appliances in the right rooms, polish it up, and voila! Nice, random (yet structured) residential buildings.

You can do the same with commercial (cubicles, offices, bathrooms, janitor closets, etc) and industrial (factory floor, bathrooms, maybe one office, control-room-type-thing, etc).
« Last Edit: June 20, 2012, 06:33:59 PM by Pueo »
{O.o}
 |)__)
   ” ”   o RLY?

kraflab

  • Rogueliker
  • ***
  • Posts: 454
  • Karma: +0/-0
    • View Profile
    • kraflab.com
Re: Procedurally Generated Building Environments
« Reply #2 on: June 20, 2012, 06:33:57 PM »
check out rogue survivor, and possibly cataclysm, though I think rogue survivor has more interesting looking interiors.

Alex E

  • Rogueliker
  • ***
  • Posts: 118
  • Karma: +0/-0
    • View Profile
    • Email
Re: Procedurally Generated Building Environments
« Reply #3 on: June 20, 2012, 07:13:10 PM »
So, the most logical solution would be to choose a "purpose" for the building, find out what is needed to fulfill that purpose, and put it into a building.  

check out rogue survivor, and possibly cataclysm, though I think rogue survivor has more interesting looking interiors.

I've played rogue survivor, but not cataclysm. I guess it would be a good idea to make many different types of buildings, such as those ranging from apartments to markets, and make each of them have a set of instructions on how to create them. In those instructions, there could be random values for things, such as wall size or door placement. That's a good way to do it Pueo, thanks for saying.
« Last Edit: June 20, 2012, 07:17:05 PM by Mosenzov »

Snargleplax

  • Rogueliker
  • ***
  • Posts: 50
  • Karma: +0/-0
  • snargleplax
    • View Profile
    • SnargleQuest dev log
Re: Procedurally Generated Building Environments
« Reply #4 on: June 21, 2012, 05:23:10 AM »
I think you should do it from the bottom up: figure out what rooms go in the building (randomize/schematize this how you like for appropriate variety), then develop ways of smooshing them together into blocks.  Allow some room for hallways once in a while, add doors as needed.