Planet Roguelike-Dev

December 10, 2016


Ultima Ratio Regum Development Resumes

After several months where I just haven’t been able to find even a couple of hours to code, I am extremely pleased to report that I’ve managed to get through this incredible glut of academic work and emerge into the wonderful fields on the other side. As such, this coming week I am now officially resuming development on 0.8 in my spare time – which is still not extensive, but at least I have some of it now, with more to come as the start of next calendar year comes to pass – with the objective of getting 0.8 polished off and finally released in the next few months.

So: where were we, and what remains to be done?

The State of 0.8

0.8 is, by far, the biggest release I have ever done and the biggest release I ever intend to do. Had I known that I’d run into this unexpected delay towards the end of the release, I would definitely not have tried to develop the speech systems alongside everything else and I would released everything except speech as 0.8, then released speech and conversations as 0.9, but as it stands, there are several major parts of 0.8:


The current version available here on the site, 0.7, has a massively detailed world devoid of people. This has now been addressed, and there are millions of people – all procedurally generated, with the important ones stored and tracked, and the less important ones spawning and despawning to give a sense of the crowds the player moves through – that can be met in the in-game world. This, obviously, is one of the biggest changes to and developments in the game, and is the last major “system” that needs to be in place, and – via the conversation system – marks, finally, the beginning of actual gameplay! Although a lot of coding was required to keep track of NPCs at various resolutions, near the player, far from the player, inside buildings, outside buildings, inside or outside buildings that hadn’t been spawned yet, and so on and so forth, we finally got there. All NPC systems are finished, and only a few tiny bugs remain (found by my kind playtesters) to be fixed prior to a release of 0.8.

Clothing and Face Generation

Alongside these NPCs we have clothing and face generation. Clothing generation can offer many millions of variations of clothing styles, which the game then varies in four levels – “lower”, “middle”, “upper”, “ruler” – and distributes appropriately to NPCs. You can then view the clothing of anyone you run into, and the player of course now also starts with a set of clothing appropriate to the civilization they start in. Face generation, meanwhile, creates a set of genetic and cultural variations which can produce high hundreds of millions of faces, I believe, allowing you to make judgements about both the geographic and national/religious origins of people you encounter. Both of these systems are fully integrated and finished.

Buildings, Districts, etc

An entirely new, massively, and massively important class of buildings have been added: castles. The aesthetics of these vary according to their civilisation of origin (as do all buildings) whilst what is found inside varies according to the ideological and religious orientations of that nation; you’ll find altars, banners, barracks, torture chambers, dungeons, libraries, studies, and a million other things in there (alongside a relevant set of NPCs to inhabit them and move around within them). In districts, meanwhile, I’ve gone over and changed a bunch of the generation algorithms, fixed some unusual edge cases which could sometimes appear, made sure NPCs can always path to where they need to path to, and basically ensured that districts do function correctly in all the ways they have to. All castles and district changes are in place with the exception of a few tiny bugs to do with castle generation that need to be resolved before release.

Speech and Conversations

This is the final one, and the biggest one, since it marks the first meaningful element of gameplay being introduced into the game – which is to say, talking to people, questioning them, acquiring information from, presenting oneself in certain ways, deciding which topics to pursue, and all the other conversation mechanics and dynamics I’ve talked about in blog posts before this one. Speech generation is partly complete, and conversation mechanics are partly complete.

What next?

Therefore, there are basically three objectives left to cover before I can release 0.8, each of which is probably approximately of around equal size:

1) Finish Speech Generation

The primary objective is, obviously, finishing the generation of all sentences and potential responses. Now, you’ll remember from some of the final blog entries before I went on the coding break that I was introducing some more complex speech systems, but I’ve decided it’s more important to get 0.8 than it is to implement all the speech dynamics I have in mind. As such, I’m toning back some of these ambitions for the 0.8 release, and whatever kinds of sentences and comments don’t make it into 0.8 will make it into the (small and compact) 0.9 that should appear quite soon afterwards. Nevertheless, there are lots of sentence archetypes that need finishing, lots of sentence components, lots of variations for ideologies/ geographies/ cultures/ religions/ etc that need to be implemented, and then – most importantly – I need to make it all actually generates correctly! There’s so much content in there that some weird grammar mistakes are bound to crop up, and I’m sure some spelling mistakes have slipped in too, all of which need to be fixed.

