The Language Problem

Another short entry this week I’m afraid folks – as mentioned last week I’m coming to the end of my doctorate first draft, and that’s taking up pretty much all my time. I’ll be handing in the first draft some time towards the end of this month, so the latter half of February should see coding resume properly. Nevertheless, for this week I thought I’d say a bit about my current thoughts on in-game langauges.

As mentioned in an earlier entry – and as you’ll see in the game – URR contains a bunch of different languages. In the current version of the game the game simply picks a language at random for each ziggurat and then implements them as simply one letter from the translation serving as one letter from the language itself, and since no language mechanics are yet implemented it just auto-translates. However, I’ve been thinking about what kinds of changes I want to make. It’s been proving tricky, however, to think of a language mechanic which is interesting, balanced, and wouldn’t just end up being bothersome. Some examples of the ideas I’ve considered:

Lang1

– Your language learning level is an incremental %, and that % of words translate.

This was my original idea. You’d maybe acquire language knowledge in small parts by reading books, talking to NPCs or other things, and the higher the % the more words would translate. At first I thought this was a reasonable idea as it would mean even with a small amount of language knowledge you could still potentially make educated guesses. However, this seemed to have a bunch of problems. Firstly there would be a lot of components to learning a language (i.e. a lot of books or NPCs) – it might take a long time to learn a language in-game, and one that is only used for a single ziggurat. Secondly, I realized that it could lead to some very annoying gameplay situations. If you had 98% knowledge, for example, you could reasonably expect to be able to clear a dungeon… but if a single vital word was missing, it would still be impossible without a lot of guess-work, and potentially too much guess work to be still playable. This then raised questions about how common language-information would be, and a couple of other issues too, so this one got quickly ditched.

– You can learn a language in % chunks, say 25% at a time.

The next idea was much the same as the above, but in much more distinct chunks. Perhaps one could only learn a language to 0, 25, 50, 75 and 100%, so at anything below 100 you would know going into a dungeon that you were running a risk. I felt this removed both the problem of how many sources are there for learning languages (as now the answer would just be “not many”) and the risk of you completing almost an entire dungeon and then failing on a final key word (since 98% language knowledge would be impossible), but it just didn’t sit right with me. It still felt like an arbitrary barrier between the player and proceeding with the game’s story – you had to find language books or other sources of information before going anywhere. So…

– You either know the language (via a “dictionary” item), or you don’t.

Under this model language items would be very common – “dictionaries”, for example – but of a reasonably high price. Perhaps some would be very cheap, or the player would start with one if the player chose certain classes… but again, it was just an arbitrary barrier. Once you knew that dungeons would require some level of translation you’d still have to find your way to acquiring a dictionary beforehand, and that still seemed like a barrier to “progressing” with the game.

– A fourth option presents itself…

Lang2

So, none of these have really worked out. I felt that the languages were both an important part of the world-building process, and could produce some very interesting and unusual gameplay… but I just couldn’t work out how. However, I think I’ve settled upon a good solution. Instead of making languages something the player character learns, I’m instead going to basically turn the languages into ciphers for the player to solve. Although the game is permadeath, I expect each playthrough to last for a length of time more akin to DF adventure mode even for new players, rather than the length of time a new player attempting Nethack is likely to survive before having everything stolen by a nymph and dying to a stray cat. It’s going to have much more of a feeling of developing your character over a longer period of time, and I think this will fit in nicely. Some for early dungeons (such as ziggurats) are going to be very simple, perhaps only substitution ciphers, whilst the languages for the later dungeons will be much more complex ciphers. For the very late dungeons, perhaps they will be sufficiently tricky to solve that it might even require multiple players to work together to decipher the keys… and that, by my standards, would be a great success. Cryptography is a long-standing interest of mine and it’ll be fun to see how I can implement it into the game. I’m still working through the specifics, and this change won’t take place for some time, but that’s the long-term goal for languages. This is not set in stone – and early-game languages will be very simple to solve – but this is the model I’m currently working with. Alternatively, it is possible that for the “essential” parts of the game, i.e. the easiest segments, languages will be optional, but for all the extended/optional/challenge parts of the game they will be essential. We’ll see. It may bear some slight alteration, or for earlier areas there may be other ways to solve the languages, perhaps. We’ll see. Next week (assuming there’s no more coding progress, which I fear will be the case) I may post a bit about some other longer-term goals, particularly the plot structure of the game, as I’ve had a few people asking about that and it may be useful to take stock of what exactly that’s going to entail.

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:

Runic

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.

Rongo

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.

Hind

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:

Cune

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:

Dots

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.

Laby

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.

Two More Skill Trees

This entry will cover the Linguistics and the Rule trees. The Subversion tree has been programmed in, but I’m not yet totally happy with it (and I think it might change significantly before we reach a version where those skill will actually be used) so I’m going to leave that one out for now. The top tree of these two is Linguistics, the bottom tree is Rule.

Yellow L : Unlock one more language, from languages you know exist, that you can start learning.
Grey A : Skill at learning ancient languages.
Light grey M : Skill at learning modern languages
Blue T : Skill at translating/learning all languages
Light grey H : Skill at learning words to do with myth/history
Yellow T : Skill at learning words to with trade
Red M : Skill at learning words to do with the military
Lilac P : Skill at learning words to with politics or diplomacy
Red G : Unlock one more General your civilization can support
Grey + : Increase the speed at which policies can be changed
Yellow % : Give a 33% boost to the effect of a policy of choice (stackable)
Cyan S : Increases the strength of your rule around your capital
Light green R : Increase the radius of rule around your capital
Blue I : Increases the quantity and quality of intelligence on foreign civilizations
Green A : Improves diplomacy with nations with similar policies
Grey F : Improves diplomacy with nations with opposing policies
White W : Decreases the chance of war with opposing-policied nations
Orange W: Increases the chance of nations with similar policies assisting you in war

