Crowds, Slums, Pathfinding, Campfires, Demographics, Priests, etc

It has been a busy fortnight, with house-moving (in progress) and secret projects (almost ready to start) and programming (proceeding nicely) and various other endeavours (far from complete), but I’ve finished all ambient crowd behaviour, and a couple of other things besides. Here’s a pretty massive round-up of what has been happening in the last three weeks since the last full URRpdate:

Priest Clothing

I decided to work last week on a second of the four high-level clothing archetypes (feudal, nomadic, hunter-gatherer, religious) – the religious clothing. For this I did a standard expansive image search, collated a range of religious dresses, and then attempted to break them down into commonalities, differences, and readily exchangeable parts. The colouring of each piece of religious clothing, much like the prayer mats we saw a few weeks ago, are connected to the altars they worship at. The highest-ranking priests in the religion will have slightly snazzier robes, whilst if the religion has any kind of poverty-is-holy ideology or similar, they might have duller robes. Here is a set of six possible robes all using a potential “demonic” colour scheme (just since that’s the one I was testing the systems with, but how nice do they look?!), and then some with their attendant altars alongside (one “Eldritch” archetype, one “Pantheon”, and two “Standard”), and lastly an example of the higher tier of religious clothing reserved for religious leaders (hence the lovely gold filigree):

Priest Clothes



Priests use the same shoes as the nation they’re in, and usually the lower-class variation (though in some religions priests will be barefoot). With these done, that means approximately half the clothing generation for 0.8 is done – feudal clothing is 99% finished (I just need to put in a few final touches to the lower-class variations) and religious clothing is now finished. I’ll probably work on nomadic clothing next, as I have a few ideas of what archetypes I want to generate those around, then I’ll do hunter-gatherer clothing probably last before this version’s release. Armour and things like that will come later (0.9?) so for the time being, all soldiers and other military personnel just have lower-class clothing, or upper/middle-class if they are officers (which in the future they’ll probably keep, but just wear beneath their armour).

Slums and Encampments

The last few areas which needed handling for NPCs have been dealt with. NPC crowds now spawn, move and despawn intelligently in slums outside major cities, and also in hunter-gatherer encampments. Pictures of slum, and encampment, and example crowds:



Remaining Interior Behaviour

All buildings which can have crowds in them (e.g. a tavern can have randoms wander in. but a royal mint cannot) now have those crowds behaving intelligently at all times, and – as far as I can tell – this is entirely glitch/bug/crash free regardless of what building, what civilization, what demographics the NPCs in question are, etc. Here are some examples of an arena and a longhouse, since I thought these were both rather pleasing, especially in the longhouse as people gather around the table:



Pathfinding Problems

Some buildings and some parts of the external map were starting to produce a problem – if you had two NPCs (or an NPC and the player) trying to get through the same one-tile tunnel between walls, at the same time, then they couldn’t slip past each other. I implemented a temporary solution (whereby crowd NPCs will look for another objective if they find someone blocking the one-tile route down to their current objective) but this wasn’t good enough for the future, especially once we begin handling important NPCs whose paths cannot just be changed on a whim. So, now, if you have two NPCs who meet, and NPC 1 is trying to move onto the tile NPC 2 is on, and NPC 2 wants to move onto the tile NPC 1 is on, *and neither of them can find another way around* by stepping on a diagonal, and they would both allow the other to step past them (so they aren’t enemies), then the game will look at which one of them has the longest wait until their next turn, and then schedule a special “simultaneous” turn for them both to switch places at the same instant for that more distant turn (so that neither NPC can move “faster” than it should be able to). I’ve now implemented this to work indoors and work outdoors, so here’s an outdoor (filmed in “slow motion” to make it clear) example of this:


However, this became trickier when I wanted to combine it with the player. Clearly the player should be able to do this as well, but it required writing quite a hefty new chunk of code, for handling if the player tries to move through an NPC, or an NPC tries to move through the player, because obviously I don’t want to remove agency from the player, or allow NPCs to shove the player around the place (as that would get quickly annoying), but nor should the player somehow be able to exploit this ability to move NPCs around the map (I’m not sure how this could be an issue in the future, but it seems better to just produce a robust system now rather than worrying about it later). Either way, we clearly needed a way for NPCs to walk past the player if the player is being an ass and standing in the way:


So, there are two scenarios: what if the player wants to move onto another NPC, and what is another NPC wants to move onto the player. It would be deeply annoying to allow the player’s character to be “pushed around” by other NPCs, so that was something I knew I had to avoid, but at the same time I had to ensure that you cannot exploit the system by somehow pushing around NPCs yourself. If an NPC wants to move onto the player, therefore, they initiate a special two-turn move, where the NPC takes two turns instead of one and “squeezes” past the player, taking both moves on the second turn – so from the player’s perspective, the NPC moves next to them on Turn 0, remains there for Turn 1, and then moves to the other side of them on Turn 2. If the player moves in the interim, then normal pathfinding resumes and the two-turn move is cancelled. (Of course, the two turn move only works if the tile beyond the player is free, the player and the NPC’s relations are friendly enough that the player would let the NPC get past, etc). Here’s an example, where I start off looking at the approaching slave, then turn to the other side, and sure enough the slaves pass “through me” using this special two-turn move:


This also results in a message being printed, along the lines of “The [NPC type] squeezes past you”. The other version is; what if the player wants to get past an NPC who is blocking a one-tile area? An NPC blocking a one-tile area and standing *still* should be an impossible scenario – I am certain there are no areas which are valid for crowd NPCs adopting the “meandering” walking type which are also only one-tile wide – so if one encounters an NPC in an enclosed space, it’ll be if you and the NPC are moving towards each other and need to cross over. If the NPC “initiates” the move, we get the scenario shown above. If the player initiates the move, then the game looks at both the player and the NPC, does the usual check of whether they are allowed to move through or not (this might have to wait until 0.9, as it’s going to be a complex calculation – for now it just returns “yes”) and then, if so, it has the player move along with the obstructing person during the later of their two turns (so if the player is next scheduled to move on turn 18174, and the NPC on turn 18175, then both will move on 18175, so that neither character is able to have a “free turn”). You then switch places with them, as shown in this example, where I step into an NPC who I am friendly enough with to switch places, then I turn around (taking one turn) and we therefore see the NPC two turns behind me, and they then leave. Had I just stood still, then they would have initiated the two-turn move, going “through” me without forcing my movement.


