Trees, Gromit

The past two weeks have been very academia-heavy, and I haven’t been able to produce as much work on URR as I’d like. We’re still on for the end of the year for version 0.4, but this is going to be a short update on a few small aspects developed in the last fortnight. I’m currently working on finishing off my list of small fixes, bugs and improvements, and I aim to finish that off by the end of the week. There were around fifty things on the list, which is now down to about thirty, and constantly dropping. Some highlights of the past week:

- I’ve improved the way saving is handled, reducing the length of time it takes by around 40%, and I am confident I can take off at least another 10%, and possibly even enable multithreading so that saving (though not loading) can actually take place in the background.

- Fixed a large number of issues around throwing items indoors/outdoors, how they are rendered, and the messages they display upon impact, which can be dependent on whether you see the thing they hit, and/or the thing they land on. I believe every variation is now catered for, but this requires a little more testing.

- Having finished off all the procedural graphics that appear when you look at terrain, I’ve worked on the ones for trees. Each species of tree has a distinct colour for its bark and its leaves – in general these are true to life, though a few trees are slightly stylized in their choices of colours purely to aid in distinguishing them, rather than submit to absolute realism. The branches display at different angles based on what part of the tree you ‘l’ook at, and the leaves and branches are naturally procedurally placed, so here are some examples:


I’m pretty happy with them. Anyway – I’m tentatively going to estimate that 0.4 will be released either around the 20th, or if it takes a little longer, around the 29th/30th of December (or possibly even on New Year’s Day). I have a hefty amount of academic work that needs to be done, so it’ll all depend on how the two both play out. Either way, within two months, the next version will be out, and you’ll be able to set yourselves on fire and throw torches down darkened corridors to your heart’s content. Once we get closer to release blog updates will return to weekly, not fortnightly (as they always do), but I suspect we’ll only have one more update in November. In the mean time, if you enjoy your roguelikes myself and my co-commentator have been streaming a lot of Dungeon Crawl: Stone Soup lately, including a three-Rune win, a four-Rune playthrough, and a five-Rune character who we’re currently debating the next move with, so if you’re interested in watching (and maybe even learning some tips for) what I think is the best classic roguelike around, check us out here. I also stream coding sessions, and nearer release, probably some URR playtesting sessions as well.

Also, you may need to have a decent knowledge of British comedy TV to understand why I named this entry the way I did. I apologize to my non-UK fans, and swear I shall never name a blog entry in such a stupid way ever again.

Efficient Map Generation & RPS Postmortem

For those who didn’t notice my incessant spamming of this link on every media outlet possibly available to me, I was interviewed for Rock Paper Shotgun earlier this week, and the interview can be found here: The response has been insane, and has made me very glad that I chose a higher hosting package for this site than I initially expected to need. Several gigabytes of downloads have taken place in the last week and the game is still flying off the shelves (metaphorically speaking) as I type this. Thanks to all the new people who’ve found the site, downloaded the game, followed on Facebook, Twitter or Twitch - I hope you like what you’ve seen, and that the development plan and the future objectives for the game sound like something you’d like to be a part of. I make a point of replying to every single comment, email or tweet I get, so if you have any comments, observations, criticisms or whatever else, do please send them my way. I’m well over 50% of the way through developing version 0.4 (see the development plan for more info), and it will be released before the end of the year.

And on that note, this fortnight’s update is a relatively short one, though a lot of work has been done. I’ve now enabled the ability to export the map grid you’re currently on into a .png file (much like you can currently export the various world map overlays by pressing ‘X’). More importantly, I’ve been redoing all the terrain generation, and have reduced the loading and saving times on all map grids by between 50% and 90%, depending on what’s on the map grid. Grids with buildings and interiors naturally take slightly longer to generate than other areas, but the reduction is very significant. All of those who say the game takes too long to load some segments (you are undoubtedly correct) can hopefully, now, rest easy that they won’t be waiting through the same kinds of load times. I’m also changing how the game stores data so that the save files will be less colossal; this is an ongoing process, but the save files for 0.4 will certainly be smaller than their titanic 0.3 brethren. The remaking of the terrain generation algorithm is perhaps 90% completed now, and one thing I’ve been doing is also adding more detail to the ziggurat regions. I felt they were looking a little sparse, so it seemed appropriate to do something to improve them a tad:


