Ultima Castle Generator – Day 2

Advanced a bit more in the Ultima Castle Generator for the ProceduralGeneration reddit monthly challenge # 2.

The generator now generates a high level structure, based on the rules I derived from observation of the maps.

For now, and hoping to finish in time for the challenge, only the first floor of the castle will be generated.

You can check the source code or play around with the generator online.

Next step is going one level further to subdivide the map into areas based on the generated structure.

Here is an example result:

{
  "general": {
    "size": "big"
  },
  "surroundings": {
    "hasMoat": true
  },
  "towers": {
    "size": 5,
    "crossWindows": false,
    "circle": false,
    "verticalConnections": false,
    "horizontalConnections": "bottom",
    "connectionCorridors": {
      "type": "halls",
      "hallDecoration": {
        "torches": true,
        "plants": true,
        "columns": false,
        "fountains": false
      },
      "hallWidth": 3
    }
  },
  "central": {
    "type": "mainHall",
    "hasSpecialFloor": true,
    "centralFeature": "fountain",
    "hasFireplace": true,
    "width": 15,
    "height": 14,
    "shape": "cross"
  },
  "entrances": {
    "northExit": {
      "hasFloor": false,
      "hasCrossWindows": true,
      "lighting": "torches",
      "hasBanners": false
    },
    "southExit": {
      "hasFloor": true,
      "hasCrossWindows": true,
      "lighting": "torches",
      "hasBanners": false
    }
  },
  "rooms": [
    {
      "type": "throneRoom",
      "hasCarpet": true,
      "linedWithColumns": false,
      "linedWithTorches": true,
      "hasSecondaryThrone": false,
      "hasMagicOrb": true
    },
    {
      "type": "lordQuarters",
      "piano": false,
      "clock": true,
      "bookshelf": false,
      "fireplace": true
    },
    {
      "type": "livingQuarters",
      "freeSpace": 0
    },
    {
      "type": "diningRoom",
      "luxury": 2,
      "fireplace": true
    },
    {
      "type": "kitchen",
      "filled": 4,
      "barrels": 2,
      "boxes": 2,
      "hasOven": true
    }
  ]
}


One thought on “Ultima Castle Generator – Day 2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s