The three systems shown here also work when indoors as well as outdoors. These are all very rare scenarios, and I suspect will (for the most part) only happen if the player is standing deliberately still to try to annoy the NPCs, but it still needed handling. With all of this done, I am now… 99% that all NPCs of all categories, whether inside or outside, and whether dealing with the layout of the terrain, the motion of other NPCs, or the motion of the player themselves, should be able to path correctly past any obstacles (I think there is still one final minor non-crash bug here involving NPCs who have stopped to admire something, and if they have stopped in a “line”, then other NPCs may struggle to get past, but I’m working on fixing that one). As a last note on this, it’s also worth noting that in almost all cases I’ve worked hard to ensure every corridor/path both inside and outside is, in most cases, at least two tiles wide. However, in certain areas – slave quarters, some cathedral generations, slums, and a bunch of other places – one tile corridors can generate, so it was clearly important to handle these sorts of scenarios.

Also, now I need to at some point have you be able to switch your “walking style” from “walking” to “shoving” (or “pushing”, maybe?) so that in the rare possibility of a blockade (which I *think* should be impossible, as I’ve modeled spawning a bunch of NPCs on every tile in an enclosure and they’ve always managed to find their way out so far) you can always push your way through NPCs and force them all to move into the position you previously occupied, though that might not make them all that friendly to you. Nevertheless – and although I’m not even sure such a scenario can ever happen – it seems like an important addition which I’ll probably add this release, and it should be simple (note if there’s an NPC there, and if so, just switch places with it).


Hunter-gatherer encampments now have campfires, beds, and tables. Only the fires so far have an image, but the beds and tables will be made of either wood or stone, and will get images before the end of this release:


We still need more variation and detail in these areas – a lot more, honestly – but hunter-gatherer areas now look slightly less bleak and empty than they did a little while ago (in the above picture you can see some stone chair/tables and a second fire). More soon, hopefully, though anything beyond tables, chairs and beds might have to wait until 0.9 or a little beyond. I’m focusing on feudal nations this release (although all NPCs will be present), and it’ll probably be the next release when I do more on nomadic and hunter-gatherer NPCs and societies.


We now have guards! Guards appear outside Parliaments, Mints, Embassies, Officers’ Quarters, Armouries, Mansions and Citadels in the middle of Fortresses, and also inside Banks and Arenas (the former to guard the vaults, the latter to keep the crowd at bay and make sure nobody interferes with the combat). The game also now notes every part of the map which needs a special “permission” in order to access it, and guards are tethered to certain permissions, meaning that if the player steps onto a tile which has the (‘Embassy’,24) permission and the player isn’t from the nation with the id# 24, then the guards will act – right now the game just registers this since the conversation system isn’t in yet, but that’s the plan. So, here are some guards doing their guarding thing (they currently wear standard clothing since armour generation doesn’t exist yet):


And then here’s a slice of the visual map, and the “forbidden” map, which shows the parts of the terrain close to the armoury door which will trigger the ire of the guards, so we can see that anything within the courtyard, and some of the tiles just outside the the gate, will trigger their ire (the guards don’t show up on this view, but as we saw above, the guards are basically standing just outside the gate):


So, now we just wait until later this release when I get working on a conversation system and the guards can accost you! More on this later once I figure out how precisely it works, but all the guards spawn, and detect intruders, and that’s all that matters for now.

Distance Demographics

The crowd’s demographics now vary according to the expansiveness of the nation in question. By this I mean – if the nation is small, then all people spawn with the genetic demographics (skin tone, hair colour, eye colour, etc) of the capital, or nearby. If the nation is large, the game will sometimes look for a random tile in that nation’s territory to choose the demographics from (which is to say, if you’re in the capital city it’ll normally be a “capital person”, and sometimes someone from further out; if you’re in a town, it’ll normally be a “town person”, but sometimes someone from further out) and use those to spawn the person instead; and if the nation has colonies it’ll do the same. This means if you run into two people in a nation with the same cultural demographics (clothing, hairstyles, etc) but very different skintone/hair colour etc, then you can reasonably deduce that nation is either very large, or has some colonies somewhere. Here are two examples of this kind of crowd, and the latter you’ll note has a priest leading some followers (the priest of course now spawns with the right robes). Rather annoyingly I wasn’t able to quickly find a nation which had colonies/homelands with skin tones at the two extreme ends of the spectrum, but you still get the idea from these of a lot more variation in the larger and more expansive empires:



Another thing this has got me wondering: in future versions (0.9 or 0.10 onwards) all the map except your home nation will be in shroud when you start. Should colonies be “lit” or not? I think the best solution is that colonies don’t start as explored, and if you take a ship to one of your own nation’s colonies, perhaps all the colony land is then revealed when you arrive? In contrast, normally, you’ll just explore the tiles around you as you move, and if you take a ship, it will perhaps show you the ocean path you move along? That seems like a good compromise without having a situation where you start with a few chunks of the map explored which are disconnected from your nation’s homeland.

Lesser Houses

I’ve now implemented the first stage in generating families/houses which are less important than the small number at the top of each civilization (one of which, of course, belongs to the player) but are still noteworthy. In nations with the “Vassalage” ideology, one of these families will have a special “Manor” building spawn in each town in that nation, and a family rules each of these manors and therefore each town. In Vassalage nations the other smaller buildings in upper class districts will also belong to these families (so they have a manor, and a home in the capital), whilst in non-vassalage districts these buildings will also belong to second-tier families, but not “special” ones (as in, rich merchants or whatever, not those with direct feudal/political power). However, for the vassalage nations, these all needed coats of arms! So, I’ve returned to the sigil generation system and added in the ability for “lesser” houses to have coats of arms. These are much simpler than the major houses, and have a geometric pattern determined by the aesthetic preference of their nation (octagon, square, circle, cross, diamond) which feeds into an algorithmic sequence that combines various elements (I’ll also add a system ensuring there can’t be more than 5 vassalage nations, and they can’t share a shape, to ensure variety across the game world). Now, bearing in mind of course there are meant to be for lesser/more general houses… what do you think?