And a gif of these structures at dawn, day, dusk and night (note also the changing shading on the trees):


For the time being these extra structures are just decoration, but in the future they too will be fully explorable, and each ziggurat region on the world map will have a lot more content in it than it currently does. In line with some feedback I’ve got, I’ve decided that there are only going to be three ziggurat locations on the map – each one will contain a single large ziggurat that will contain a key fragment, and the other ziggurats will contain a number of other things in them. I’d like each map grid you end up exploring to be a significant thing, so each grid area (like the one above) is going to contain a far larger amount of content. I’m now switching back to finishing off throwing and projectiles once and for all – perhaps only a day’s work remains there – then I’ll be moving onto handling the health system. Next week we’ll have a summary of all the other developments over the last month and then follow that up with the start of health and injuries.

Drawing Languages

This week we’re going to talk about the languages in Ultima Ratio Regum. These have two components – the visual side, which is this week’s topic, and the coding side which allows the game to build up full dictionaries for each language. The latter side isn’t yet fully implemented, and I’m still working on how precisely language as a mechanic is going to work in-game, but as those who played the last version will have noticed there were a large number of possible fictional alphabets. If you looked in the game’s files, you’d have noticed sixteen languages, each in the 12×12, 10×10 and 8×8 font sizes. This entry is about how I went about creating these, what each is based on, and some of the restrictions I discovered I had to impose in order to make the alphabets (none are syllabic or logographic, for those would require much larger numbers of characters) visible and distinct in as little as 8×8 pixels. I’m only going to cover some of the alphabets here; by my own admission some are less interesting, and some more obvious in their origins, so I’m going to only cover the ones I think are the most intriguing, or that required the most work or research to bring to fruition. The game mechanics side of the in-game languages I’ll cover at some point in the future once said mechanic does, in fact, exist…

The first alphabet is based on various runic alphabets. I confess that such alphabets are routinely used in various fantasy contexts and on this count I haven’t been particularly original here. I’m not quite sure why languages that look this way are so popular, though a few rationales present themselves. TheRunes1y’re clear and all aesthetically similar; they look like the kinds of characters that could believably be hewn into ancient rock with only basic tools, rather than more intricate or curving designs; they are somehow rather striking and lack any real ambiguity or potential to confuse one letter with another; and perhaps the cultural pervasiveness achieved by our long-dead Viking ancestors above many other non-extant civilizations has something to do with it too. Regardless, I started off with these because they could be drawn with clear, thick and straight lines, and could easily be scaled upwards or downwards to different font sizes. Despite some fairly heavy restrictions in terms of focusing on straight lines and as small a number of those lines as possible, a decent level of variation was possible. Here’s what the language looks like in the end:


This second alphabet is inspired by Rongorongo, the as-of-yet untranslated series of glyphs (linguists are uncertain whether it is indeed a “language”, or perhaps a form of mythological archiving or memory aid) found on Easter Island. I’ve always found Rongorongo to be a particularly aesthRunes1etically pleasing language with its combinations of half-ambiguous plants, humans and fish, and I find something quite enticing about the fact we don’t yet know how to categorize it – a language, a proto-language, or something else altogether. That it has held its mystery strikes me as an interesting aspect of the language, and I wanted to try and echo something about the lack of clarity Rongorongo displays about whether the images are letters, direct representations, or something else altogether. This was a much tougher language to create due to the intricacy of some of the designs – I was eventually able to make them all identifiable at even the 8×8 font size, though some were a lot trickier than others. I think this one turned out well and has a certain feel to it the other languages (not being at all symbolic) lack.


This next alphabet is based on Hindi. A language joined up a consistent line, rather than the ways in which handwriting is “joined up” in western European languages, was one I wanted to make from the start, whRunes1ilst still making sure it remains distinct from any real-world equivalents. This one was both enjoyable and relatively simple to make, and scale down to the 8×8 font, though the application of a horizontal line imposes a few minor restrictions on it I haven’t yet worked out ways around – for instance, if generated around a ziggurat door. I will likely simply prevent this language image from being chosen in such situations, though I hadn’t done so just yet. However, long sequences of this language look very nice in-game, and contributes further to trying to produce a variation in linguistic aesthetic reasonably comparable to that we see in the real world.