2) Finish Conversation Mechanics

Right now actual “conversations” don’t really happen, since the AI you’re talking to just produces a response without, for instance, asking you something back. As above, since I’m not putting in every possible sentence form in this release, I’m also not putting in ever possible conversation mechanic into this release, but I still want things to flow quite well and to be quite interesting to deal with. Even though I hope to get 0.9 out fairly speedily, this is still going to be a version a lot of people are going to play for a lot of time, and I want to make sure there’s enough there to reward the wait, even if 20% of the mechanics I want will just have to wait until a later version when I can take the time to really perfect them.

3) Finish all Tweaks, Fix Bugs, Optimisations, etc

Not much to say here – I just have a list of things that need fixing, and I’m going to fix them. Now, some of these I’m going to leave for 0.9, which is going to be a far shorter release anyway, though it’ll only be the bugs that aren’t game-breaking, or are perhaps entirely aesthetic, that I’ll leave until then. Anything critical, or anything that is definitely going to be noticed, needs to be fixed now.


It has been very hard on me to have to stop programming for a period and cease, however temporarily, working on a project that I care so much about and means so much to me. I know some people will have drifted away, I know the blog has lost some readership in the last few months, and – chances are – some people will have seen this as proof that a big project like this is doomed to fail! But worry not: we’re back, and the ramp back up to the speed I was developing last summer will take a little while, but it’s going to happen. My schedule and my life more generally will be freeing up gradually over the coming months, to some extent Jan/Feb/March, and even more so April/May/June/July, and that spare time will be going into URR. Next summer (much like last summer) in particular will give me ample time to code, and I’ll certainly be taking advantage of it. I’m starting now to keep the code open, to check in on what needs doing, remind myself where I left off, and to start slowly but surely developing the speech content first and foremost, as that’s certainly the easiest thing to get back into the swing with. URRpdates in the coming weeks might be smaller than normal, but they will still have something to show. URR is back, and the final push towards the first gameplay release is now – finally – on.

by Ultima Ratio Regum at December 10, 2016 09:42 PM

December 09, 2016

Roguelike Radio

December 07, 2016


The Private Lives of NPCs

At a conference I recently attended I was struck by a comment somebody in the crowd made after a particular paper. We were discussing the depictions of good and evil in games, the use of morality systems and the assigning of “good/evil” values to the player’s actions, and this person noted that this very often plays itself out in the form of sidequests instead of the main quest, which tends to be much more fixed. Whether you’re playing FalloutThe Elder Scrolls, Mass Effect or the new Deus Ex, you can go up to a range of strangers, ask them about their lives, and they’ll give you something to do on their behalf, which will often influence your karma. This person in the crowd (my apologies if you are reading this and I’ve forgotten who you were!) then made a comment which stuck with me, and from which this piece is generated: that NPCs “have no private lives”.

This, when one thinks about it, is strikingly true: we’ve all encountered the NPC who will readily tell you, a complete stranger, about their innermost concerns: they’re worried about their partner having been killed by goblins somewhere in the wilderness and want you to find them, or that they need an enforcer for a shady business deal (quite why the player might be less shady than any other enforcer remains to be seen), or they’ll pull you into a family drama, or have you arbitrate a feud over lost items and forgotten books, or strong-arm someone who needs strong-arming, and so forth. Similarly, and possibly even more strangely, in the Mass Effect games (for example) we wander around the Citadel and just overhear everyone talking about their private lives even if we don’t engage them in conversation! Is Shepard just a dreadful snoop whose Spectre training involves the ability to hear everyone talking about their multi-species child-custody legal cases? Does everyone on the Citadel simply assume that everyone already knows their secrets, or do they not care about sharing their secrets, or are they hoping that someone will hear them loudly and without subtlety saying “It would be really useful if someone could help us out…” and a paragon (or renegade) will come to their aid?