Compare, of course, with some examples of important families:


So what do you think of the minor ones? Good, bad, too little detail, too similar, just right…? Of course, they still need mottoes, and I’m thinking of having it tether them to the towns they’re from in some way (or perhaps these lesser houses don’t have mottoes?).

What next?

Next up I’ll be working on adding more “fixed” NPCs like guards – so this means tellers in banks, priests in religious buildings, servants in mansions, officers in officers’ quarters, delegates in parliaments, and so on. This week is probably also going to see a little bit of reworking of some aspects of world generation, since I need to add in a system for vassalage nations to generate and track these other houses, and for parliamentary nations to figure out how many delegates they should have (I have a cool system planned for this), and I might add in the new “Monastic” religious ideology I’ve been thinking about for a while too. Either way, I’d say we’re about 75% through NPC mechanics at this point, and in a fortnight or so I think everything with NPCs should be finished, and then we can move onto the other massive part of this release – conversations. See you next week!

Dungeon H@cks Book Review

A few months ago I was contacted by one David L Craddock, who informed me that he had written a roguelike history called Dungeon H@cks, soon to be published, and asked if I’d be interested in reviewing it for the blog. I said yes (appropriate disclosure: no financial incentives or anything of the sort), and since it seem reasonable to assume that a lot of people reading this blog would find a book about roguelikes to be the kind of thing they’re interested in, it seemed sensible to say yes! So, without further ado:


The book consists of three sections: firstly a number of chapters looking at the majority of major classic roguelikes – Rogue, Sword of Fargoal, Hack, NetHack, Moria, Angband and ADOM, and their progenitor Beneath Apple Manor. It also contains a number of “Side Quests”, akin to a “Notes” section at the end of an academic book chapter where one expands on points tangential to the main discussion, but nevertheless relevant or interesting; and interviews with John Harris (of the @Play column) and Brian Harvey (of Hack). Now, I don’t think I’ve written a book review in over four years, so this is mainly going to be a list of observations, some particular interesting quotes and similarities between the stories of development, and some reflections on this slice of roguelike history (and gaming history more generally) contrasted against my own experiences of working in the genre.

Firstly, two themes seem to run through-out the book: the importance and specificity of programming languages, computer models and distribution methods and operating systems, and secondly the inspirations of the different developers and the extent to which earlier games (quite naturally) inspired those who came later. For the former, I was struck by the similarity of University background for many of the developers, particularly in Computer Science, Engineering and Physics departments in very high-ranking universities: UC Berkeley, UC Santa Cruz, MIT, Stanford, etc. While a scholarly background certainly seems to demographically persist in contemporary roguelike developers – and it shouldn’t come as too much of a surprise to us when thinking about classic roguelikes which were created in an era where it was rare for any location other than a campus computer lab to actually have, y’know, computers – I thought it was striking the extent to which the classics of the genre emerged from this environment. Ideas repeated in many of the chapters – distributing a game on a single university network, or having a computer lab with a single computer, or having campus computers where an Angband borg plays as the screensaver, etc – seem completely alien today and speak to forms of game development, distribution, and user-base creation, which were deeply historically specific. The book also discussed the links between the pre-open-source movement and roguelikes…

Stephenson believes that NetHack played a part in the open-source movement. “We predated open-source [as a formalized movement], but I do think that the fact that we made a huge amount of source code available, without charge and under a public license—an early variant of the LGPL [Lesser General Public License]—helped to promote the idea of making software available for public use without cost.”

…noting in many of the chapters the importance of making the code (or parts of the code) open to the public in order to encourage engagement from the player-base, new people being added to the development team, etc. It was also interesting to note the odd attempt here and there to make these into commercial games, and the various reasons why these didn’t come together, situated within the broader discourse of creating free software for the enjoyment of development, and the enjoyment of seeing players attempt the games, and encouraging a collaborative development process which (in most cases) is obviously anathema to the model of a commercial game.

Equally, the book discusses the inspirations of the respective developers in a lot of depth, and as someone who has only become involved in Computer Science in the last four years, it was this which appealed to me a little more than discussion of operating systems and distribution methods (which tended to dominate the earlier chapters more than the later chapters, although maybe this is a reflection of stricter computing requirements (especially with Rogue) eventually giving way to (slightly) stronger computers?). Many developers spoke of their experiences with Dungeons & Dragons and in the cases of later developers, the earlier roguelike games obviously served as inspirations. One quote from Michael Toy of Rogue fame – that “Moria is probably the closest to what I wanted to do when I made Rogue” – seems particularly illustrative in this regard. Others, meanwhile, speak of the desire for particular player experience – exploration, a sense of danger, a sense of something at stake, etc (all things I’m sure we can recognize from the roguelikes we play these days). When the book discussed the reasons behind procedural generation for the earliest games, it of course noted the value of PCG for dealing with computational constraints where you can only store a certain amount of fixed data, but it was interesting to also note the reverse of this:

Unable to ascribe more interesting characteristics to the majority of monsters [due to technical constraints], Toy and Wichman simply gave more health and stronger attacks to monsters higher up on the food chain.

PCG has obviously often been used in the past to overcome memory constraints – Elite being a perfect example, whilst I assume that far more recently No Man’s Sky does something of the sort – but memory constraints nevertheless meant that monsters in some of the earlier games had to be simpler than the developers wanted due to these same technical constraints. Indeed, we can readily see this “just give them more health” logic in so many modern games where upping the difficult simply means your foes have more health and do more damage, and this made me wonder slightly if this was borne out of an era where adding to a health/damage number was trivial, but adding to something like AI intelligence was extremely challenging? (And, indeed – is this not still the case today?)