The alphabet below is based on cuneiform (much like, for all intents and purposes, the dragon language in Skyrim). Much like the runic language, this one is very clear at all scales, and also lends itself to a variety of combinations of length and orientation of indentation. EquallyRunes1, the way in which one can imagine such a script being carved into rock has always given the language a particular interest for me, and thematically I find the origin of such a language being centuries or even millennial before the start of the game very believable. The fact the tools used to carve the language are reflected in the language itself lends it, I think, a very unique air:


The next alphabet you see below was a very deliberate attempt to make a language that differed widely from all the ones above. I can remember looking at the current file of languages and trying to think of an aspect I hadn’t used – many diagonal lines, or several curving lines – before realizing none of the languages so far used dots alongside other components. One was composed entirely of dots (not shown in this entry), but none uses dots in small amounts or as an accompanying part of the script to other aspects. Thus, I created this language, which was envisioned as a combination of curves and dots in different quantities, and one I think turned out very well:


Now we come to one of my favourite alphabets. I think this is one of the best languages I’ve created thus far, though it is not based in anything in particular (beyond labyrinths and mazes). This was one of my attempts to create a totally unique language, and I certainly can’t think of anything resembling it in either modern times or earlier history. Some parts bear passing resemblance to certain tiles in logographic east Asian scripts, but otherwise I wanted to make this language very detailed, very dense, but with a clear geometric preference for orthogonal lines and right-angles, and generally only a single consistent line that makes up the entire letter. Although it may not look it, this one translates well into small font sizes by simply reducing the numbers of loops, for example, a particular character in the language has.


Ultimately, what struck me as the most important factor was the internal consistency in each alphabet. When one looks across languages, even those character seemingly very different, clear differences between scripts become very clear – whether alphabetic, syllabic or logographic, each has a preference for straight or curved lines, a willingness (or not) to use dots and other small markers, restrictions on how the language may be constructed, a way of joining up characters (or an insistence characters must be kept separate), and so forth. The languages for the game have tried where possible to reflect this, and to generate a reasonable amount of variation for each language whilst still staying within logical boundaries. Equally, there are rare cases where certain characters have been maybe slightly changed or slightly simplified just to aid ease of writing (or reading), and in some of the languages I tried to add a character or two that were slightly different, but could conceivably have developed from a slightly more awkward variation of the same character. There are perhaps another half a dozen languages in the works too, but they probably won’t make it into the game until 0.5, when full civilization and history generation will be implemented. It is worth adding, for those unaware, the name and the dictionary for a language will be generated at random each game. Which is to say, the “Hindi language” might have one name one game with a particular set of words assigned to it, whilst it will be totally different next time. Once 0.5 is implemented the game will generate a dozen ancient languages, assign names, dictionaries and images to each one, and then populate those in global ancient ruins logically. All contemporary languages in the game will use a contemporary Latin alphabet, albeit with a full potential complement of umlauts, accents and other diacritics.

Lastly, and as I’ve mentioned elsewhere, I’ve now hit over 1000 followers on Twitter, so this coming Sunday (the 13th) I’ll be doing a celebratory all-day coding/playtesting stream from (roughly) 12am GMT -> 12pm GMT. Do please stop by and say hello; I’ll be following it up with (most likely) some Dungeon Crawl Stone Soup in the evening, so if you’ve ever wanted to get into the best classic roguelike out there, be sure to tune in. Next week I’ll be doing another big URR update as I finish off everything in the release that isn’t health, injuries and death, after which –  you guessed it – we’ll be moving onto health, injuries, and indeed, death. Stay tuned.

Thoughts on Metro: Last Light

