Post news RSS Altars, Vases, Churches, Houses, Taverns, Cathedrals

A massive update for procedural generation of building interiors, religious altars, and various decorations!

Posted by on

A huge update this week! With my PhD submitted to my university and the paper I’ve been working on the last month submitted to an appropriate journal, I’ve been able to devote the full week to coding. We therefore have some level design, some graphics, some ideas, and some other stuff, so let’s get going


I’ve been working a lot on many of the building interiors this week that still need doing. First off I’ve finished off religious building interiors, and handled a pretty wide range of strange goings-on and errors with their generation, such as the ability to walk outside them through cracks in the walls, or staircases which don’t correctly match up with their partners on other floors. They can have 1/2/3 floors, and have a massive range of variation in pretty much every way. Here are some examples, drawn from a religious district in one of the world I was recently testing things in (these imagines display the outside, the ground floor, then other higher floors, going left to right):

I’ve also thrown together the generation code for the most basic of houses, those in slums and their slightly-better equivalents in lower-class housing districts. These, naturally, are tremendously simple, and it will be extremely rare for a player to have any need to enter one, but they’re there now, and on the off-chance that one will be housing something secret in a basement, the code is in place to allow that to be the case in the future. It generates an appropriately-sized space, places a bed against a wall, and then places a table against a wall, and some chairs around the table; slum housing, by contrast, will only have a bed (and a very simple bed at that) and sometimes a chair.

I then went to work on taverns, which always spawn in every single lower-class district. There are there basic sizes of tavern (all are a simple rectangular shape, and in keeping with my intention to make buildings broadly understandable from only the outside, no other buildings share this basic shape in the sizes that taverns occupy). There’s several dozen possible interiors, each with various sub-sets of generation and different angles they can be oriented in, tables/chairs which do/don’t spawn, etc, and all contain a staircase up to the bedroom where the innkeeper lives, and a small number contain a down staircase towards a wine/ale cellar, and perhaps something secret down there too? Pretty much all building interiors are being generated with the possibility of secret content – or rather, with areas that the game will use to hide a secret if necessary – so that if you’re told in the future that the innkeep of The Mask and Flagon is hiding something behind a locked door in the basement, it’ll be there.

After that I worked on shops, creating the algorithm by which they decide where to put the ‘stall’ inside the shop (i.e. where the items will be laid out, somewhat akin to how shops work on NetHack), but since these currently lack items or shopkeepers, they aren’t especially fascinating yet, and don’t really merit a screenshot. I then moved onto military hospitals, which contain naturally lots of beds which will, in 0.8, have people in various states of decay/injury in them; chapels and areas where those religiously-involved with the military or with healthcare are stationed; and also naturally stores of healing items, herbs, etc. There aren’t going to be any non-military hospitals in the game: this is one of those gameplay > realism things, and I wanted to really focus the source of health items in one single place, and other districts were sufficiently busy whilst military districts were not, and thus, they ended up there. Hospitals vary in the layouts of their wings, how the beds are positioned along the walls and the quantity of the beds; and also the large stack of tables one can see in the top room of the first image, for example, will all contain various herbs, medical items, etc, in the future, whilst the lower room opposite it will contain quarters for the doctors, and potentially holy books as well if the civilization is particularly religious. There are equivalent rooms in the lower picture, and in other hospitals too.

Lastly, I’ve started on cathedrals. Each religion has one in the city centre of their home nation. These are actually going to be a massive task; I would expect at least two more days of solid work to finish them off, if not three, as they are huge, and require a lot of variation, but also need to appear broadly consistent with the ordinary churches of that same religion. As you can see from the screenshot below they’re pretty big (and that screenshot doesn’t show the entire thing), and very varied, and contain the majority of the relics for a religion, as well as obviously being a central holy place. Additionally, you may notice that the stone on the ground is slightly shaded; that’s because it is tiles rather than stone flooring, and the slight shading is in line with the colours on that nation’s flag, and this will be the case for all important/wealthy buildings (castles, cathedrals, manors, etc). Naturally the pattern for the ‘wings’ of the cathedral is a larger version of the same pattern for churches, and the inside is designed to show a level of consistency with the smaller churches in that variant:


I’ve pushed ahead on a lot of the new graphics for this week, and also done some more “background” work on creating infrastructures to allow these graphics to be used as clues and information that NPCs will give you in the next few months – which is to say, if a particular religion worships at a fiery altar, then written information on that religion might say “those who worship at the altar of flame” rather than “those who worship [God name]”, and so forth. Firstly I did some more work on finishing off the massive variation in religious altars we’re going to see in 0.7 – there are many archetypes, many variations, and something in the range of several tens of thousands of possible different religious altars. I’m working up to producing a detailed blog entry on these altars, maybe next week if they’re all done by then, but in the mean time, here’s another for your perusal:

I’ve also, having finished off gongs last week, been working on some of the other general objects you’re going to find around the place. I spent a little over a day working on generating vases, some of which spawn for certain religions, and some of which will spawn in the castles and upper-class housing for particular civilizations. There’s several dozen designs, several dozen colours and about a dozen different shapes, so (especially once the entire world is no longer pre-explored!) it’ll be a long time until anyone comes close to seeing all the variations. Again, these will in the future be tied to information the player gets, and to my desire to focus gameplay on discovering the world, understanding the world, and figuring out data the player possesses. Say you hear about a chamber in a distant castle which contains “four fragile dragons” – find the room with four vases, and if those all depict a dragon, then you’re in the right place. Here are some examples:


A few other things. Firstly, doors have been simplified down to two types – locked and unlocked (I was previously thinking about adding “closed” and “open” as sub-variables of both, but that was quickly getting too confusing, and distinctly difficult to represent). Locked doors have a “full” door symbol, whilst unlocked doors have an open archway. Some buildings in various civs will of course be unlocked by default, like religious buildings, other public buildings, etc. If you’re trying to go through a locked door, you’ll need the appropriate key, though for this release, all doors will be open. I’ve also been doing some general figuring-stuff-out work on NPCs, NPC schedules, how they should be handled by the game, how they should be abstracted out when you’re far away from them, which NPCs the game should track and how it should track them, etc. Nothing visible to report on that front, but it’ll be important in the future.

Thanks to everyone for reading this monster entry. Next time: something else! In the mean time, you can keep up to date on my devlog, Facebook page, or Twitter.


Hospitals being tied to the military does in a way make sense.

Speaking of hospitals how do you intend to handle hospitals and healing?
It would be a bit fun if the skill in healing varied from civilization to civilization, or even from town to town, some of them perhaps having dangerous trends such as bloodletting, making different injuries more risky to treat in some specific places. Although it would of course depend on how you intend to handle injuries in the first place.

Reply Good karma Bad karma+1 vote
UltimaRatioRegum Author

Ohhhhhhh, what an interesting idea. Different medical styles for each civ?! That is incredibly interesting, though I'm not quite sure how it would play out in practice, and whether it would just make it too annoying to hunt down actual quality medical care. I really like the concept though, I will have to think about it (and it's certainly in keeping with the design of the rest of the game!)

Reply Good karma+2 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.