Coats of Arms Part II

I’m afraid this week’s update is only a short one, though in keeping with my 2014 goal of weekly blog updates I decided to post this one anyway. I’ve been mostly busy this week with finishing the first draft of my thesis (now a mere 30k words and editing remaining before the end of February) but have been working on some of the coats of arms which aren’t made of a single large icon, but might put together a number of smaller ones. Here are two examples of the four-icon variation, which are either separated by a cross down the middle, or into four corners of different colours. There is currently a database of thirty different small icons (eight of which you see below), and once I started assigning coats of arms to families it will be impossible for the same icon to be used multiple times in the same playthrough. I’d like to finish up with a database of maybe fifty or so small icons.

Two Corners

Also, as you can see I’ve now added a banner for house mottos! For houses with a shield that has a single large icon (like the ones we saw last week) there will be a number of preset ones that are occasionally used, but generally all coats of arms will generate mottos anew. I’m not sure if I’ll be working on mottos next or on coats of arms that have icons that take up half the shield – like the top half, or the left half, or similar – but either way next week’s blog update will probably be more on coats of arms. I anticipate either a week or two until all the graphics and mottos for these are generated, so one or two more blog entries, then I’ll be moving onto generating family trees and traits for families, and then assigning the player one at the start of the game based on what civ they decide to start in. Stay tuned…

Coats of Arms Part I

Feudal civilizations will consist of (currently) between three and four noble houses/families. At the start of the game you’ll be assigned to one of these families, though not the ruling one (and there will be different rules for theocracies). I’m currently working on generating the coats of arms for these houses, which consist of two or three parts. Firstly there’s the escutcheon in the middle, which is the shield that might have a particular design on it consisting of a single large figure or a number of smaller ones; secondly there are two “supporters”, generally animals, on either side of the shield which will be the next thing to work on; and thirdly there’s a motto down below. I’m not yet certain about whether I’ll be generating supporters – I am considering the ease of looking up families in the in-game encyclopedia, and adding supporters means the icon of the family will take up a lot more room than it currently does (though I think a motto is essential!). I’ve thus far been doing the central component, the shield and the symbol(s) or sigil(s) displayed upon it. I want these to be unique, immediately identifiable, and appropriate to be used on actual physical shields later in the game. If you fight someone and look at their shield you should know what house they belong to (or what house they stole a shield from!). I first set about generating the patterns on the escutcheons with a variety of different colours. Here’s a selection of what the game can produce:

Shields Small

With that done, I then came to the question of the designs. There are several possibilities for what designs will be assigned to the shield; the most common will be a single large figure that takes up most of the shield. Whilst I am aware this is actually relatively rare in real-world heraldry, it is (obviously) easier to draw a single large figure to a solid level of detail than several small ones. There will be some shields which use a number of other designs – for example, a shield where two horizontal designs are laid one above the other, or two vertical designs side-by-side, or a number of smaller, quarter-sized designs. I’ve currently drawn up sixty-four full-size designs; maybe half of these will be generated each game – based on the number of feudal civilizations and the existence of other two- or three- or four-part shields – and, given that you’ll have to explore and survive in the world to find them, it’ll be a while until anyone has seen them all (not to mention the fact I’ll probably add more to the database as time goes by). I don’t want to show off all the sigils up front, but here’s a selection of six with randomly generated colour palettes:

Six Shields Big

I’m currently working on what in-game role families are going to play. I suspect they are going to be similar to religions – they are more to do with allies and associations than with bonuses and buffs, like civilization policies. URR won’t be a “you start as a random peasant” game, as you’ll be starting as part of a noble house/family – there are various reasons for this, one of which is plot-based (and will become clear later) and it is easier to start the game as a character which can reasonably be assumed to be literate and educated. Lastly, I’ve taken to updating the development plan page both with plans further afield than the immediate release I’m working on and the one or two after that, and also checking off when certain objectives have been completed by striking through them. Let me if you have any thoughts on the sigils, everything else in this entry or the future plans now up on the development plan page, and I’ll see you all next week.

Choosing a Homeland