A couple of weeks ago I spent roughly 10pm to 7am one day playing through Metro: Last Light on the highest difficulty. I’ve previously played Metro 2033, and despite a few flaws I found it to be a refreshingly difficult FPS, with some challenging mechanics (gas masks/filters, and bullets-are-money), sometimes very difficult level design, interesting quasi-bosses and a willingness to try weird ideas which (generally) worked very well. It also had that notorious checkpoint-free area where you interfere in the battle between the Communist and Nazi factions, which rates as surely one of the hardest and most rage-inducing FPS checkpoints in history (at least with the impressive itinerary of useless weapons I was carting around at the time). In Last Light, there are two parts I want to talk about, which it respectively does far better and far worse than the original. The first is to acknowledge how well-done one particular area of the game – “the swamp” – was, and how cleverly a bunch of different mechanics were brought together in this area, along with some nice subtle and passive aspects of world-building in the Metro universe; the second is to do with item balance and the importance of item scarcity, the way in which Last Light inexplicably did away with a central part of what made the original so interesting.

- The Swamp

As Artyom, the hero of Metro, you explore this area twice (or possibly the second time is a “marsh” rather than a “swamp”, but the distinction is irrelevant) – it consists of a combination of land and water, containing various red flags that denote safe areas. If you plunge into the foul water below your character drags himself back out, having lost several seconds, but if you do so too many times in short succession (I think there is a timer here) a creature will swim up and consume you in short order. First time you arrive you come here in the day – another apocalypse survivor has set up an automated raft to ferry you across the swamp, but it requires fuel which you must find and deliver to the motor which will drag the raft towards you, before then allowing you to escape.


Your first look at the swamp…

The swamp succeeds firstly because it feels like a genuine ecosystem – when you get here you see some water-based enemies you’ve met once or twice before, but also a host of other creatures who do not interact with you, but just swim or scuttle about. Other enemies disappear and reappear from the surface of the swamp (I think/assume despawning when they dip under the water) and, whilst they rarely attack you, their constant presence lends a lot of life to the area and emphasizes you’re stepping into somewhere with a very alive and very active selection of mutated fauna, not the dark and silent catacombs that make up many of Metro’s levels. It’s a welcome change of pace - whilst much of the world is dead, this section serves very well as a bit of ambient storytelling to demonstrate that much of the world is not deserted of life (even if the life is nothing like we recognize) and that entire ecosystems have built up; we see larger creatures preying on smaller ones whilst we’re out here, and just the general flurry of biological activity all around.


These guys flit, swim and hunt around you as you progress through the swamp, but are not unwilling to attack if suitably provoked.

This flurry of activity also serves a few clever gameplay effects. It builds up a stronger sense of urgency about your activity than in darker, ostensibly “spookier” regions – all this activity around you suggests at any moment the occupants of this swamp might lose their patience with you and attack, whilst the player wonders what exactly might set off such a response. Are the enemies programmed to attack after a certain period? Maybe only after you pick up some fuel? Or perhaps they’ll leave you entirely alone unless you attack or come to close to one of the creatures minding its own business? The uncertainty over what exactly might trigger them is eminently realistic – who could possibly guess what would incite giant mutant shrimps to attack you? The region seems less safe than other areas despite being so bright and open, and you’re constantly spinning around and checking behind you. This is not because you fear things emerging from some dark crevice or hidden hive, but because you want to make sure you haven’t done anything to annoy the inhabitants. Equally, if you do, the ensuing combat feels subtly different to that elsewhere in the game, where you attempt to deal with the creatures you’ve annoyed whilst avoiding triggering any others. Having only played it once, I’m uncertain what the actual triggers are, but I’m pretty certain proximity to the “shrimps” aggravates them, and possibly just standing still for too long makes them increasingly annoyed at the bipedal invader tramping around above their swamp.

Another effect of keeping you moving to avoid the foes couples nicely with the filter mechanic, which is everpresent in outdoor areas. This consists of managing the air filters on your gas mask, which are in short supply and must be replaced whilst outdoors to filter out the toxic fumes of the world above. In the swamp the player wants to push forward without bothering the inhabitants too much, whilst the filter time constraints prevent you from necessarily pushing up against the boundaries of the play area. It’s a pretty simple trick, but an effective one to stop you finding all the invisible walls. The swamp seemed like a genuinely massive area and I never came up against its boundaries. You still need to explore to keep a decent number of filters, but the constant threats (which often respawn in areas like this) and the timer combine to keep you moving and stop you breaking the illusion of the open level. The outdoor levels seem far more open than in other games, due partly to the superb design of the outdoor areas (when you make it to St Basil’s Cathedral and the Kremlin Wall is a particularly good moment), but also because of this exploration limitation.