I’m pretty happy with how both of these look. The language tree isn’t huge, but gives you ample room to specialize according to your needs. I’ve been doing a lot of design work on how languages are going to function, and to cut a long story (and future blog entry) short, I have developed a system, in its early stages, whereby each language will be able to produce a word akin to every english word a character might want to say, and these words will be consistent! Entire dictionaries will be generated on the fly, and when needed, to handle each word – but again, there’s a future blog entry there. As for the Rule tree, it contains everything I’d like it to without removing any active gameplay from the player – you cannot, for instance, slow the rate at which cities become disinterested in your rule if you’re doing nothing for them. Let me know if you have any thoughts on these, or something to add/remove; now only the Trade tree remains, the Subversion tree needs a little improvement, and the Armour tree is going to be added to in order to make it slightly more interesting (basically by adding a forging/constructing aspect to it).

Lastly, apologies for the late blog entry – yesterday was not a good day – but next week should be back to normal. Should have a screenshot of the finished sidebar by then, and a ton of the remaining tasks for 0.2.0 finished.

On Prester John

I’ve had a few questions lately about the kind of setting the game inhabits; most people have been classifying it as ‘high fantasy’, and that’s a little away from the setting I’m going for. I thought I’d take an entry to describe the inspirations behind URR’s setting and how this’ll be reflected in the game design decisions.

A central inspiration is the myth of Prester John, or rather, the way it filtered into medieval society and how it affected perceptions of the outside world. It was the idea hatched in Europe around the twelfth century that another christian emperor called Prester John existed in some undefined region east of Europe. It served as the idea that there was somewhere another ally that Europe could count upon in its conflicts, and that some parts of the far distant world were potential allies. This location varied between central Asia and eastern Africa depending on the version of the myth. Dozens of different stories existed about him and his empire, ranging from the entirely worldly to the fantastical; an assortment of mythical creatures were believed to be exist in John’s empire, and the empire itself was thought to be in a variety of places. Even more so, people came to associate Prester John with a variety of different real-world figures, ranging from Genghis Khan to Zara Yaqob, even though they all variously denied being this mythical figure. Effectively, it was a strange amalgam of facts about battles, empires, lands, geographies, histories, all put into a single narrative that was far more desirable and reassuring than the truth, and one that was a reflection of a fundamental lack of knowledge about the rest of the world, and what creatures were and weren’t just figments of legend. Similarly, it altered which distance empires were believed to exist and in what configuration, along with their rulers, important battles, etc.

This is the kind of setting I want to cultivate; that the world is fundamentally unknown, and that each civilization has different (and probably wildly inaccurate) understandings of what the rest of the world is like. The further your starting civilization is from others, the less accurate your knowledge of the far-away civilizations will be. Similarly, you might think that a particular mythological species dwells in one area, while it actually dwells in others; I’d like to get other civilizations having the same misunderstandings about other civilizations. Equally, there may be myths about species which don’t actually exist – I intend to randomize what recruit-able species are and aren’t generated in each world, but this won’t be known until you seek them out and separate the fact from the myth. Myths about all creatures will always exist, but some creatures will be real and some creatures won’t each time. Even within existing creatures, myths may give you inaccurate information at first, as I’m intending to build an amount of randomness into each species, too.

Thus, the URR world is fundamentally medieval, except for the fact that while we never discovered all those strange creatures, the player probably will. I’ll warn everyone now that next week won’t have a blog entry; I have a lot of thesis work that needs to be done. If you’re new to the blog (I see a lot of new sites that have started registering on my incoming traffic recently), I suggest you check back previous entries or the info page for the kind of thing that comes in most blog entries and to get a better idea of what the game currently looks like. See you all in a fortnight!

What’s in a name?

The past few days have been full of coding. I’ve been working on the UI; the character creation screens; the options the player gets for world generation; the way the query  function (effectively the ‘look’ function) indexes creatures, objects and other things on any given square; further smoothing the transitions between map grid areas, adding libraries for materials and weapon types and a bunch of other improvements, fixes and developments. I’ve also been doing quite a lot of work on name generation. In some ways, this ties into my future desires for languages, but for now I just want to have names generating for the main three species (that is, humans/dwarves/elves). The two major reasons I’m putting these in early on are:

1) Firstly, I want surnames to be consistent between families, clans, etc. If I let the player type in any name they want, you won’t be able to get that consistency. On the other hand, if you can only generate a name I think people might feel their characters were a little too generic. Thus, I’ve gone for a Bioware-esque compromise; you can put in a first name for your character (no spaces) or generate one; and then you can generate a surname for your species until you’re happy with it.

2) I need to have some names generating in order to test other features – these include being able to assign ‘nicknames’ to particular creatures; being able to learn the name of another creature, so it no longer just says “The male Orc” or whatever; and it’s given me an idea of how difficult (not very) it is to produce interesting name-generation algorithms. I’m also going to make them differ a little according to gender, as they already differ depending on first name/sur-or-clan-name.

Anyway, here’s a screenshot of a quick fifty generations. The first column are dwarves, the second elves, the third humans. I’m very happy with the dwarf/elf names, but I think the human ones still need a little bit of work to look a little more… consistent?… than they currently do. Let me know what you think. Lastly, I’m not quite sure how many possible names there are for each species, but it’s in the hundreds of thousands easily. Click to enlarge!