Moving on, the chapter on NetHack had this interesting comment to make both about the famous saying about the DevTeam, but more importantly, the subsequent comment about what we would now call “simulationism” in roguelike design:

The DevTeam’s seemingly telepathic ability to predict every possible action gave rise to the acronym TDTTOE, The DevTeam Thinks of Everything. “The more options you have to manipulate the game environment, the more immersive and interesting the game is,” asserted Raymond.

Simulationism is a common topic of discussion in roguelikes (as one can see from my recent entries about the crowd mechanics in URR, both here and on the various other sites I post URRpdates) and people are often split on this – some players enjoy the complexity that a simulationist game offers and the many ways (as the above quote suggests) one can manipulate the game environment, whilst others see simulationism as an undesirable move away from “tighter” game design and towards something less focused, more expansive, and in some cases perhaps more easily exploitable. The choices of the words “immersive” and “interesting” lead me back to my own reflections with NetHack – this was definitely how I felt when I played it as my first ever roguelike. The depth of systems like polymorphing, wishing, genociding, demon summoning, etc, made NetHack feel like this complex immersive world which wasn’t just a bunch of dungeon levels laid out for the player (Dark Souls does this amazingly well – and I can’t have a blog entry without praising Dark Souls!), and in turn, it made it into an interesting experience to learn these systems and figure out how to use them well. With that said, though, there’s always a fine line between simulationism and making optimal play require a lot of grinding or farming – I think NetHack does it well in this regard, but that’s the other side of that same coin. Similarly…

There was a natural tendency for the devs to see the game from the point of view of someone who played it constantly and obsessively; thus, over time, their notion of not making it ‘too easy’ gradually ratcheted up the difficulty level to the point where you couldn’t really enjoy it casually anymore

…is the other danger of simulationism: that the inexperienced player will have a far harder time making sense of the game when it has all these complex systems doing things under the hood (see, for example, my recent piece about the demon system in NetHack). I don’t want to draw any conclusions about it here, but the book explores some of the systems in roguelikes which aren’t connected to their core gameplay loop, and offers (as above) some interesting rationales as to the inclusion of these types of system.

Another comment which stuck with me given my own game design and academic research interests was this one, about Moria:

While browsing the computer’s directory of files late one night, he stumbled upon proof that his attempts to imbue denizens with personalities was working better than intended. Manuals had been written by students describing the vindictiveness of this or that monster, and how the monster seemed to remember that players had attacked it earlier. When he approached the authors of the manuals to explain that probabilities and random numbers were pulling the strings, the students politely but firmly silenced him, insisting that they knew the monsters were truly sentient.

This, to me, seems strongly reminiscent of both Tommy Thompson’s recent work into seeing whether players can identify procedural and hand-made levels, and my own experiences with comments here, by email, and elsewhere: that players of PCG games sometimes mistake complex PCG for simple, or PCG for hand-made, or vice versa. It’s very interesting to see an older but still comparable observation that player experience assigns meaning where there perhaps is none (and can also fail to assign meaning where there is some) and the human tendency towards apophenia.

Another comment I thought was interesting was this one in the discussion of Angband:

“We want [randomized experiences] within parameters. Either there should be no chance of an encounter with, say, a great wyrm [dragon] on level 1 at all, or [the odds] should be so low that they’re basically zero. Most players will never see it. And those [odds] basically end up being the same thing. If a person dies to a super-powerful enemy once, they might complain, but as long as it doesn’t happen a lot, it’s not really a big deal.”

This, again, seems to speak to a fundamental roguelike debate, and yet seems to stop short of saying what (I think) most developers would say is the obvious solution. Should we be able to have a goblin spawn with a wand of death on the first floor? The quote above obviously argues strongly in favour of the answer being yes, arguing that this yields interesting gameplay experience within set parameters and that “basically zero” is, in essence, akin to “zero”. Now, this is something I’ll be discussing more fully I hope in the future if the secret project I’ve hinted about once or twice here comes to fruition, but I have to take the other stance: if the two are truly indistinguishable, then why not prevent those early deadly goblins, as they surely only have a negative effect on gameplay experience, the possibility for even the most skilled players to have a high win-rate, etc? I personally think that is a surprisingly big deal, and something I hope to talk more about in the future, and the book does a good job of exploring some of the rationales behind different spawn systems, out of depth monsters, etc.

I was also struck by the number of stories which involved being taught by a relative – generally a parent or older sibling – the very basics of (often BASIC) programming. Although I also had an Electron, Spectrum ZX, C64 and Amiga as a child (I don’t recall the model, but possibly an Amiga 500?) and a family friend who knew his programming pretty well, this was an experience I never had. Both of my parents are university graduates, but neither in computer science nor natural science, and I don’t have any siblings. When I was around six I attempted to get this family friend to teach me programming, but after an afternoon where I attempted (without success) to clone the excellent Exolon, I quickly abandoned the thing and felt playing games was infinitely more rewarding than creating the damned things. In hindsight, I realize I had the mistaken assumption that Phil Fish mentions in Indie Game: The Movie: that when one is young, one thinks that a game is made by just sitting down and making the game, and it is hard to appreciate what that process actually entails in a technical sense until one has actually done it. Although some of these tales were very similar, it (like the ubiquity of the University computer labs described earlier) spoke strongly to a particular era and a particular background common to most of the earliest roguelike developers, making a set of useful and important historical observations about the particular circumstances which gave rise to the genre.

The later sections of the book move away from discussing specific games and speak instead on other topics: the 7DRL Challenge (edit: since moved into its own book) and a number of interviews. These read as quite distinct to the main historical narrative of the book, and although they make a useful addition for the dedicated reader, they felt very much like a highly extended set of appendices than a separate section of the book proper. The “side quests”, however – the parts which resemble a “notes” section and offer a little bit of additional/tangential/interesting information on some other topic in the book – are very interesting, and yield a lot of amusing anecdotes and useful details on the actual experience of developing these games, some of the problems and concerns and questions, the earlier media interest in roguelikes, personal experiences with fans, etc, which I highly recommend reading.