- Item Balance

The original Metro had two central forms of limited resource. These were ammunition and the gas mask filters discussed above. Sadly, whilst Last Light improved on the formula of the original in terms of world-building, these two aspects were very much dumbed down in the sequel, regardless of the difficulty level you choose to play on. Firstly, ammunition. The currency in the game is “military-grade bullets”, which are more powerful than normal bullets. You can shoot them, but as the game reminds you this would be “literally burning money”. In the original Metro (at least at max difficulty) such bullets were genuinely rare, however much you explored, and there were situations where the use of these bullets was a difficult decision. You can get the extra damage in your current battle, but you won’t be able to buy new bullets or upgrades for your guns later down the line. It worked very well. Here, however, even when I just held down automatic fire to pour bullets into certain bosses or hordes of enemies, not even once did I a) even consider using a military-grade bullet for extra damage, nor b) come even close to running out of military grade bullets to sell and fully restock every single ammo clip and grenade inventory every time I found a vendor. You can get through the hardest challenges the game has to offer as long as you have decent aim, don’t hold down the trigger like a madman on every enemy, and you make sure to scavenge every corpse (which takes seconds). I think this is due to two factors – firstly there are simply more bullets around the place (obviously), but the knife is far easier to use in this sequel, and as a non-depleting resource, the number of bullet kills I had was maybe 10-15% lower than in Metro 2033 due to the immense quantities of humans and mutants I stabbed in the face. This combination means the careful inventory management of the original is, sadly, a thing of the past. I would go as far as to say the number of military-grade bullets should have been halved, at the very least, to keep that mechanic intact.

If you are ever unable to afford everything you want every time you want it, you're Doing Something Wrong.

If you are ever unable to afford everything you want every time you want it, you’re Doing Something Wrong.

Secondly, filters. In the first half of the game these work great, and as mentioned above serve a very good purpose in some of the tougher outdoors sections. However, after you enter the third (and worst) act of this four-act game, suddenly the developers seem to have had the “place air filter” button permanently held down on their mice. Although struggling to get above 2:00 of air for most of the first half (and often having to survive without a filter at all for many seconds whilst finding another), I believe I finished the game with something stupid like 20:00 of air backed up. Filters are everywhere. Every corpse, every box, every toilet contains one. Every filter seemingly contains another filter, hidden within it like Inception’s dream layers, just to make sure you don’t run out. Artyom’s movement speed should have been halved at the very least by the sheer weight of these things he’d have been lugging around by the end. A lot of the final two acts take place in the outside so you need a lot of filters – that’s fine. But either the developers assume people wouldn’t explore, or they assumed players are just painfully incompetent, as otherwise there’s simply no other reason to simply hurl as many of these things at the player. All the tension and difficulty of maintaining your air earlier – sometimes even deliberately choking for a period to extend your life – whilst sometimes fighting difficult fights is utterly lost when you can just chuck in a new air filter with the same ease as reloading a gun. Tension evaporates, and fighting outside is no different to fighting inside, except having to replace Filter n with Filter n+1 every few minutes, which is a pretty meaningless act when there’s no possible way you could run out. It also enables you to rush through this third act without pausing and feeling any real pressure to explore, making the several-hour section absolutely trivial – the filters are placed directly in your path, rather than hidden, and no extra effort is required to build up your impressive stash of filters.

By the time you get here, you will have so many filters you could outfit every human survivor and still have some to spare.

By the time you get here, you will have so many filters you could outfit every human survivor and still have some to spare.

- Final Thoughts

