A roguelike game inspired by the literature of Jorge Borges, Umberto Eco & Neal Stephenson, and the games Europa Universalis and Dark Souls. URR aims to explore several philosophical and sociological issues that both arose during the sixteenth and seventeenth century (when the game is approximately set), and in the present day, whilst almost being a deep, complex and highly challenging roguelike. It explores questions of philosophical idealism, cryptography, linguistics and the writing and formation of the historical record, and will challenge players to hopefully think in ways and about themes that are rarely touched upon by games.

Post news Report RSS Ultima Ratio Regum city districts!

Procedural generation of city districts, displaying them, and ordering the districts sensibly.

Posted by on

This week I’ve been working on two major things – religions and cities. I haven’t totally finished off religions yet so I’m going to leave those for next week’s update, and focus now instead on cities. For a couple of weeks cities have been generating names based on how their civilization likes to name cities (there’s a huge variety of possibilities in this regard – not all city names are just “X+Y” “Winterhome”, “Axehearth” style) but the cities have only appeared on the world map as outlines, produced by the city’s reasonably-organic growth after several centuries of simulated time.

Cities

Although generating the interiors of cities for the player to work around are going to happen in the release after the one I’m working on now (currently 0.5, city interiors will see the light of day in 0.6), I decided to work on generating the rough outline of those interiors so that I could begin to fill up the “Cities” section of the in-game encyclopedia with some meaningful information. Thus, cities are split into districts. I’ve done this for several reasons. Firstly it will aid the player in knowing approximately where in the city they want to go for a particular objective by splitting the city into distinct parts; secondly it is arguably more realistic when one considers the kinds of layout post-medieval cities had; thirdly it allows for various mechanics involving the player either being allowed into certain districts, or being able to sneak/fight your way in, rather than having the city as a single huge map; and, fourthly, it allows for some rather aesthetically pleasing city maps. There are currently a range of districts planned. Here’s an incomplete list of what will generate in each district:

Docks:
Ships. (Blue ‘D’)
Market: All types of item shop. (Yellow ‘$’)
Recreational: Arenas, pubs, gambling. (Purple ‘R’)
Upper Class Housing: Noble houses. (White ’1′)
Middle Class Housing: Guilds? (Light Grey ’2′)
Lower Class Housing: Jails, keysmiths. (Grey ’3′)
Medical: Gardens, Apothecaries, Hospitals, Fountains, physicians. (Green ‘+’)
Military: Barracks, weapon/armour traders, smiths. (Red ‘[‘)
City Centre: Cathedrals (and equivalents), libraries, government, universities, courts, mints, etc. (Blue Diamond)
Castle: Dungeons, ruler (if Monarchy/Stratocracy), weapons/armour, treasury. (Grey ‘#’)
Religious: Many religious temples, smaller altars, etc. (Lilac ‘^’)

Once I’d settled on this, I needed to get the game generating the districts in sensible layouts. This took a bit of working out because there were a range of variables. Firstly there were some districts cities had to have – such as city centres, and castles, and so forth. Secondly I had to order additional districts, like military or medical districts, in an appropriate order and probability weighting to get them appearing at the kind of frequency I want; thirdly, and most trickily, I needed to make sure districts that could sometimes be viable – such as docks if near a cost, military districts if the civ isn’t pacifist, and religious districts if the civ allows freedom or religion – generated in the right cities, knew which districts they were “more important than”, and generally were integrated into the lists of the generic districts well. Once this was done, I then worked on getting the cities to show in a zoomed-in map the player will be able to view both in the encyclopedia, and when moving between districts. I’m very happy with how these have come out:

Districts

Castles and city centres are *generally* close to the middle of the city, but you can get significant variation if the city has grown in a strange shape, existed near a coast where it couldn’t necessarily spread out a lot, or simply if the 1/9 chance (I think) for a castle or city centre to not be at the geographical centre of the city comes to pass. I’m still deciding what other information the encyclopedia should display for cities, but this will be one key part. In later versions city districts will be unknown until the player either explores them for the first time or learns information about that district from some other source, but for now I’ve just got it showing all the districts. Next week I’ll be talking about religions, their icons/symbols, how they generate, what benefits/disadvantages they give you, and what agendas religions may want their followers to pursue. Until next time you can keep up to date on my devblog, Facebook page, or Twitter feed. The devblog is updated weekly or fortnightly generally on Saturdays, Facebook a few times a week, and the Twitter roughly daily. Any thoughts, please leave them in the comments! Stay tuned...

Post comment Comments
LonelyKnightess
LonelyKnightess - - 841 comments

I like! Though the districts are a bit squareish.

Reply Good karma Bad karma+2 votes
UltimaRatioRegum Author
UltimaRatioRegum - - 307 comments

Each one is a single tile on the world map, so that's kind of by necessity! I will be trying to make the corners a little more curved, though.

Reply Good karma+2 votes
LonelyKnightess
LonelyKnightess - - 841 comments

Completely understandable, just something I noticed.

Reply Good karma Bad karma+3 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: