Name Implementation, Animals, Plants, Sentence Generation, and Bug Hunt

This week has seen the implementation of name generation into the main game file, to rather fantastic results, alongside a substantial amount of bug-fixing. For name generation, the names now consider all the relevant religious/cultural/geographical background of the nation they hail from, and generate appropriately. The game also tracks the various different structures of the names – some name types have just one name, some have two, some have several with a mini-title in the middle, and so forth – and can always produce a “casual” version (i.e. “Mark” to “Mark Johnson” or whatever) as well as accurately reproducing a name when needed, without looking for name-segments where they don’t exist, or failing to look for a name segment relevant to a certain name archetype.

I have to say, I am *so* happy with how these look! They’re all very different, some speak to particular locations or cultural ideas, whilst others don’t, but they are all distinguishable. I’m still doing a little bit more work on these, but only a couple of hours’ work remains, and then in 0.8 everyone who you speak to will have their name highlighted. So, here is a rather splendid set of examples from a whole bunch of cultures in some playtesting world generations! Hope you like black-and-white images…

Names1 Names2 Names3 Names4 Names5 Names6 Names7 Names8 Names9 Names10 Names11 Names12

Names13 Names14 Names15

In the process I also had to develop the very start of the system for generating sets of animals and plants within particular climate zones. Plants were already present but were distributed across all biomes of a certain type (so northern tundra and southern tundra areas would have the same plants, somehow), and also tended to be colour-matched to their biome, which made a degree of sense but definitely reduced the kind of background/aesthetic interest they could potentially generate. Plants were therefore redone, and their naming conventions were also altered somewhat to reflect these changes (all of which come before visual generation at some later date when I have a spare couple of days). Animal generation has now appeared for the first time, and just like plants, they are tethered to a certain area of a certain biome – so the game finds a tile of desert, looks to see how far contiguous desert extends, and then all that desert has the same group of species. The species elsewhere, by contrast, will be completely different, even if they are also desert. Like plants, I’ll generate the images for these at some far-later date (since this isn’t exactly gameplay-essential stuff, just general background worldbuilding), but the names will be used in this release, as they serve to inform the name generation for individuals in certain nations, and they’ll also show up in artworks and literature and metaphors and the like later on. I also thought quite a bit about which animals I can realistically vary in appearance and name, so a few common animals aren’t in here because I couldn’t think of how to vary them well enough, whilst a couple of more obscure animals are present precisely because they vary a lot. Here are some animal/plant printouts, with their biome attached:

Oceanroutes

And then two massive printouts of all the plants/animals generated across a world, so you can get a full idea of the generation systems for these:

Oceanroutes

Oceanroutes

As for the bugs, I’ve reached the point where only two things remain for 0.8: sentence generation, and bugfixes. Sentence generation is such an intellectually complex task – although once I have a suitably complicated but usable and modifiable programming framework in place, I’m confident it will actually move quite quickly – that I need to spend a lot of time simply planning it out before I actually start coding it in. In this vein I’ve been scribbling ideas all over paper for the last week, and although it is taking a while, I am zeroing in on a workable method. Much like most things in URR, it will wind up being a balance between some structures and templates, entirely procedural elements, and then a range of variation within these aspcets based on the speaker producing the sentence – a soon-to-be-gigantic function called make_sentence has now been constructed, and so the only remaining task is to actually write the thing (ha!). As a result of this week’s focus on planning, however, on the actual coding front I’ve been working instead on bug fixing, in order to ensure that 0.8 is actually stable once I release it (hopefully at the end of July/start of August). Some of these were found from my own playtesting adventures, but a large number were submitted by the playtesting team I recruited a few months ago (thanks again, all of you!) and with these all fixed, I do actually feel fairly confident that every part of 0.8 (aside from speech/dialects/etc) is finished, bug-free, and ready to release. I can’t rule out the possibility that there are NPC-related problems I simply haven’t anticipated yet, but I haven’t run into any in quite some time, and everyone basically seems to behave correctly (though I’m going to have to revisit  NPCs in 0.9, of course, to implement the NPC classes that aren’t being included in the upcoming 0.8). Here’s a run-down:

  • Fortress guards no longer sometimes fail to move when they should exchange schedules with another guard.
  • Fortress merchants always appear correctly even if the player enters the grid part-way through their move from their home to their stall.
  • Fortress merchants are always assigned to the correct open-air stalls.
  • There cannot be two open-air stalls of the same sort within a single fortress, nor too many merchants for them to all be assigned a stall.
  • Slaves and servants in upper-class districts absolutely, definitely, without a doubt, always sleep in the correct places on the correct floors no matter how and when the player spawns the mansion and what other movements the player takes.
  • Drawbridge chains do, actually, appear, when the player looks at them.
  • Looking at certain doors in torture chambers or dungeons no longer causes the game to crash.
  • Looking at a small number of bars in torture chambers or dungeons no longer results in a black screen instead of the appropriate generated image.
  • NPCs are always the correct inverted colour when they pass under trees or a gate.
  • Handled some weirdness with players stepping through gates and sometimes winding up on the tile next to the gate, and sometimes winding up one gate further away.
  • Fixed an issue where you could read sections of the encyclopedia that should have been disabled.
  • Fixed an entirely aesthetic issue with some potential colour patterns on couches.
  • Resolved strange issue with a small subset of square-based castle generation outcomes that would position guard towers in the wrong orientation.

See you all next week for what might be quite a technical post about sentence generation!

First look at City Districts

Although I planned to spend this week finishing off graveyards and beginning work on settlements, I found myself working on cities instead. For starters I’ve now got it generating city walls both on the exterior of the city, and between districts, and connecting these logically with roads and rivers outside the city (rivers inside the city may have bridges going over them). Exterior gates are now present which you can pass through to gain access to the district of the city they connect to. One this system was in place, I’ve started with generating the actual districts themselves, and decided to begin with the lower-class housing districts, partly because these were the most similar to slums so I could use some of what I’d learned there, and also because a smaller percentage of the buildings there are going to be special/unique, so it seemed the easiest start.

Below is a screenshot of the player wandering around a lower-class housing district, having just come through a gate from another district (the large white door below the player). You can see a number of connected buildings, each with a single locked door. I have to say, just walking around these city districts is incredibly exciting. Even though there are no NPCs wandering around yet and you can’t get into buildings, it feels very dense and very like you’re wandering around a game now, rather than a world where a game is being developed. As part of this I’m also carrying out a major overhaul of how saving and loading works – to prevent larger file sizes causing slower load times – and, in turn, of how doors and interiors work. The new system is almost so laughably simple I’m ashamed I didn’t create it a year or so ago, but there you go. This will allow interiors to be made and handled on the fly, so that these interiors don’t have to be made until you actually need them, and will create a far superior database structure for the future. It’s not exciting work, but this kind of optimizing I try to do each release goes a long way to preparing the game for the future. If I still had the data structure now I had two years ago the game would have slowed to a halt, and this big change is another step along that same path. Anyway, here’s the district as seen in-game…

TerrainTest

… and here is a debug screenshot of how the map looked after I’d explored roughly a quarter of this one district (click to view full, I think it is worth it):

145x90_Ex

I’m still working on the exact mechanics for moving between districts, but as mentioned in previous entries each district will be distinct. Some might spread over two or even three map grids, in which case you can move between them without going through a gate, but otherwise you need to find yourself a gate (on the edges in each grid) and pass through them. In later versions some may be guarded, or locked under certain conditions, and I hope to have the regions of the city you have access to partially determined by your relationship with different factions in that city.

The next picture shows a quick floodfill on all the tiles of the map that are not wall or buildings. As you can see we get some central alleys where the main roads are, and then a fairly complex web of pathways outside from them. Do note there is a difference here from the slums I showed a few weeks ago – the paths here are straighter and longer, and rather more regular, whilst the buildings are generally a little larger and there are generally two tiles of gap between buildings rather than just one. Also the map below does not show any special buildings that may spawn in lower-class housing districts – such as black markets, prisons, slave quarters (if the civilization is a slaving one), asylums, and other goodness. I’ve been composing quite a list of special buildings for each district that can integrate well into the dense world lore the game generates (and that serves as your basis for exploration and sidequests), and these are some examples of the special buildings that will appear in these districts.

RoadmapNext week… I have no idea. Probably more city districts, though it’s not impossible I’ll be doing some work on settlements or finishing off graveyards instead by then (the system for connecting graves to histories is working, but needs tweaking to ensure all histories are “caught” by the system). Equally, I might be doing a lot of under-the-hood work this week to implement that new saving/loading system, which is one of those coding tasks that should be relatively simple but will probably take a fair bit of time to complete. Or something else! I’m reaching the point in the release where the number of aspects I have ongoing are spiraling outwards, which will be the case for the next month or so before I start to bring all the strands back in. See you next week!

 