However, a few negative points must also be noted here. Firstly, in the version I had (eBook version, a month ago), there were a few typos here and there – no more than I normally produce in a lengthy piece of work, but quite a few had clearly been missed in the editing process. That didn’t bother me in the slightest (since I’m always more generous in this regard to books that don’t come from major presses, especially since – having worked with major presses – I’ve seen the level of assiduousness and care major press editors put into every piece of writing and how much time it must take up), but I think it should be mentioned, even though it didn’t detract from my interest in the slightest. Additionally, the interviews were worth reading, but felt a little bit apart from the rest of the book, and might perhaps have made a more interesting blog post or magazine piece, or something of the sort, than a book addendum? However, these are both small nitpicks (and I am told David has sent a newly typo-free version to all publications of the book, so I assume the first point is now dealt with) which did not reduce the quality of what the work had to say.

So, in summary: an interesting read which will appeal to use intrigued by the technical specifics of early roguelikes, the design rationales, the social context of their games, their legacies, the earliest development of what we would now call the “roguelike community”, the impact of roguelikes upon games and gaming more generally, and a lot of interesting and amusing observations and anecdotes throughout. The book also spoke to a lot of debates which take place on this blog and in the roguelike (and procedural generation) community about a range of topics (many of which I’ve mentioned above), and (speaking as a sociologist) it shed interesting light on the social and cultural conditions within which the earliest games in the genre arose, and the broad levels of comparability between the demographic situations of many of the developers of that era (and the playerbase which became interested in these same games). Since this is the first book review to date on this blog and I certainly haven’t implemented any kind of formal rating system (and nor do I intend to), let’s just say: if you’re a classic roguelike fan, I recommend it. Tells us a lot about where we came from, a lot about where we are, a little about where we’re going (that only gets a small chapter at the end!), and how and why roguelikes came to take the shapes we recognize today.

GDC Europe and Gamescom

For most of this last week I’ve been in Köln at GDC Europe – where I gave a talk entitled “Hand Made Detail in a Procedural World” – and subsequently Gamescom, for a day-and-a-bit, before getting my flight back to the UK on Thursday. I don’t normally do conference write-ups aside from IRDC (though I have done one in the past about ProcJam) but since this has been the focus of my attention this week, and there were some interesting talks and interesting people, I thought I’d do one this time too. (Also, yes, the site was infected with malware for the past two days, but I have since purged it all – and both Google and my hosting company have confirmed the site is now clean – and updated/improved my security measures, though if anyone has any particular tips for WordPress security, do please impart them in the Comments section below). You can also download my presentation:

IMAG0629So, my talk was up as the second talk on the “Independent Games Summit”. The talk before me (Alexander Birke) was an interesting piece on the importance of automation to allow you to code large parts of your game extremely rapidly by creating distinctive scripts or sub-programs to serve these purposes. Indeed, several times he actually mentioned roguelikes and DF in particular, which quite unintentionally served as a decent lead-in to my own talk. It was 25 minutes, of which I spent about 10 exploring the benefits and drawbacks of both PCG and hand-made design (with a focus on PCG, which did of course expose my biases – but I am a roguelike designer!) in which I focused on some of the major pros of PCG (replayability, variation, challenge, the usual), the downsides (challenging currently to create puzzles, narratives, quests, etc), and the upsides (specific gameplay instances) and downsides (unchanging, inflexibility, rote-learning) of hand-made. Then I looked in depth at four examples which I thought were particularly illustrative – FTL, Dungeon Crawl Stone Soup, Spelunky, and URR. I talked a bit about the quests integrated into FTL and the issues sometimes encountered with this system (where later checkpoints on the system are sometimes unable to spawn under certain conditions), the “vaults” of DCSS and how they both in aesthetic and gameplay terms serve to “break up” the game’s levels, the secret quest to reach Hell which runs through Spelunky and the “vertical” integration of these items across an entire playthrough of Spelunky, and finally URR’s blending of hand-made and procedural content in such a way that (hopefully) players are generally unable to spot which parts of the game have been made by hand, and which are algorithmically generated. I concluded with acknowledging that this is quite a new field, that integrating hand-made into PCG is generally far stronger than the reverse (witness the “procedural” quests available in Skyrim if anyone doubts that observation), and there’s a lot still to be experimented with. The talk seemed to get a very positive response, and my presentation was far smoother than my recent one, so I was happy with how it went. And I now have my first GDC talk under my belt! Next year I’ll probably submit one specifically about URR in some way (maybe something about culture- and religion- and nation-dependent conversation systems?!), though I’m not sure what just yet. I’d also like to make it to the US GDC at some point, but maybe that’ll have to wait until I submit URR to the IGF, and that’s a fair distance off, so let’s not get ahead of ourselves…



After this, I went to two other talks that day; one from Mike Rose about the roles of bluffing and misdirection in games, which was fascinating (and connected well with some of my post-IRDC reflections). It also made me all the more excited for the future URR idea (“future” meaning actually in the near future!) idea of allowing the player to don clothes, adjust their skin tone, speak in a certain way etc, and attempt to “bluff” their way through a culture. Of course, that needs me to figure out how the conversation system is going to work, and despite a lot of productive scribbles made between sessions, I’m still not sure about it… but back to the conference. The talk after that (Nicolae Berbece) was about death animations, which has nothing to do with my own work/interests (though I do have some very cool thoughts about what’ll happen after your death in URR, and for anyone interested in death this absolutely excellent piece by Meghan Blythe Adams should sate your interest), but was interesting nonetheless, and tremendously well presented with some audience engagement. In the middle of the day there weren’t really any talks which really caught my interest (in any track, the Indie one or the others) so I planted myself in the speaker lounge, wrote every bit of this blog entry above and including this sentence, and wrote a thousand words of a piece of academic work I needed to work on (which is the secret project oft-mentioned here in past weeks).


