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.

Image RSS Feed Latest Screens
New screenshots New screenshots New screenshots
Blog RSS Feed Post news Report abuse Latest News: Interior NPC Behaviour, Towns, Fortresses

0 comments by UltimaRatioRegum on Jul 27th, 2015

Well, it has been another very busy week – I gave a talk on URR’s PCG and AI systems at nucl.ai in Vienna (and spent an afternoon sitting the sun outside a rather nice vegan cafe working on the secret project I’ve mentioned a few times, which continues to inch closer to the point where I can actually announce something) and I’ve also had a piece the 35th Anniversary of Rogue published in Paste Magazine (which you can read here) and another on the role of text and characters in classic roguelikes published in Imaginary Realities (here), but nevertheless significant progress has been made (though I anticipate this next week to be a full week of coding with nothing else, so we should have a major update in seven days).

Towns, Fortresses, Etc

NPCs can now pathfind sensibly around other places which aren’t city districts – they know where to spawn and how to behave in the crowd in fortresses, in towns, in slums, and also in hunter-gatherer encampments. In these cases they generally don’t use the roads, because having people pathfind on a road until they get close to their target, and then move off the road, magnifies pathfinding complexity immensely – what if they get near the target, but then the actual path from the end of the road to the target is long due to a wall (so they are physically proximate but the path to that proximate location is huge), and the complexity of the problem of making sure they take an efficient road path, followed by an efficient off-road path, is massive – so we’re ignoring it. Besides, particularly in towns I think this actually works quite effectively when roads look more like a form of aesthetic/spatial structuring of the town rather than literally what everyone uses to walk around, and fortresses tend not to have roads anyway unless there’s a river cutting through them. The right groups of NPCs now spawn in fortesses and elsewhere, of course, so we see lots of soldiers in fortresses, the poorest of the poor in slums, ordinary citizens in towns, and tribal peoples in hunter-gatherer territories. This is, however, making it clear that I need to return to clothing generation at some point soon and really get moving on the other algorithms for lower/middle class feudal clothing, and other clothing types too – it’s a huge job, and actually bigger than I thought, so I’m going to devote a solid week or two to that once I’m back from GDC Europe (if you’re there, come along to my talk!). Here’s a town brimming with activity:


The big one – NPCs now actually go inside buildings (they previously despawned at the door, in essence) and if you then go into the building, you can then see that same NPC inside the building. If the building has already been spawned and exists, then the NPC will go about their business inside the building. Alternatively, if the building hasn’t yet been spawned, they are temporarily placed in “limbo” until one of two things happens. If the building is spawned (i.e. by the player stepping inside), then that NPC is granted a number of turns to move around in the building as if they had been moving around inside the whole time. Alternatively, if an NPC has “entered” a building that the player doesn’t spawn, then after a random length of time they will the leave the building and continue on their way. In this method we are left with no pointless NPCs milling around in “limbo”, ensures that the crowd is always centered on the player, and means that if you see NPCs going into a building, they will be inside. In this gif, an NPC has previously entered this tavern; we’ll now enter, causing the building to spawn, and then the NPC spawns and we see them take a seat, and then if we go outside, they’ll exit again after a certain point (at the end we then see another NPC enter). This basically means that regardless of the player’s actions and which parts of the map actually exist, the crowd’s actions always appear to make sense. A similar system will be needed once I start tracking the important and non-spawned NPCs around the world (rulers, merchants, etc).

Inside Behaviour

NPCs will now create a list of potential “targets” within a building and will hang around at those targets for sensible amounts of time, and then when those timers end, they’ll either leave or go to something else within the building. This process depends on the building and the nature of a given target. For example, someone who goes into a tavern and sits on a chair to drink for a while will not then get up and move to another chair – they’ll either just stay on the chair, or get up and leave. By contrast, somebody in a cathedral might spend a lot of time sitting at one chair worshipping in front of an altar, then move to study the holy texts at a desk, then talk to a priest, then leave, etc. I’m working at the moment on finishing off this list of targets, and then also adding a second layer whereby the list of targets is modulated by the time of day; so people will tend to leave as its gets near night, or people in this houses will head to bed, etc. Here’s a gif of some inside behaviour in a tavern:

As you can see, more people currently leave than enter; I’m working on balancing these two algorithms at the moment so we have a steady flow of entering/leaving whatever structure the player might happen to be in at the time.

Sorry also about the relative lack of images this week: a huge amount of this week’s work has just been improving pathfinding, improving how NPCs move and behave, a lot of technical improvement on saving/loading and managing buildings and floors and buildings which are/aren’t spawned, etc, so there aren’t that many pictures to show. I hope for more next time!

What now?

Making the interior behaviour sensible and interesting for all NPCs, giving buildings a “maximum” number of people they can hold, adding day/night differences, fixing the massive number of edge cases which are slowly building up… etc. More next week!