Size and roguelikes

Just a quick entry this week. I’ve been coding every day this week (apart from one where Dead Space 2 interposed itself) and a ton of work has been done, including more combat mechanics, severing limbs, armor and weapons being tethered to limbs correctly, displaying all possible combat messages, creature queries displaying more injury detail, species pages on creature queries, pathfinding, and starting a new ‘class’ of enemy.

This class is for enemies that are larger than just a single square. Originally I was intending to stick with the roguelike norm – any creature, whether a Titan or a gnat, takes up just one square on the map. Increasingly, however, I thought this was a terrible idea, so I’ve decided to allow some creatures to be larger. Some creatures can be two squares (e.g. ‘Q’ is the symbol for large quadrupeds, so an elephant may be ‘QQ’), some creatures can be four squares, some nine, one creature can be a long sequence of letters (which will be unveiled far, far in the future) while another species is totally unique (and equally far off). The only one of these to make it into the first alpha will be dragons, and so I leave you with a screenshot of a dragon attempting to fry me. The fire is in its early stages and needs a lot more work; as for four-square-creature pathfinding, large creatures normally have the ability to knock aside trees, and may (depending on strength and other factors) be able to break through walls and similar.

The benefits of invincibility

Today’s blog entry is a pair of screenshots, which show you a ton of what I’ve been working on this past week of nothing-but-coding. This is when I looked at myself in the middle of combat with two enemies (both off-screen to the left), and what kind of information shows up when you do. Until next week, I leave you with some violence I have only survived because the player character is currently (for testing reasons) invincible. Basically, this screenshot should showcase the query function – listing creatures and objects on a square – what querying a creature looks like, and a few recent changes to the UI. There’s also been a ton of work in creating libraries of weapons/materials, the mechanics of wielding weapons/wearing armor and lots of other stuff, but I’ll talk about that next week. I know it needs a bit of fine-tuning, but basically, things are really coming along now. Until next week!

And also a less exciting technical one dealing with equipping weapons, inventory management, etc:

The Secret Lives of Creatures

With a lot of academic work done the past fortnight, blog entries should returned to their regular schedule from here on. Additionally I’ve noted what people said about interest in hearing about the coding side of the game design – at some point (possibly next week) I’m going to produce a long entry with the details of the world generation system along with the options/variables you can alter in the world gen screen. For now, however, covering all the changes to creatures raises the next question – where exactly are they?

The map key has been redone, and offers the best demonstration of this. Intelligent creatures are located in settlements of a type unique to their species. Each letter for each settlement relates to the creature – ‘C’ for Cyclopes, ‘F’ for Fiends, ‘l’ for Lizardmen, ‘M’ for Minotaurs, ‘N’ for Nagas, ‘O’ for Ogres, ‘o’ for Orcs and ‘U’ for the Undead. Hence:

I don’t know how many of these will be programmed in for the first alpha. Cyclops Homesteads will definitely exist; they have already received a fair bit of work. I may also add in a few of the more unusual ones, but leave them devoid of creatures for now – you may be able to stumble onto labyrinths and necropoles but they won’t be occupied just yet. Well… maybe you’ll be able to find one Minotaur or so. Screenshots of these locations will come at a later date once I’ve done more work on them (creating and improving creature handling is currently taking up most of my coding time).

Additionally, I’d like to have some Shrines in the initial alpha (though, again, currently deactivated). The generation of deities is going to be semi-random; there’s a set list of potential god names and what they are worshiped by/what they represent, but the rituals/shrines associated with each one, and their particular personalities, will be generated anew each time. Additionally, only a selection of the potential gods will exist in any game. Nevertheless, shrines should vary significantly and there will be a few in the initial alpha, along with a few ruins too. Both of these may be infested with wild creatures, of course, so consider that a warning.

In the mean time, I’ve been working on how intelligent creature settlements fit into empires, territories, etc. As monsters do not group into full civilizations, their settlements are comparatively uncertain/short-lived things that won’t have anywhere near as much history behind them as any humanoid civilizations. Humanoid civilizations are generally unwilling to consider monsters as part of the empire, but will employ them as mercenaries and the like; therefore monster settlements either appear on the edge of a civilization and (rarely) are considered part of it; or, more often, they will be just outside a civilization’s territory. Some, of course – like Fiends and the Undead – will never, ever be part of a civilization.

Probably.