NPCs, it seems, have no issue with airing their dirty laundry in public, and speaking whatever’s on their mind to the first person who comes along. However, they do seem to sometimes have some “privacy” when it comes to their homes – various games (Elder Scrolls is particularly indicative here) do allow the player to enter the homes of NPCs, who normally respond in a logical way. Which is to say: attacking the player! Or at least being disgusted, shocked, asking you to leave, and so forth. We also find that NPCs have a range of items in their homes, and in many games, one can encounter the various relations of an NPC; think back to all the promises that Skyrim made about quests being adapted if one killed particular NPCs and then other NPCs would take over their quests, or of unique dialogue when one half of a couple was killed and the other half would pass a comment on it. Although this didn’t always work out, it still highlighted that desire to give some private life, but it’s a very particular kind of private life. We can therefore perhaps distinguish between the idea of the physical private life – the homestead, the bed, possessions, house, family, relationships – and the psychological or inner private life – opinions, fears, concerns, questions, worries, agendas, objectives, wishes, desires.


The latter is far, far rarer than the other, but has been gaining rapid prominence in recent years. Perhaps the most obvious example is Dwarf Fortress, where characters of all sorts have incredibly detailed sets of personality traits, which both serve to illustrate and flesh-out the passing interactions of the game, and to also directly affect how one NPC talks to another. In many cases players have identified sets of personality traits which are desirable and dangerous, and what kinds of personality traits are risky when present alongside others; and, equally, which personality traits are the most valuable. These characters do have internal private lives, which – much like the external private lives above – are reflected directly in the gameplay, and one can immediately observe the effects these have. The famous “tantrum spiral” – where one problem with one dwarf sets off another, and another, in large part due to both the external relationships and the internal personalities of the dwarves in question – is fundamentally based, in part, upon this system. This is a model we now see being used elsewhere, in games like RimWorld and all others which assign NPCs various “personalities”, “traits”, “skills” and the like. These are generally described in a flavour text sense as being to do with their internal private lives, but are designed to have particular effects on the practical mechanics of gameplay. These NPCs do have internal private lives, although they are on show whenever a particular constellation of gameplay elements comes together to make them matter. What, I wonder, what a truly private private life look like in a game? Something that only emerges if the player gets sufficiently close to an NPC? Or something that informs their actions, but the player is not explicitly told?


This idea that NPCs might have private motivations which remain private and non-explicit is quite clearly shown in the Soulsborne games. In the original Dark Souls, for example, the player can encounter a number of NPCs who will move at various points in the game, including “Solaire”, the fan-favourite knight who seeks his own personal “sun” (father figure) and risks a descent into madness; “Siegmeyer”, a less-than-effective adventurer who seeks to explore as much of the world as he can; “Rhea”, a priestess on a pilgrimage into the same lands the player is busy exploring; and many others. These often follow a pattern: the player will talk to them, and from time to time engage with them, but then disappear from their first location, and reappear elsewhere on the map (if the player can find them). The triggers for encouraging these NPCs to move are often quite obscure, and are challenging for a new player to identify on a first playthrough (and it is equally challenging to guess, in most cases, where they might appear next). These NPCs possess their own storylines which play out alongside the player’s, but if the player doesn’t “find” the NPC each time they move, and get the next bit of the story, the player can easily complete the game and leave most of the NPC stories entirely unfinished (getting the “good” ending for Solaire’s story, and the “hollowed” ending for Rhea’s story, are particularly challenging and require significant long-term planning). This system gives Dark Souls an amazing feeling of being a world which isn’t simply built around the player, and doesn’t just place NPCs so that they might be encountered by the player who can solve their woes. The NPCs all have their own agendas, their own internal private lives, which sometimes intersect with the player’s path but sometimes don’t. Few have external relationships with others, and none of them have homes; but they all have their own (sometimes quite idiosyncratic) motivations that determine their actions. This feeling of simply being part of a world with other ongoing quests you might not be party to is very distinct to the game, and offers a feeling of worldbuilding and immersion orders of magnitude stronger than the alternative.