Post comment Comments  (50 - 60 of 131)
romenigcandido Jan 2 2013, 1:46pm says:

I must say that I created an account just to be able to follow the development of this game, and if you ever decide to charge for the game I'll be more than happy to pay. The game seems to be extremely complex, which is something that I love, not to mention that you make ASCII graphics into something beautiful to behold. My sincere congratulations!

+5 votes     reply to comment
UltimaRatioRegum Creator
UltimaRatioRegum Jan 4 2013, 9:44am replied:

My sincere thanks! Very glad you like the concept and the graphics. As I speak, I'm finishing off the religious symbol generation (which there will be a blog entry on next week), which is itself another graphical route I'm exploring (along with flags). Let me know if you have any thoughts/ideas for the game in general, anyway :)

+2 votes   reply to comment
romenigcandido Jan 4 2013, 11:50am replied:

I have some questions and ideas about Religions, but I'll wait for the next update to comment on the matter.

+2 votes     reply to comment
UltimaRatioRegum Creator
UltimaRatioRegum Jan 4 2013, 8:08pm replied:

Cool; I await them come Monday :).

+2 votes   reply to comment
Arethrid Jan 1 2013, 2:48pm says:

I am looking forward to see this project's final version :)

+2 votes     reply to comment
UltimaRatioRegum Creator
UltimaRatioRegum Jan 4 2013, 8:57am replied:

Thanks :) - though I couldn't possibly say when that will be...

+2 votes   reply to comment
taylan! Dec 30 2012, 10:34pm says:

Looks like a very ambitious game and highly interesting. I downloaded 0.2.1 and played around a bit. One thing that I noticed was the frequent loading pauses in the game (to load zones, I assume?), which can be bothersome after a while. Oh and the game crashed for some reason. Are you interested in crash logs to be emailed to you?

+2 votes     reply to comment
UltimaRatioRegum Creator
UltimaRatioRegum Dec 31 2012, 9:56pm replied:

Re: loading, yes, loading does happen often. However, it seems much more often because there is nothing "to do" yet, so to speak - if you're spending half an hour on a single map grid, the odd loading screen shouldn't be a trouble, whereas just running across a map grid is going to trigger another load screen very quickly. Yes, please, absolutely re: the crash log, and info about OS as well :)

+2 votes   reply to comment
HereticUK Dec 10 2012, 6:59am says:

I would like to ask if possible about the language implementation in the game. What are your plans for this? How are you going to do this? As a student of languages it really interests me.

+2 votes     reply to comment
UltimaRatioRegum Creator
UltimaRatioRegum Dec 10 2012, 8:16am replied:

Thanks for the question! Well, a longer explanation is going to go up on a blog entry in the future, but here's the brief one. The game produces two kinds of languages from scratch, either based around syllables (so it will generate a database of syllables for that language, like 'car' or 'ur' or 'ab' and piece them together into words) or based around chances of letters, so a language might have 'z' as its most common letter and 'h' as second, so it'll have a preference for those, and same goes for vowels. Each produces visually different languages. The ancient languages in the game do not use a Latin alphabet, but I'm not saying any more about those for a while! If an NPC says a word to you in another language, the game first checks if you know it - if so, it is translated - if not, it checks if a non-English word for that English word yet exists in that language's dictionary. If yes, it uses that word (so 'the' will always be translated the same), if no, it creates a word, checks that word is unique, then adds it to the dictionary. I know this means that all languages have the same grammar/syntax/whatever as English, which is far from true, but from a gameplay perspective I felt they had to keep the same structure to help the player make sense of half-translated sentences, and also because a system for the game recognizing adjectives, nouns, verbs etc and re-ordering them would be a) immensely complex, b) unnoticeable to a player looking at a non-translated language, and c) would prevent the player making informed guesses at unknown words. Shout with any more questions :)

+2 votes   reply to comment
HereticUK Dec 12 2012, 7:27am replied:

That is a very interesting way of generating languages... I shall be keeping an eye on this for sure!

So, will the player character have to learn new languages in order to communicate with others?

+2 votes     reply to comment
MichaelSeph Dec 3 2012, 5:53pm says:

Oh My Gosh O.o

+3 votes     reply to comment
UltimaRatioRegum Creator
UltimaRatioRegum Dec 4 2012, 7:10pm replied:

I apparently cannot just post :), but please nevertheless accept my appreciation for your comment!

+2 votes   reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Ultima Ratio Regum
Developed By
Custom Built
Send Message
Official Page
Release Date
Game Watch
Track this game
Single Player

Latest tweets from

It can take up to a few hours for tweets to begin appearing.

Embed Buttons

Promote Ultima Ratio Regum on your homepage or blog by selecting a button and using the embed code provided (more).

Ultima Ratio Regum
Ultima Ratio Regum
Last Update
3 days ago
484 members