FORUM ARCHIVED

Procedural Generation

Discussion in 'Dungeons of Dredmor General' started by ZiZNaK, Dec 24, 2012.

  1. ZiZNaK

    ZiZNaK Member

    Somebody shed a lil light on how the dungeons are built? Does this engine generate a whole level when you enter or does each room spawn as you enter it? Are there a set group of room designs or are the rooms themselves made up of smaller interchangeable pieces?

    From just the hours I've played recently I can't really say for sure what. I do notice some rooms have appeared exactly as they have in previous incarnations so I'm guessing the rooms are set?
     
    OmniaNigrum likes this.
  2. LionsDen

    LionsDen Member

    Yes, the rooms are set. Look at the rooms.xml file to see them. Each level is generated when you first enter that level. At least that has been my take on it for a long time and I think it is true.

    Sometimes a level will crash if there is a bad rooms on it and it only crashes when you first go to that level so it must generate them on the first visit only. And by bad rooms, I mean rooms that have something wrong in the xml data. It happens occasionally.
     
    Kazeto and OmniaNigrum like this.
  3. Essence

    Essence Will Mod for Digglebucks

    ^^ This is all true. Dungeons are spawned procedurally, and along more than one path at once, which is why on rare occasions you'll see two of a one-per-level room -- it means it spawned simultaneously on more than one path, so the checker for each room didn't see the other (as in double zoos).
     
    Kazeto and OmniaNigrum like this.
  4. Kazeto

    Kazeto Member

    Some combinations are just more likely to appear because either the room shapes make it easy for them to fit close to each other, or those rooms have more than just one instance in the data files (and thus what you get is not the same room, but one that looks like it).
     
    OmniaNigrum likes this.
  5. Suho

    Suho Member

    So that's why we sometimes get double zoos. Learn something new every day!
     
    OmniaNigrum likes this.