As such, I don’t think the claim that NPCs have no private lives is entirely true. Many NPCs have external private lives of possessions and relationships with others (something of a contradiction in terms, but the mere existence of that is indicative, I think, of how games require clear mechanics, connections, systems, and so forth). Many other NPCs – almost entirely within very modern games, and other with procedurally-generated games – have internal private lives, their own sets of motivations that affect how they behave within the game world. These are most often visible in an emergent sense: they do not have a fixed relationship with NPC X, but if they encounter a particular kind of monster, for instance, they will fight all the more fiercely due to their hatred of that monster; or they will have a greater ability to gain knowledge from books than other NPCs due to their educational level, but only if books are encountered; and so on and so forth. The latter seems to offer a more compelling model for the private lives of NPCs, allowing NPCs to act how real humans act: somewhat unpredictability but somewhat predictability, acting in certain ways in certain situations, rather than only performing actions according to a set of relationships that do not shift, and representing their private lives through their relationships and their possessions rather than any deeper motivations. This is of course the model that Ultima Ratio Regum is taking, giving NPCs their own motivations but making those visible not through text and descriptions, but rather only through their behaviours, their actions, what they say, and so forth. Figuring out the motivations of important NPCs (including hidden motivations) will be one of the many essential purposes of the speech system. Such a technique allows for NPCs to have meaningful private lives, thoughts as well as deeds, but to make those thoughts visible and meaningful to the player. As ever, what the player sees and experiences is what truly matters; an NPC with a private motivation the player can never see, or even get a sense of, is effectively the same as an NPC with no such inner thoughts.

Entirely unrelated to the rest of this post, I’m sure lots of you are aware that Jupiter Hell, the long-awaited sequel to the superlative D**mRL, is currently on Kickstarter. Now, I’m not associated with the project, I have no financial incentives to promote it, blah blah – but DRL remains a tremendously distinctive roguelike, Kornel and Darren and the others on that team all working together on a project is a very exciting prospect, and my general interests in the promotion of the roguelike genre mean that I’d really like this to succeed, and produce another excellent SF RL on the heels of Cogmind. So, if you enjoyed DRL or like the sound of a fancy-graphics classic-FPS-inspired roguelike made by someone who has (to put it mildly) demonstrated his ability to build a great roguelike or two, I would encourage you to have a look.


by Ultima Ratio Regum at December 07, 2016 12:11 AM

December 06, 2016

Land of Strangers

Released: LoSt #10 (Bloodshot Vista)

All hope was not lost!
Development is snailing along. LoSt#10 is the interrim release I had hoped to achieve before summer. It will probably be the last alpha release, before the meat of the game will start appearing. I'm still getting all basic systems in place, but #10 is still a big step forward from #9. NPCs have started to speak, and there are shops dispersed across the land, as well as a very basic bounty system (finding it can be considered a kind of an easter egg at present). There are also world building routines that will place the occational settlement, although these culture centers are still very flimsy, with not much to really see or do.

In any case, please try it out if you are interested. All and any comments are welcome.

Upcoming ...

Some features I hope to work on for the next few releases:

Perform steps in random order
* AI: I need to settle some basic AI needs. Proper pathfinding will be in place, letting people use doors, walk around ponds. They'll also be picking up stuff, objecting to theft, and adhering to other defined causes and states of beings.

* UI: Tidbits of UI are planned, and will become necessary. Scrolling menus is one thing, but also some kind of game log to track your character's progress. Also in the works is a zoomed-out view of the map to allow quick travel in explored areas. If I get inspired, I might start working on a mouse interface, but I think it's better to focus on gameplay at the moment.

* Settlements: The big thing in LoSt #11 will be to breathe some life into the settlements. It ties into several features that need to be finished. First of all, I need to streamline the map generation a bit, and define some good settlement blueprints/templates. Second, there must be places of interest, and the locals should feel a bit more alive. In addition to at least a few plot hooks (available bounties/questlines), there must be some shops and etstablishments (randomly including gunsmiths, pharmacists/medics, oracles, assassins, pawnshops). Also, something like a saloon where you can rest, furnished with a bar and perhaps a self-playing piano (depending on how complex the bias/reputation system becomes, we can whistle for features like emergent bar brawls down the road). The town can be seasoned with interesting places and encounters. There might be a village green with a park or pond, a church/shrine, a post/mining/police office, soldiers in barracks, gardens and animal pens, animal baiters who take bets, maybe even baiting animals against humans, (mad?) scientists/naturalists who want rare specimens, landscape photographers who stray into the wild, some random person has a treasure map, or is a junkie, or secretly wants to kill someone else in town, or has the habit of entering empty houses to burgle them, or loves dogs, or hates children.

