Ok, I must confess I’m a bit obsessed over this. I’m sorry, I can’t help it.
Lots of advancements today, here’s a sample of the current results. You can check it out online here
Today I created the RoomsGenerator; it takes the high level castle structure as an input from the CastleStructureGenerator and based on it it generates a set of rooms and places them on the map.
I also created the Canvas Renderer in order to be able to visualize the results in a graphic way, this in turn helped me tweak some size parameters on the structure generator.
Placing the towers, walls, entrances and central feature was not very complex, the challenge was filling the remaining space with rooms…
Since the area to be filled is not rectangular (the main hall and the entrances should not be covered), doing recursive subdivision such as the one I made for the Stygian generator was not going to work; I thought as an option I could generate smaller rectangular areas from the big area and apply subdivision to each, but since the scale was so small (32×32 for the full map, about 13×20 or less for the area to be subdivided), I knew subdivision was going to be troublesome.
In the end I thought on doing something I rarely do: placing rooms by brute force. Initial results were not very good with lots of unwanted empty space. I was about to explore other options…
…but then, I figured I could make the rooms grow to fill the empty space! 🙂 As a result architecture looks a bit more “organic” than the one generated by subdivision, with less “long lines”, which is good for small maps like this one.
I’m pretty happy with the current results, following are the next steps:
- Enhancing the room generator to have in consideration what rooms should be placed next to each other
- Creating the third level generator which actually renders the rooms into tiles and places all decoration and stuff.
- Connections between rooms will be added by the third level generator (that should suffice for the scope of the generator).
One thought on “Ultima Castle Generator: Day 3”