During this day I also bumped into the great Kornel Kisielewicz, developer of DoomRL, AliensRL and DiabloRL, and now developer of Jupiter Hell (I hope my postdoc office is even a fraction as nice as the one in that picture). Kornel was one of the only big names in the RL world I hadn’t yet met (only Thomas Biskup, Josh Ge and the Adams brothers are still on that list, I think?) and we spent a good few hours chatting about our respective master-plans for our games, exciting super-secret endgame ideas (for which we both swore the other to secrecy, so nothing will be repeated), and we had a wide-ranging discussion over difficulty, adaptive difficulty, out-of-depth monsters, player learning, the different forms of randomness and chance that roguelikes other games can deploy, tactical and strategic death in roguelikes, our respective academic endeavors (making yet another RL dev who had, or had previously been studying for, a doctorate). It was great. I then ate too much potato salad and felt quite queasy for at least an hour afterwards.

After that (I now move forward a day in my writing) I realized there wasn’t actually a single talk on the second day which was relevant to my field! Lots were to do with managing teams, developing multiplayer, production cycles, etc (and the Indie Game Summit I was a part of was only on Monday) – so instead I just went for a bit of a wander around Köln, and shacked up at this rather nice Vietnamese restaurant/bar for most of the day to do some URR work – fixed a bunch of edge cases in religious and military districts, ensured that NPCs behave intelligently in slums and hunter-gatherer settlements (still called “settlements”, but I really need to change that properly to “encampments”), created the procedural graphics for campfires in hunter-gatherer settlements and got them spawning (those’ll be in the next update), and fixed a few other minor bugs.


Wednesday, however, brought with it Gamescom, which was rather more exciting than Tuesday – this was my first time at a massive games convention, and I wanted to both see what there was to be seen, and think a little bit about the experience of wandering around this kind of massive game/media event. Firstly, I learned a very important fact – that although the first day wasn’t even, technically, the “public” day (most people were “trade visitors” like me, though there were still a lot of general public attendees), I had seriously underestimated the size and scope of this event. By far. The convention building itself is colossal (consisting of 10 immense buildings, each of which would comfortably fit in every room in every games conference I’ve been to in the past), and there must have been… I don’t know, 10,000 people there? It’s difficult to estimate, but the crowd was uniformly dense around the venue, and I’d say there were easily 500+ people in each room at each time, plus many many hundreds in the corridors… either way, the thing is colossal.


First off I had to pay a visit to Jo and Riad in The Curious Expedition booth to catch up with my fellow roguelike-with-detailed-art developers, and I grabbed two of their incredibly nice buttons to bring back home with me. And in the very nice “Indie Arena” booklet, just like at this absurdly endearing pixel art of two of the explorers riding dinosaurs and giant turtles! I know I rave a lot on here about TCE (probably third only to the Souls series and Command & Conquer?) but it really just makes me grin every time I see it – it’s so endearing, and so interesting to play, and so much care and passion has so clearly gone into it (and I also appreciate that it takes very much the same kind of thoughtful critical stance on race/sex/history etc which I have in URR). Anyway, yes, pixel turtle riders:


If Jules Verne himself had been a game designer, he couldn’t have done better. After that, I decided to have a look at the Dark Souls 3 playable demo. Now: ordinarily I keep myself assiduously and borderline-religiously spoiler-free when it comes to most games, and none more so than Souls games. However, DS2 lowered my expectations for the series so heavily after the unbelievable masterpiece that DS1 was that I felt I should give it a look. For those who’ve seen the trailers, you remember that massive grey-ish castle with the diffuse yellow sky background? The demo had us wandering around there. We only got ten minutes (I am convinced the group I was in got less play time than the one before us, but I’m sure that was just down to actually playing the thing) and in that time, I have a bunch of reflections. Firstly, the combat felt slightly “heavier” and slightly slower a la DS1 rather than DS2; the area appeared to have many directions like DS1 rather than being far more linear like DS2 (it is this aspect which particularly gives me hope); and I didn’t find another bonfire other than the one we started at the entire time. However, there were a large number of enemies which is a crutch DS2 tended to use (not that I’m saying DS1 didn’t have areas of that sort, but DS2 definitely propagated the “lots of enemies = difficulty!” thing as a rationale where the original game generally didn’t) although some very interesting incidental objects in the level design. After a moment we came across a half-dead dragon lying across some of the battlements, who continued to spew fire at various intervals (not sure if it only had one fire spew animation, or whether there were different areas it could hit) – this had obvious echoes of the Fire Drake in the Burg in DS1, but having always liked the idiosyncrasy of the Drake in DS1 as a kind of non-boss setpiece (something DS2 generally never had) I don’t mind the similarity (which was perhaps intentional?). The glowing/smoking “globes” that denote something to pick up were also slightly smaller, and I didn’t even spot them until I’d been playing a little bit, which is just a side comment but a slightly odd change (or perhaps they just meshed unintentionally well with the colour palette of this specific area?), whilst I was pleased to run into a challenging knight-like enemy (very akin to the Balder Knights of DS1) who was fast, powerful, and hard to stagger (and honestly vaguely reminiscent of the Black Knights of DS1, which I hope for a return of: that kind of generally-optional miniboss enemy scattered around the world is a very interesting change of pace). The world also seemed very dense with enemies in terms of their spatial placement, not just their number, whereas DS1 always gave the player space to breathe and just wander in many regions: again, we only saw one part, but I hope there are some larger spaces where we are allowed to just take in the beauty and intrigue of the world. So, basically: far too little time to tell, but although there were some hints of DS1, it still seemed to have that DS2 “slickness”/smoothness which spoke of lots of harsh corners being rounded off (even though in many cases it was those same corners which made DS1 what it was). I really used a lot of parentheses in that paragraph, didn’t I?


After that, I noticed that there was a CS:GO tournament being hosted and streamed from Gamescom as a prelude to a much larger one (the “largest CS:GO tournament ever”) at the nearby arena at the end of August. I was disappointed I’d be long home before the huge event started, but since I’ve wanted to start attending eSports events (well, basically Melee and CS:GO are the only games I follow, but I’d probably watch SC2 at a pinch) I decided to wander along.