* Factions/reputation: The Land in #10 is pretty war-strifed. Goons and settlers skrimish. One task ahead will be to make the map a bit more settled, with settlers mostly staying in their towns, and bandits camping in the wild. It will be possible to interact and gain reputation with any factions. If you gain a positive reputation with mudfaced goons, the settlers and law-kids might want to lynch you, but you can still get trade, healing etc. in scattered bandit camps across the land. Further down the road, more factions will come. Law and crime factions will have more organized structures, in addition to various societies, from scientists to monks to queers to carnies to cults. The current AI supports factions quite well: recognizing which factions another being belongs to, liking/disliking beings which belong to certain factions or act in a certain way. As I add more sophisticated behaviour patterns, I should be able to model some interesting semblances of drama and tidbits of story. Engine-wise, I still have to add a detailed system for fluctuating reputation. More time-consuming will be to write the content, defining and balancing achievements/bounties and other trickeries hidden behind the rosepot.

* Bounties: There must be a few bounties to be had in the starting settlement, and some others spread across The Land. They range from petty (templates "my <puppy> got lost in the <cave>", "100Pb for the head of Luci Borges") to more involved stuff later on (kill the four desert masters to become the undisputed champion of The Land, prevent/perpetrate genocide on a group of humans or animals, discover what really lives beneath the lead mines, act as a mediator/monger between settlers and natives …) I'll have to start with something simpler, basic fetch/bring/escort quests, and all that. Some bounties can be pretty open ended, with many moving parts (randomly mix elements like locations, NPC templates, and other special conditions: "Defeat the mad barber in the abandoned sawmill, who has kidnapped the mayor's uncle"). Others may be more handcrafted, but allowing for story emergence. You may get hired to protect an establishment against an awaited attack, and might solve the task by barricading and waiting out the attack, or sneaking into the enemy camp. Hell, you should even be allowed switch and aid the bandits in the robbery, triggering a favorable (or backstabbing) response, with many interesting adjustments to your reputation. To provide reward/encouragement, I've been thinking about tying up bounties with skill/character advancement, instead of a traditional system with experience points. Different types of quests and quest givers yield different rewards (more "moving part" that can be randomized on each playthrough). A hermit might tell you about herbs, or a banker gift you with a very fine pistol, or a master duelist teach you the art if you just prove your worth first. I have been thinking about modeling this around a time system that I believe to be pretty unusual.

* Time: An important feature in LoSt is that wounds tend to be very deadly, and with no available source of healing. I want to add a system for resting, for which the basic template will be "staying in a saloon". In a way, resting is my idea of something instead of a food clock. To rest, you have to pay a certain amount of cash (or fulfill some other criteria, depending on where you're trying to lodge), and the game world fast forwards several days, at the end of which you start out with all wounds healed. Depending on how grievous your wounds are, and the status of all pending bounties, the game might calculate an effect/event that occurs during the period you spend resting. The event could be just a simple string, and could often just gloss over a period of quiet, or provide the player with options to advance the plot or character. If you come back triumphant with barely a scratch, you might be rewarded with a skill advancement of your choice. But if you come back with 0Pb and a gun wound, you might develop a bad reputation or foible. What's worse, the guy you set out to kill in act I might come back in act II, with a plan for vengeance. Since the player must rest to heal, they'll want to make each rest count. The yardstick pace for a starting character should be to win one bounty, then rest, and then head out for a new adventure. Longer streches of time could also be passed doing seasonal work, training with a master or living in the underground city of fools.

If you think this sounds convoluted, you haven't heard the half of it. The art will be to keep the story suggestive and the system open ended, connected with factions and all the other "moving parts", to achieve a semblance of direction action/plot.

As always,

by Aging Minotaur ( at December 06, 2016 02:12 AM