I think Dungeon Crawl’s religions are great. Each god offers you a totally different style of play, and – with only a couple of exceptions – few of them are directly there to “help you kill things”. Most give you tangential benefits which are down to the player to use intelligently. Whilst the directly combat-aiding gods are certainly the easiest gods, I’ve often enjoyed trying some of the more unusual gods and trying to integrate them into the way I play. In URR, there are going to be two factors that affect how the game plays from the start, which are roughly akin to species and god in Crawl. The species-equivalent I won’t be talking about for a while, but the god equivalent is what civilization you choose to belong to.

When the game starts you are prompted to select a civilization. You can only choose a feudal civilization to begin with, though you will be able to change civilization as much as you please in later versions of the game, including to nomadic or hunter-gatherer civilizations, though there will be penalties associated with this for abandoning your old civ. On this screen you’ll see the flag, religious affiliation (if any), capital city, name of ruling individual/family/party, and the national policies that civilization adheres to. Each civilization has eight different policy categories – foreign, military, leadership, trade, intellectual, religious, cultural, and judicial. Each of those eight categories has at least five different policies, all with their own icons like the ones in this screenshot, though some categories have more. I don’t currently intend to publish a full list of policies and their effects, though as you can see some of the policies haven’t yet had their effects assigned. Some policies have just “abstract” effects – like Str + 4, say – whilst others have direct effects. A civilization with the “theocracy” leadership policy, for example, isn’t going to have a separate building for a palace and a religious hub, as the two will be the same. A civilization with the “penitentiary” judicial choice will have prisons, whilst one without that will not, and so forth.

Preview

Thus, the “gods” in URR are the civilizations, and each is randomly generated. Although there is a small non-random element – civilizations cannot have conflicting policies such as “Theocracy” and “Religious Freedom”, or “Pacifism” and “Imperialism” – there’s over a quarter of a million permutations for the policy selections you’ll start with. My hope is that as the game progresses, choosing your civilization will actually push the player towards play strategies they might not ordinarily consider. You might be a player who prefers to have few allies and use heavy weapons, but if you saw a civilization which granted significant bonuses to allies and short weapons, you might be more inclined to try that model for once. As much as I think the Crawl gods are a good template, there is little impetus to go out of one’s comfort zone until one is very comfortable with the game. I’ve won Crawl half a dozen times and I’ve only recently started properly exploring some of the less straightforward gods. I think the random generation of policies helps to counter that – you have to take one of the selection you’re given, and some of the combinations may yield interesting gameplay possibilities I haven’t yet planned out. As I say, some of the policies are still being worked out, and there may be more in later releases. Next week we might have a non-URR post as some of the aspects I’m currently working on – religions, coats of arms and family trees – are probably going to take over another week to get to a state where I can show them off. Until then, enjoy the policy icons, and we’ll be back a week from today with something new.

Cities, Roads and Towns

I’ve been working on adding cities, roads and towns to the world map. They’re generated in that order – each feudal civilization is given a capital city, and then everything goes from there. Cities start off as a small 2×2 structure. As time goes by, cities can expand in any direction, up to a maximum of a 5×5 size. A city reaching that full size is very rare – most cities don’t end up being twenty-five tiles in size and generally end up between fifteen and twenty. I tried a lot of different character sets for depicting cities, but in general I ended up showing them in the way displayed below. In the future each tile will be a distinct district, such as “administrative”, “market”, “military”, “medical” and so forth, but those aspects are still in the planning stages. The bigger the city, therefore, the more districts and the more services. Some district types might be particularly rare compared to others.

Meanwhile, once the cities have been placed on the map the game then adds a series of roads. I expected this to be quite simple, but as it turned out making a network of roads which wasn’t too dense, wasn’t too sparse, looked organic and found their own way around the map in an intelligent way was surprisingly tricky. Firstly, I didn’t want diagonal roads. Roads had to move orthogonally – the logic behind this was simply that I couldn’t find any ANSI/extended character that could accurately depict the shift from horizontal or vertical roads to diagonal ones. So, that meant that the pathfinding algorithm had to work only by moving in orthogonal directions. However, this was not without problem. For those who know how A* works, if you disable any diagonal directions it will still basically split the path into “diagonal” bits – even if those are just done by going up-left-up-left-up-left, rather than diagonally – and then long stretches of horizontal or vertical bits. What this meant was that any time roads were trying to path to a distant point, all the roads would line up (as we see below) and funnel themselves towards their target. Needless to say, this looks like crap.