I watched one full game, and part of another, until my stomach insisted I go and find something to eat. It was fun to be part of the crowd (even if it was quickly clear that Gamescom wasn’t, perhaps, an event where a very competitive gaming/eSports-friendly audience would congregate?) and the game I saw was actually a rather good one – the score become 15-7 quite rapidly (first to 16 wins a match in CS) and the other team pulled it back to 15-12 before being defeated, creating just a little bit of “hang on… can they actually do this?” in the crowd by the time they got to 11 or 12. However, I must also just grumble here: I had to spend a long time even figuring out how the hell to get into this area, as the first security person on the area didn’t have a lot of English (not that I’m being judgemental, da mein Deutsch ist Scheiße) and we couldn’t make each other understood, whilst the second guy vaguely said I needed to get a “bracelet” and explained nothing else. After a lot of wandering, I finally realized I needed to show my passport somewhere and get a bracelet denoting that I was 18+. Really, CS:GO tournament guard person? You really think a semi-muscular 6’5 guy with a significant beard and a trade visitors pass might not be eighteen and he’d better go off and present his ID somewhere to make sure? Good grief.


Anyway, now for some more general reflections. Firstly, the noise was bloody deafening. No matter where you were there was a constant low ebb of dull conversational noise pervading everything, which honestly got a little bit trying after a while, especially as one got the impression a lot of games had turned their volumes up to be heard over the hubbub, and thus all the other games had responded in kind, and so on and so on in a kind of deeply futile aural arms race. I was also struck by how, even if one can be a game scholar, and a game designer, and high-level competitive gamer, and someone who has been playing games from the age of 3… there are so many parts of the gaming world that I’ve just never touched, and never will! Now, maybe you’re thinking – “well, obviously that’s true, Mark, why are you even saying this?” – but hear me out. It made me realize how much of gaming I know about without ever having played it (I can talk reasonably intelligently about MOBAs, say, or MMOs, or modern FPS games, despite the fact I’ve only ever seen them played or read about them, and never directly experienced them) but particularly as a young games academic, and as someone who (as I’m sure many of my blog readers have!) has spent uncountable tens-of-thousands of hours gaming, it was weird to get this feeling of having only “scratched the surface” of gaming. Now, admittedly, the genres I don’t play are naturally part of a deliberate choice: I don’t play MOBAs because I have no interest in MOBAs, so I don’t feel I’m “missing out”… but it was still a weird moment to realize that even with games as my career, my primary creative outlet, and my primary hobby, there are still immense volumes of “gaming” I’ll never really touch. Weird.

Also, there were precious few culinary options for somebody with a gluten allergy, and the carrots I was forced to eat were the most pathetically flaccid vegetables it has ever been my misfortune to consume.

However, this isn’t to say my grumbles dominated the day: it was pretty awesome to see the increasing variety in the gaming public more generally. There weren’t a lot of families/children there (though I assume there were more on Thursday onwards) but I was very reassured by the gender balance I could see. Equally, I was glad I got a glance over the Indie Games section, and got to play a bit of DS3’s early build, and just to experience the very… singular… experience that Gamescom certainly is/was. It’s an awesome (in the traditional sense of that word) sight to see so many gamers in one place and caring about the medium (even if I wouldn’t touch most of the AAA games there with a barge pole!) and I thought the indie area was quite strong, even if it was barely advertised in the main booklet and far more space was given to the commercial partners and businesses! Indeed, I actively had to ask around to find the thing after spending 15+ minutes searching every part of the booklet I was given as a visitor trying to find even the slightest mention of where the Indie Arena was, so they really had “hidden away” the Indie Arena compared to the “ENHANCE YOUR GAMING PROFITABILITY!!!” people. It was also curious to attend a conference/convention as, in essence, a “fan”, even if I knew a couple of the developers presenting and might well be showing off URR in similar venues in 2017 onwards. For the last 12+ months since I moved into game studies every conference I’ve gone to has been one where I’ve been “behind the curtain” as a presenter/speaker/etc, and it was a slightly odd reversal in that regard to be an ordinary visitor. Next time, I’ll have to make sure I’m presenting URR!

So, lastly: on Thursday my intention had been to hang around at Gamescom a bit longer, but much as I’d realized with GDC that there just wasn’t that much else “for me”, I came to have the same feeling here. Don’t get me wrong, I greatly enjoyed my visit to both this and GDC Europe and will certainly come back when I have a talk to give at GDCE on URR, or URR is in a games-convention-presentable state (i.e. let’s say 2017), but GDCE is a primarily industry conference, and Gamescom is an industry+game-fan/player convention. I’m not in the games industry and never will be, and whilst (obviously) I am a game player… I’m not a player of 99% of what was on display at Gamescom (and honestly, to an extent, I never have been, even back when I did play a lot of FPS/RTS games). I just looked around Köln a bit more, ate at that splendid Vietnamese place again (when one’s food choices are very limited, one tends to really stick with places which have proven themselves as viable instead of branching out), and made my way back to the UK (I’m now done conferencing for the year, so I can actually focus on my work from this point until the end of the year!). Since returning I’ve been continuing to work on general ambient NPC life, with the goal of having it all finished by the blog entry I post on the weekend of the 22nd/23rd. I’m currently making sure NPCs behave correctly in all buildings, and know what to do in the more unusual buildings, and dealing with the wealth of bugs in the existing game one always finds when adding new content.

Next Week

Next week I’ll be posting a review of a new book about roguelikes coming out! Week after that, I’l be doing the final post about ambient NPC behaviour inside buildings, and then moving forward with other NPC behaviour in 0.8, either into what I’m calling “stationary” NPCs (e.g. priests in churches, guards outside mansions, etc) or “special crowd” NPCs (so groups of NPCs having festivals on religious festival days, etc). After that, it’ll be probably be “special” NPCs (i.e. those which need to be tracked no matter where the player is), and then I’ll be working on the conversation system. This is clearly going to be a huge update, and I’ve actually debated releasing an interim version with NPCs and clothing/face generation but no conversation system, but I’m disinclined to do this, so I’m probably going to take a little longer and push for a massive update instead. Thanks for reading this marathon entry, and see you all next week!