Both Metro games are skilled at coupling environments, subtle storytelling and gameplay together. The level design is generally combined well with the creatures you find there, and does work for contributing to the story and generating specific feelings in the player. Whereas a game like Bioshock can be heavy-handed in its level design – it gives you a puddle of water or a pool of oil, immediately setting up obvious combinations of weapon/plasmid use – Metro’s environments seem to me much more interesting, and much more willing to produce a unique enemy or unique idea purely for that one region, and the effort combining the environments and the gameplay really shows. As for item balance, the first game in particular gave you a very stringent inventory system which promoted difficult and interesting decisions (much like other games which present you with limited resources), an aspect which was sadly lost in the sequel, even if those mechanics remain interesting ones which will hopefully be meaningfully reinstated in any future edition of the franchise. In a future blog entry I want to talk more about the kind of background storytelling I’ve mentioned here, and also how I want to couple environments and gameplay and URR in the future. For the more roguelike-minded, a great example of this is the new version of the Vaults in Dungeon Crawl (as of 0.12), where the enemy set and the physical layout of the area work together in interesting (and generally unpleasant) ways… but that’s a post for another time.

Next time, we’ll have a URR update, at which point everything to do with traps, throwing and handling projectiles (as those who watch my stream will know) have been finished, including graphics for all objects and all traps. After that, I’ll either be moving onto a lot of tweaks and small changes for 0.4, or the other large part of the next version – the health system. Stay tuned…

External Lightning and Throwing

Just a short update today as it has been a busy fortnight. Firstly, some housekeeping. For those of you who don’t know, I’ve taken to streaming URR coding (and answering game questions etc), and also streaming Dungeon Crawl and a few other games, on my Twitch channel. I’m planning on streaming a lot more both coding and games as time goes by, and I’ll be announcing these only on Twitter (since I don’t want to fill up the Facebook page or anywhere else). I’d also appreciate some feedback on whether people are interested in seeing me do more gaming with the stream, more coding, or a mix. Briefly, on the first for example, I’m currently playing Crawl a lot – which I’m reasonably good at, and have several wins for under my belt – and will soon be playing the original Deus Ex for the first time. If you’re interested, let me know, or check by the channel. I’ll normally be streaming from any time between 12am and 12pm GMT, depending on what else I’m doing.

Now, onto the actual update which, as promised, is pretty brief (though what it describes is pretty significant!). Firstly, you can now throw items. Doing so brings up a crosshair, this time yellow (the ‘l’ook function is white, whilst the ‘g’rab function is orange), which also produces a “tail” behind your cross hair which shows you whether or not your throw will reach its target, sections of which will light up red if you’re trying to throw it through something you can’t. You then press enter, and the item soars across the map (some items spin whilst flying, so a torch will display as ― / | \ whilst flying) and hits whatever. I’ve also enabled a system for a message to display both when the item hits something, and when it lands, along with any other effects. For instance, you might get “The torch hits the wall”, or “The torch lands on a fire trap”, or “The torch hits the wall and lands on a fire trap” if you aimed the throw at or beyond a wall, it hit the wall, and then comes to land on whatever is below it. Additionally, some objects now set off some traps. Anything passing through a tripwire (not over a tripwire – it must land on the tripwire) will set it off, and heavier objects landed on pressure pads will set them off. You will also soon be able to ‘u’se branches to, rather than just throw them at traps, prod a trap in any square adjacent to you. Bear traps cannot be set off by something as light as a branch landing on them, but they will be triggered if you push down on the trap with one manually. Naturally all of this need will need balancing in the future once I know how much the player can carry, the scarcity of items, etc, but I’m just focusing on the mechanics for now. Below are two pictures of valid and invalid throws:



Secondly, torches now produce lighting whilst they fly! It is a very, very cool effect, and means you can now throw torches into the darkness to see what’s ahead, if so inclined. There will be very little in the current release that you might need to do that for, but in later versions it will be of much more use in certain situations (though you’d always run the risk of alerting people up ahead). The image below should give a vague idea of what it looks like, but I’ll try and produce a gif of it at some point.

Torch Throw

My next objectives are making sure all the interactions between objects and items on the map a) are correct and b) give correct messages whether in or out of sight, working a little more on tripwires so they spawn correctly in some unusual map situations, and finishing off the trap graphics, around 70% of which have thus far been done. After that I’ll be working on the ‘m’ake menu for combining items (for example, constructing torches), and then I’ll be moving onto the second big part of this release, which is health, damage and healing items. Well on track for releasing 0.4 before the end of this year! I’m also going to start producing much more detailed changelogs from here on (akin to something like Crawl) since there’s always a lot of tweaks and minor new features I end up fitting in.