Situation1

My initial solution was to try having the path sometimes divert from the optimal route. Say, each four “steps” there is a possibility for the path to divert one tile in a direction perpendicular to the route of travel. However, having tried this, it rapidly produced its own set of problems. What if the road decides to divert at a crucial point, and then cannot actually rejoin the initial route? Say, if it diverts on the tile before a coastline, and then cannot path back to where it needs to be, what would happen to that road? The solution to this would be to have the game check every time it wants to divert and make sure it can safely get back onto the right route, but then you’d just have roads which basically bounced up and down on a straight line, which – having tested it – also looked like crap. In the end the solution was pretty obvious, but I think reasonably elegant and simple. Once the world map is created, the game goes through the map and picks a certain selection of tiles – very few, and in a regular (though hard to spot if you don’t know it) pattern – that prevents any horizontal or vertical line from continuing for more than nine tiles at the max. A trivial solution, and once it tried to pathfind on this new, hidden map – also excluding mountains and deserts, which will in the future have their own methods of travelling across – you get something like this. The routes are still fairly optimal, but look organic and realistic:

Sit4

Situation2

Situ3

Once the road system is added to the map, the game then starts to work on placing towns. Whilst roads are being placed the game makes a note of each road – once they’re done, it then goes through each road in turn and measures how long it is. The longer it is, the more towns will be placed. In general each road will only have a single town, but roads above 50 or 60 tiles have a good shot of generating with two towns. This is obviously subject to change – I have on idea yet whether this will be too many towns, too few, or roughly enough. I should add towns and roads will not generate on the human scale for the next release; they will only be shown on the world map for now. However, if you check the development plan, 0.6 will see some of these areas actually starting to generate for you to walk around. As for mountains and deserts, the current intention is for “mountain passes” to generate which require navigation in a special way (still working on the specifics) whilst deserts have no roads or obvious means of travel. I currently plan for the player to be able to either navigate across them on their own – whilst taking the risk of running into a travelling nomadic civilization – or to make contact with a nomadic caravan who may take you safely across the desert. Again, this is for now squarely in the “future mechanics” category, but those are my initial thoughts. I’m also currently working on having the game add in other appropriate settlements (e.g. towns which aren’t on main roads, mines atop resources, farms, etc) and connecting them intelligently to the main road system, and we’ll have some more 0.5 world maps in a few weeks. Next time I’ll talk about generating the names for cities for all types of civilizations (hunter-gatherer settlements, feudal cities and nomadic encampments have very different names) and for the various religions the game is generating.

0.5 Flags

The time has finally come to work on 0.5. As much as I enjoyed working on 0.4, this is the release I’ve been really looking forward to, and the one where imagination can really go wild in terms of flags, histories, civilizations, rulers, wars, and all the detail that goes with them. Why was one king known as “The Red?” Why was another civilization persuaded to go war with its oldest and closest ally? Who first began to worship Muulnaroth? Who founded the Cult of Sand? This is the kind of stuff a fully-developed and fleshed-out “epic” world should contain, and it’s great to be able to work on it now and put some serious time into the social, rather than natural, side of the in-game world-building.

The first stage of this has come in the form of flags. Currently there is only form of flag viable in the world, which you’ll have seen in the current release. They are all modeled – though some are a little more exotic than others – on real-world flags, predominantly European ones, though some resemble eastern/central Asian flags too. I thought about having some flags akin to many modern African flags – with distinct items and the like emblazoned on them – but the resolution of the flags prevented that. However, this was a blessing in disguise, since it lets me use more “symbolic” flags in other situations.