Inside Behaviour, Housing Districts, Prayer Mats

This week I’ve worked on some new graphics, on a lot of the AI for interior behaviour, made some alterations to a district generation system I wasn’t happy with, fixed various bugs and minor issues, and moved closer to the point where I can confidently say all crowd NPCs are working correctly. First, though, I must give my appreciation to one James Patton for this extremely kind and very thoughtful write-up – he has (or “you have”, if he’s reading this) hit the nail on the head with my objectives, my design philosophies, and basically everything else, and that’s always very gratifying to read. Also, if you fancy some other roguelikey reading, I’m building up quite a number of roguelike pieces – I wrote for KillScreen about the demonic enemies in NetHack, for Paste Magazine about the 35th Anniversary of Rogue, and for Imaginary Realities about the role of text, characters and letters in roguelikes (and URR). Also, on a non-roguelike note, I wrote two pieces in the latest issue of Five out of Ten, both on Command and Conquer, specifically about the portrayal of civilians and ecological disaster – if you fancy giving them a read, head over here. The magazine itself is beautiful, and gets criminally little attention for the amount of effort which clearly goes into it (and I don’t just say this because I’m in this issue) so do give it a look. Hope you enjoy giving them a read… and now, onto the update, which is rather more substantial than last week’s paltry offering:

Prayer Mats

I took a moment this week to do some graphics, and decided to finally implement something I’ve been meaning to for ages: prayer mats. Some religions now use prayer mats in their religious buildings instead of chairs, and the design of these mats is dependent on both the religion, and the civilization the religious building is found within (so religions across many nations will have similar, and aesthetically comparable, but slightly different, prayer mats across nations). The colour scheme is based on the altar, as shown in the three examples here, and the shapes (squares, octagons, etc) are down to the nation, whilst the specific layout of shapes and symbols, and obviously the religious symbols, are down to the religion. Here are some rather nice examples:


And some prayer mats in a religious building and a cathedral (note that the colour of the maps vary based on the actual mat colours, though now ‘=’ can’t be used for anything else!):



Further Interior Behaviour

This week I’ve done a lot more NPC interior behaviour. There is still a little bit which needs doing, particularly with special cases – NPCs going into banks should talk to the clerks, for instance, just as NPCs in hospitals should go and sit by the bed-side of someone they know, etc, but a lot of these actions are now working very nicely. In a cathedral, for instance, I just sat by and watched as NPCs came in and prayed at the altars, sat on the chairs/prayer mats, looked at the relics, admired the cathedral’s decoration, talked to one another, sat down to study the holy texts, etc. Here is an awesome gif of this which is neat enough to watch to the end, I think, of various people in this cathedral (the one above) doing these types of activities:

CathWorshipNext up was the gallery. As with all buildings, I’m leaving the “permanent” NPCs until last – so worshippers will wander around a cathedral, for example, but there are no priests there yet, as they will be tethered to that building and a particular routine – but here we now have people coming in, admiring the paintings, and showing themselves out again. Painting generation will happen when I swoop in and redo the history generation from the fairly simple system there is now, to something which truly encompasses every piece of information in the world, and begins to lay the foundations for sneaking in clues to the game’s central cultural cipher. Anyway, the gallery:


By the end of next week I hope to have more interior algorithms finished, and by the week after, they should all be done (this week is GDC Europe and Gamescom, and I’m attending 100% of the former and ~25% of the latter, so that’ll be taking up a bunch of time). At this point I’ve implemented some general code for all buildings, and now it’s a matter of going into every building and checking the code actually works there.

Middle-Class Rivers

I suddenly noticed that under the new generation algorithm for middle-class districts, when a river goes through them, they don’t look very impressive at all, and we end up with something like this (with the issues ringed in red where multiple “bridges” seem to overlap:


This wouldn’t do, and it just looks rather dull, so I rewrote this algorithm into producing something rather more interesting, so here’s the same district using this new algorithm which encourages the river to flow around/past major roads, avoid smaller ones, and to then design the rest of the roads differently and place buildings/parks a little differently in order to accommodate the river. Here are two examples with a “corner” river and a “long” river, from the same city (note that the shapes of the corners and the roads sometimes change – I set it to randomize that aesthetic choice each time I generated an area so I could make sure the new system always worked):

oubleriv neriv

Other Small Changes

A number of other minor changes have also been implemented this week:

– Colonies can now only be established with nations with the “Imperialist” ideology, rather than all nations which are not “Isolationist” (which it was until now).

–  An extremely unlikely edge case involving rivers and lower-class district generation has been fixed, ensuring you never end up with a part of a district that cannot be accessed without entering the district from another angle, due to the river’s location. See below:


– Each NPC’s face is now tinted fractionally to add further diversity within nations – everyone’s faces are tinted a tiny bit (between 0.03 and 0.06%) towards yellow, orange, red, white or black at random. That might sound tiny, but the difference is noticeable.

– Roads are now grey merged with just the tiniest bit of brown, and all skin-tones are now very easy to read on it. However, others do struggle on the “soil” terrain type, so I’ll fiddle with that too (probably make it a little more green, perhaps). Equally, chairs are made out of wood – with colours that range from light brown to dark brown – and therefore chairs, in some cities, do tend to blend a little with the populous. Again, considering solutions, but I might tint everyone’s skin tone a fraction to the red.

– Fixed a thrilling bug where chairs sometimes decided to spawn in the empty void of nothingness outside the map… and then NPCs wanted to sit on them.

Next Week

As above, I’m flying out tomorrow and returning in a week, and I’ll be doing lots of GDC stuff. So… expect either a shorter update, or a non-URR update, depending on how things go. See you then!

Interior NPC Behaviour

Well, it has been another very busy week – I gave a talk on URR’s PCG and AI systems at 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:

Town Wandering


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!