Civilizations are now being split into three categories with significant gameplay variation between the three. I’ll talk more about this in a later entry, but the three categories are “Feudal“, “Nomadic“, and “Hunter-Gatherer“. Nomadic societies will be generated in deserts and upon plateaus and plains; hunter-gatherer societies will be generated in tundra regions, and possibly in tropics too; feudal societies will generate everywhere else. All societies will avoid colonizing polar regions, whilst feudal societies will be reluctant to attempt too much conquest in deserts, jungles or tundra, though they will if pressed, and will certainly be willing to start up trade links. Equally, certain rulers who are particularly keen on imperialism may seek to conquer these not for any pragmatic or practical gain – territory, resources, whatever – but simply because they are there. Our own history is replete with wars fought for such foolish and quintessentially human reasons, and it seems like this is something that should be reflected.

So, I decided to revisit the symbolic idea. It wouldn’t really make any sense for nomadic or hunter-gatherer societies to have the same kinds of flags as their more stationary castle-building cousins, so they needed a different type of flag. I did a lot of research into the flags of various non-European societies from the past, or the symbols, sigils or whatever other terms were used, and eventually decided on two different aesthetic styles.

For the nomadic flags I decided on two components – a border and a symbol. The borders pick from a variety of ten, all of which are basically either a single line or a pair of lines, but that vary a little in size and shape. For the symbols I decided I wanted to focus on ones that were either dramatic, military, or more generally “symbolic”. A very different kind of symbol is used for the hunter-gatherer societies, as you’ll see below, but for these I wanted a particular kind of look. These are generally more militaristic societies than the hunter-gatherer ones, more concerned by trade and “statesmanship”, but that need to put forward a strong external image. Many of the symbols fit this bill – maybe a hand, or a fist, or a fire, or a sun, or some swords or other weapons, or an anvil, and the like. Many of the nomadic societies we (in the west) are most familiar with are those from central Asia. Much of my inspiration for these flags came from both contemporary and older flags from central Asia and the eastern-most parts of Europe and seeing the kinds of symbols they would place upon flags. Some – like sickles – were just damned impossible to actually depict within the limitations, but most of the others along with a large number I also came up with myself came out very nicely. Whilst implementing such symbols into full flags in a small version would have been near impossible without an entire database of custom tiles and symbols for it, when the basis of the flag is a symbol which takes up the majority of the square, I think they work quite nicely.

The hunter-gatherer flags, on the other hand, I wanted to be simpler and to contain symbols directly relevant to nature or survival – the kinds of symbols one might imagine a “clan” adopting, but not perhaps a “nation” – and to only have two colours, the foreground and the background. The symbols in this case fall into two categories – the majority of the symbols are animals, though a few represent more abstract things like a field of stars, or a human, or a simple building. There are currently twenty-eight designs of each type – given that each world is unlikely to have more than half a dozen nomadic or hunter-gatherer civilizations generated, it’ll be a while until any player has seen the full selection (especially if/when I add more to the database). There’s also variation in the colour scheme used by either type of flag. Feudal flags select either a pair or a trio of colours from a large set (as long as that trio has not already been used); nomadic flags select one from ten different presets of colours that look suitable together; hunter-gatherer flags have a selection of dark colours to choose from, three very pale colours (which are basically variations on “white”), and then 50% are inverted so some have light backgrounds and some have dark.

Flags05

Hopefully the variation will do several things. Firstly, and most obviously, it should just contribute to a more varied and more believable world. Not all civilizations in history have flags (or symbols, sigils, whatever) akin to those of Europe, and this should help in that regard. Secondly it will mean you can immediately identify the type of civilization you’ve encountered from its flag, even if you know nothing else about it. Seeing someone with a shield marked by a particular symbol, or catching a glimpse of part of an army travelling with a banner will be able to give you at least some information about their civilization, and – given that different types of civilization are restricted to different biomes – have some idea of where that civilization might hail from. Thirdly it’s just another aspect of civilizations that differ according to their basic phenotype (though more on this in another entry) and reinforce the differences between the different sorts. Next week I’ll likely be talking about the early stages of city, road and town generation, and showing off some snazzy new screenshots of how the world map for 0.5 is currently looking.