January 2021 Update – Particle Effects

Welcome to the first King under the Mountain dev update for 2021! This month has been entirely focused on implementing a particle effect system into the game. But that might lead you to ask…

What are particle effects?

Particle effects are a graphics technique where lots of small and usually simple images or models are rendered and often animated to produce a single complex effect. Here’s an example from the official Unity tutorial (the particle effect is the pink glow and sparks):

In the above example,  a simple coloured sprite is being used lots of times for each of the particles flying off the main large effect on the kart’s wheel.  If you look closely you’ll notice they’re also decreasing in size as well as moving in an arc until they disappear entirely.  Simply put, a particle effect is created by applying several effects on lots of instances of small “particles” like this. Particle effects are used extensively in games, for explosions, spell casting visuals, impact effects, almost any visual effect you can think of is often done using particles, though in other cases techniques such as using shaders give a better result. As an aside, a shader is a program that runs on the graphics card to adjust the geometry of models/shapes, or the colour of individual pixels – sort of – which can have some incredibly powerful effects, see shadertoy.com for some good examples to play around with. The dynamic lighting and flowing water in King under the Mountain are both achieved using a shader.

Particle Effects in LibGDX

King under the Mountain is written using LibGDX, which is a game development framework, which is a bit different to a game engine – an engine is a bit more prescriptive about asset formats you have to use, how levels/maps are handled and that kind of thing, whereas LibGDX is at a lower level than an engine, giving you access to underlying graphics and audio programming interfaces (OpenGL and OpenAL) with a good amount of “helper” code on top for common game development tasks. That said there’s much, much less that you get “out of the box” for using LibGDX compared to a standard engine, for example I had to implement something as seemingly basic as multi-line text in LibGDX!

One of the utilities that LibGDX does provide is a good particle effect implementation and GUI editor for defining your own effects:

You can see some of the many parameters that can be applied to a set of particles in an effect (you can have different sets of particles each with their own “emitter”), such as the angle of emission from the starting point and the range of velocity they have. The blue-line-graphs are used to adjust these values over the life of the particle. There are more parameters which have not been used in this example such as rotation, gravity and “wind” that can be applied (all with the ability to have a different amount over different times).

When you load up the particle effect editor, it starts with an example particle effect of lots of semi-transparent red circles (up to 200) used to create a flame effect:

The first particle I decided to implement myself was a simple but important one for a game about dwarves digging into a mountainside – chipping away bits of rock while mining!

Unlike the example flame effect, this uses far less particles at once, but also makes use of rotation and gravity to give the effect of a chip flying away from a point.

But what about lighting?

In most games the above would be great and all you’d probably need to look at with particle effects in a game built using LibGDX. In the case of King under the Mountain however, things are made a bit more difficult by the dynamic lighting system. If you’ve ever looked in the data files, you’ll likely have seen that almost every sprite in the game has a matching “NORMALS” version, like with the following:

The _NORMALS file is a visual normal map (or bump map) that uses the red, green and blue colour channels to describe which direction each part of the “surface” is pointing in 3 dimensions. This information is combined with light sources – each light source is casting light from a certain point, and this is combined with the normal map to figure out how much light will be hitting any given point. At least, that’s my attempt at explaining normal mapping without getting too technical into vector maths! It’s much more commonly used in 3D games rather than 2D ones, but one of the very first things I wanted to implement in King under the Mountain was a truly dynamic lighting system so that a dwarf carrying a lantern around tunnels and halls would be suitably evocative, and help distinguish the game from its peers.

It helps to see everything combined in-game:

In the above screenshot, the top left is the game world rendered without lighting, using the sprites as they exist in the data files, also known as the diffuse sprites/layer. Top-right is the same scene but using all the _NORMALS versions of the same sprites to build a normal map of the entire scene. Note that the sack in the lower-right does not have a normals-sprite for the label on the sack, so this is not rendered in the normal map scene, meaning it will be lit the same as the layer below (the sack itself in this case). Bottom-left is the lighting information, which is made by using a shader to add an amount of light based on the normal-map version and data from point lights in the scene (a white light from the cursor in the upper left, a yellow light from the miner’s helmet in the lower right, and a small amount of global lighting so unlit areas are not pitch black). The lower-right is the combined final result that you see in-game, which is made by simply combining the two images on the left hand side.

That’s a very quick run-through of the lighting system, but I bring it up because it occurred to me that I wanted the lighting system to work with the particle effect system, at least for some particle effects that want to be “in the game world” compared to ones which should not be affected by the lighting and would be more like UI information (for example, thought bubbles above settler’s heads).

The naïve approach would be to have two sets of my rock chipping particle effect running at the same time in the same place, one with the diffuse (standard colour) rocks and one with the normal maps (even though normal maps don’t really work when rotated – this is an issue I’m going to live with for now). Unfortunately, there’s a lot of randomness in a particle effect but there’s no way to set a “seed” (an initial value used to make a random number generator give the same sequence of results multiple times – like the map seed when starting a new game) in the LibGDX particle effect library, and in fact the randomness is buried quite deep within the workings of the library so there wasn’t a simple option of just replacing all the random number generation with random number generation using a supplied seed.

Instead I had no option but to take a copy of the main part of the LibGDX particle effect codebase and modify a lot of it, I ended up making it be aware of an optional extra set of sprites for the normal maps, and any randomness would apply to both sets of particles that were created at the same time. It doesn’t seem like much but it took a lot of effort to have a particle effect which could spit out diffuse and normal-map versions of the particle in the same way at the same time!


And a little extra on top

There was just one main hurdle remaining – the particle effect shows chips or rock flying away to the right, but what if the miner is facing a wall from the left, or above, or below? But also where should the particle be positioned relative to the entity in game that is creating it (if it’s even attached to an entity at all)? The LibGDX particle editor saves and loads in its own file format, named by convention as a .p file. It would be a bad idea for me to add or make changes in this file as then I wouldn’t be able to load the .p files in the visual editor in the future, so each particle effect in King under the Mountain is defined with a type in JSON (like almost every “type” of thing in the game files) that looks like the following:

  "name": "Chipping rock",
  "particleFile": "rockparticle.p",
  "scale": 0.4,
  "usingParentOrientation": "LEFT",
  "isLooping": true,
  "isAffectedByLighting": true,
  "usesTargetMaterialAsTintColor": true,
  "distanceFromParentEntityOrientation": 0.8,
  "offsetFromParentEntity": {
    "x": 0,
    "y": 0.3
  "attachedToParent": false

The key to the direction problem is the “usingParentOrientation” property with a value of LEFT – I then added some code which readjusts some parts of the particle effect, like the initial angle of emission based on this property for use with other orientations. “attachedToParent” with a value of false means the particles won’t move (once created) when the parent entity moves – this would be true for things like speech and thought bubbles which would also have “isAffectedByLighting” as false so they appear above everything else and are not affected by the lighting system.

Putting it all together, we can now have rocks chipping away with any mining direction!


What’s Next?

All the particle effects! Or at least, a good set of effects for where the game is now, focused around different job types and crafting types. It’s always been a long-held ambition to have leaves falling from trees in autumn according to the changing colour of deciduous trees during autumn, and this finally makes that possible (or rather, fairly easy instead of some long-winded and complex way of achieving it with a different approach).  However many particle effects I come up with at this point, I’m sure there’ll be lots more that could be added to the game as it is – just looking at the animation above, when a wall block is removed it could really do with a burst of clouds of dust type of effect, things like that. I’d absolutely love for the player community to suggest more that they’d like to see – now that the particle system is in place it should be fairly straightforward to add more effects – so get involved via the Discord server.

It’s a bit of a shame that after the initially swift progress of Alpha 5 that I’ve had to spend the entire month adding this single feature, though it is quite a big one which will add a lot in the future, and was a bit of hurdle to get over but we’re there now! The intention was always that this can also be used for the “Visible job progress” item on the roadmap but there’s also lots more that could be included now or later. Hopefully, particle effects are wrapped up soon, then constructing flooring, roofing and rooms is the next step to complete Alpha 5. See you next month!

December 2020 Update – Alpha 5 initial release

Another month, another year even, and so it’s another dev update for King under the Mountain! There was another fantastic burst of progress this month culminating in the first release of Alpha 5, covering half of the items from the Alpha 5 roadmap already – so I’ll jump straight in to the new developments!

First of all there is now a (very bare-bones) embark screen (i.e. “Start new game” screen). This allows you to set a name for your settlement (or let the game randomly generate one) as well as set the seed – the number used to initialise the random generation – before starting the game proper. You can enter text into the map seed field if you like, though the game will turn it into a long number as shown. This means if you discover a map you particularly like, you can use the same seed again in the future to recreate it, or better yet, share map seeds with other players. In the future this screen will contain a lot of options to customise your starting settlers, items, even the map itself before starting a new game, but it’s nice to have even this in the meantime.

Speaking of customising settlers, you can now rename them in-game. Perhaps not too exciting by itself but it leads on to…

Twitch integration! While playing the game on Twitch, you can now connect your account using the game’s options menu, and this will reveal the options shown above to have settlers in-game automatically have names based on current Twitch viewers, with an extra option to prioritise Twitch subscribers before other viewers. While this feature has been tested and works well as far as I can tell, I don’t believe anyone has tried this feature out properly on a Twitch stream yet, so please let me know if you’re going to give it a try!

Thanks to one of the several very talented artists I’m working with, there are now new visual assets for the way floors overlap onto each other. On the left in the picture above is my old programmer art wavy-edge type of flooring overlaps, and on the right something looking much much better for different types of floors (see if you can spot how the dirt onto stone looks different, it’s subtle!). Also the grass flooring itself has had an overhaul to look better too. There’s a lot of artwork in progress and also already completed for features to be added in the not too distant future, but I’d prefer to keep the reveal of those for when the features are actually implemented properly.

So you can name your settlement now, but why does that matter? To help you identify different saved games! Above is the load game screen that’s just been added to the main menu (though I’m sure most of the time players will just hit “Continue game” to continue their current save). This means you’re not limited to a single saved game at a time anymore! Long overdue like most of the features in the pre-Steam Alpha roadmap and I’m very happy to see it added. The save files themselves have been overhauled so that they use compression, so in previous versions a save file would be 30 to 50 megabytes, now one is generally around 2 and a half megabytes!

Speaking of long-overdue Alpha features, stockpiles have been reworked (they are not quite so fixed in what they can store anymore) and stockpile management/filtering has been added. Click on a stockpile and click on the Settings button to get the view above, this lets you customise which item groups a stockpile stores, down to the level of the items under those, and you can even select the materials for those items if you wish. Since the above screenshot was taken, a priority control has also been added to stockpile management, so you can set which stockpiles should be filled first or last, or somewhere in between.

Finally there’s a few small improvements to the settler management screen following player feedback. There’s a display of number of beds at the top of the screen, clicking on (i.e. filtering to) a profession keeps the other settlers in view but greyed out, and there’s some sort options at the top to view the settlers by name or decreasing unhappiness (which was the old default).

Currently I’m working on a particle effect system – the small, short-lived visual effects you see in most games. This will (hopefully) be things like sparks flying off a blacksmith’s forge, pieces of stone chipping away when mining or crafting, water droplets splashing when filling a barrel, little visual touches like that which really start to bring the game together. As always it’ll be fully extendable / easily moddable, but it is quite a chunky feature which will take some time, so I thought it best to release an initial version of Alpha 5 before getting stuck into it – which is all of the other new additions you see above! Once that is done (and it also includes showing the progress of a job being worked on) it’s on to constructing flooring and roofing – having an area be outside or “inside” will start to become important. Especially a little later when weather is introduced which will really shake up the current gameplay! The goal is for there to be a slight punishment to things being left outside which I think should change the dynamics of building a settlement quite a bit.

Until then though, as ever, the best way to get involved is joining the King under the Mountain Discord where I’m usually on hand and always very happy to hear any feedback or issues players are experiencing. See you in 2021!

November 2020 Update – Alpha 4 Complete!

Welcome to the amazingly-ahead-of-schedule November dev update for King under the Mountain! Very good news this month in that everything on the roadmap for Alpha 4 has now been delivered, and a little extra to boot! So without further ado, here’s a run-through of what’s been changed or added.

The biggest addition is that there is now a full job prioritisation system! A new top level menu, “Priority” has been added which gives you the following new options:

Job priority menu

As you can see in the screenshot, when this menu is open the priorities are shown in-game. Previously settlers would pick whichever the nearest job to them was, in order of the professions that they had activated. Now the same still happens, but respecting the priority assigned to a job first – so all the “Highest” priority jobs will be assigned first, then “Higher” and so on. Finally you’ll be able to instruct your dwarves what it is you want completing next! As well as being able to set the priority of jobs waiting to be assigned, such as orders like mining and logging, furniture which creates jobs, like a crafting station, can also have a priority assigned which gets passed on to the jobs it creates. This goes even further in that some rooms like the kitchen and farm plot generate jobs without being specific to any furniture, so those rooms can also have a priority assigned (when interacting with the room/zone) which gets passed on to any furniture that already exists or is set to be constructed. So there’s a lot more going on than you might think! I’d love to get some feedback on the way this has been represented in-game, both from the choice of colours which I’m not very sure about, and the use of arrows to represent the priorities too. Oxygen Not Included by Klei (a fantastic game) has a similar system, but uses numbers from 1 (lowest) to 9 (highest) to represent priority. Do you think that would be better here?

There’s another equally huge (at least in terms of quality of life for the player) addition in the form of an entirely new management screen to go alongside the existing “Resources” and “Settlers” screens – crafting management!

The crafting management screen

This screen first lists each type of crafting, along with any furniture that crafting can be performed at, and the rooms that furniture can be placed into. Right now, every type of crafting is only performed at a single crafting station which is found only in a single type of room, but the game allows for more complex setups and they could be modded in right now.

Clicking on a type of crafting shows the set of different items or liquids that are produced by that crafting type. These rows allow you to set a total number of items to “maintain” in the settlement, that is, have a total number of items which may or may not be in use. This can be set as a single figure for the whole settlement or scale based on the population as shown. Items are consumed or effectively removed when they are used in furniture construction (such as tools on a workbench) so once this has happened, more will be created. Barrels and cauldrons feel like a special case because once they are placed as furniture, they no longer count as an item, though they appear identical visually, so I’m interested to see if people find this confusing and end up with more barrels and cauldrons than they expect. This row also gives you a total count of how many are currently in your settlement – a more detailed breakdown can be found in the “Resources” screen.

Clicking on one of these item or liquid product rows shows the different crafting recipes that produce the desired output. A crafting recipe is a set of input items or liquids, which get converted into a set of output items or liquids, though currently every crafting recipe only produces a single type of output, but this doesn’t have to be the case. Most crafted outputs are produced only by a single recipe, a good example of an exception are wooden planks which can be crafted out of wooden logs or mushroom logs, which are counted and tracked separately, or metal blooms which have specific crafting recipes for specific materials. Any input items which don’t use a specific type of material, allow the player to now pick a material to always use in that crafting.

There’s also a mini set of priority options for the crafted items and liquids, setting this will set the priority of which crafting recipe is selected next – recipes of the same priority are chosen from randomly, at least for all of the recipes that have their input requirements available. Each crafting station also has a new “Crafting” button to launch this screen filtered to showing everything already expanded for the crafting type it uses.

The crafting types, furniture, crafting recipes and default amounts to produce are all easily moddable, and this screen is a good representation of the mapping from the data files to how they are represented in-game.

Between the addition of crafting management and the priority system, players should now have the tools they need to manage settlements that were getting a bit too complex without them. Being able to manage and prioritise the production of beer in particular should be of great use, as the previous release probably led to an over-abundance of barrels being crafted for most players!

While those two are the main additions (and what was listed on the roadmap), that’s not all for Alpha 4! There’s even more quality of life improvements in the form of new “Cancel” and “Demolish” options in the build menu.

Build menu with new Cancel and Demolish options

The cancel option works much like its counterpart in the Orders menu – it is used to mass-cancel any queued up constructions (furniture, bridges, doors and walls). Deconstruct is used to set constructed furniture, bridges, doors and walls to be removed. No longer do you have to click on each thing individually and set it to be torn down!

Along with this work on managing constructions, the game now keeps better track of which material was specified to be used by the player in the construction. An earlier update (one that automatically resets material selection when none of that material is available) had broken this functionality, so now that improvement still works alongside the game again correctly respecting any choices by the player. In other words, set a wooden piece of furniture to be constructed with “Any” material and the game will handle it as best it can, potentially even resetting what it has selected initially, but if the player manually chooses a material to use, it will always stick to that selection.

Although there’s not much interest in modding yet, I’ve added a placeholder sprite as a fallback (literally a square with the text “placeholder” on it) which the game will now use if any sprites are unavailable for some reason. This shouldn’t happen in the base game, but when attempting to mod something, a modder can easily forget that a change in one place may mean new sprites are required. Until now the game would have rendered nothing or even crashed if these weren’t available, but now the placeholder graphic should make it clear where these are needed.

Although I’m making this game as a one-man team for the design and development side of things, it wouldn’t be possible without a bunch of very talented freelancers working on the art and music. There’s currently a lot going on in the artwork side of things, to get everything produced for King under the Mountain to press on towards the Steam Early Access release. There’s even quite a lot that has already been produced which hasn’t been revealed yet that I’m very much looking forward to sharing in future updates. This Alpha 4 release does contain one artwork improvement though – the constructed stone and wooden walls:

Old walls on the left, new on the right

These constructed walls, the stone version in particular, were actually my own programmer art of attempting to copy the Prison Architect style for how walls work (although being able to handle a thickness of more than one tile). In fact the very very first code written for King under the Mountain was figuring out these walls and how to render them, as you can see from my channel’s very first video from all the way back in 2015.

There’s a lot more to come, including overhauling quite a bit of how the environment looks in the game, so look forward to that!

Finally, in the process of writing this update a community member was having issues running the game. After a bit of investigation we figured out that the laptop used no longer had enough memory to start a new game or load an existing one. The additions are adding up! To help with this a little though, a secret feature has been added to let players modify the size of the map when starting a new game. This is done by editing the seed.txt file alongside the game launcher. Previously this was a text file with the number 0 in it only. You can change this to a different number to set the map seed for the random generation, in other words setting it to a number other than 0 will cause the game to generate the same map each time, much like seeds used for random generation in games like Minecraft. This file now contains a second line, which reads “400×300”. This corresponds to a map size of 400 tiles wide by 300 tiles tall. You can change this text, and as long as the format is the same (i.e. “XXXxYYY”) the game will use that size for the map instead. This was added to let computers without enough memory to generate the current map size still run the game with a smaller map, but you may want to try a larger map too. A word of warning – the minimap does not currently scale properly, the size of the minimap in pixels is the size of the map in tiles, so a very large map will cause the minimap to obscure the whole game. This will be improved in a future release, I just wanted to get something added quickly for the players affected to still be able to run the game. Picking the map size and random generation seed will be built into the UI properly at some point. At some point I’ll have to think about optimising the memory use, though ideally the longer I can put that off, the smoother things will be. There is a potentially fun side effect from being able to control the map size, you can now create a tiny “pocket world” as a challenge of playing the game with very limited space and resources.

A small “pocket world”

And that’s it for this month and Alpha 4! Alpha 5 should see the remaining very-clearly-missing quality of life improvements in the form of stockpile management and support for multiple saved games/settlements, and then goes on to the lay the remaining groundwork systems – a particle effect system and constructed roofs and flooring – to support the big content additions of alphas 6 through 10. Thank you to all of you sticking with the development of the game! If you haven’t done so already, you can wishlist the game on Steam at store.steampowered.com/app/930230/King_under_the_Mountain/ though if you already have access via Kickstarter or Itch.io you will be receiving a Steam key for free!

October 2020 Update – Alpha 4 Released!

Hello and welcome to the resumed King under the Mountain dev update! I’m happy to announce that the remaining pieces of work for the brewing beer update were completed, so this has formed the initial   Alpha 4 release.

In a slightly different format I thought I’d explain the process (for the player’s point of view) to making use of this new and perhaps crucial  feature.
Read more

The “Game’s Not Dead” sorry for the delay Update

Hello followers of King under the Mountain development! This is the much-needed huge apology for the radio silence for the last couple of months, it’s always been a great motivator to have the monthly dev updates out somewhat on time, but there hasn’t been anything posted from the end of June until now. Well, the main message is not to worry, development isn’t dead, I’m always going to stick to finishing this game until it’s finished, or else I wouldn’t be able to create anything afterwards!

I’d have liked to have put an actual new version release out alongside this post, but it’s been so long since the last update I figured it was better to post this first and then aim to (finally!) release the brewing beer update. Following that will be manual selection of crafting by the player (quite a big change from the current automated process! Perhaps players would prefer a mix of the two?) and then it’s on to more content on the road to Steam Early Access.

It’s not been all-stop for the last couple of months either, I’ve been working with an artist to produce a lot of the new assets that are going to be required between now and the Steam release, primarily this has been a lot of different animal species to be added to the game, including backer-specified rewards, and of course, elephants.

Still, I wanted to post this really brief update rather than put things off even longer to a proper update with more details. Perhaps I’ll finally release that brewing beer with the next monthly update? Again though, more than anything I want to apologise for the lack of communication and I’ll be doing my very best that it doesn’t happen again.


June 2020 Update

Welcome to the monthly King under the Mountain dev update! Very happy to say that development is back on track now after all the disruption from covid-19 and other sources the past few months. That said, I was expecting to have more gamedev time than I have had this past month after my day job changed to 3 days a week, turns out they can’t make do without me so I’ve been asked to work most of those extra days! Will see how that pans out.
Read more

May 2020 Update

Hello and welcome to a massively delayed King under the Mountain dev update! I am truly sorry for missing the last 2 monthly dev updates – it was a point of pride that one was always released while development has been ongoing, even if not always on time! As with most small businesses and in fact people around the world, COVID-19 has had a hugely disruptive impact which is the main reason for the radio silence for the last couple of months. While it’s not been all stop on the game development front, it has been extremely disrupted but I’m happy to say that quite the opposite is going to happen for June – due to the economic recession of the virus, my day job is changing from 5 days a week to 3 days a week, so the good news is that (for a while at least) I’ll have two working days to commit to gamedev and get the project back on track!
Read more

February 2020 Update

Welcome to a late King under the Mountain monthly dev update in what is now a grand tradition of being a bit late!

Begin the tutorial!

The main body of work achieved this month was finally adding a tutorial to the game.

Actually, what’s been added is support for a set of “hints” that can pop up when the player performs an action, such as placing a specific piece of furniture for the first time, or another event, in this case starting a new game.

The hints are very configurable – they can have multiple buttons to perform different actions, such as showing another hint (which in this case is used to actually start the tutorial from the “new game started” hint) or disabling hints entirely (which can be re-enabled from the options menu).

Rather than having a simple “dimiss” button, hints can also have a set of progress indicators, which is the primary way that the tutorial works. The game explains a mechanic or concept, which initially is placing farm plots, and tracks how many farm plots have been placed and how many tiles of farm plots have been placed. When both of these progress indicators are complete, the hint’s first (and only) action is triggered, which in the case of the tutorial is to show the subsequent tutorial prompt in a series of them.

As with almost everything in King under the Mountain, the hints are defined in simple JSON files, with the hope being that modders will look at these and expand upon them when adding new gameplay via mods. Perhaps a mod adds a new type of room or furniture which performs a special task – now a hint can be shown to the player the first time they go to place this room or furniture.

Of course, this is in addition to the tooltips that have been implemented for most items and other things in the game. King under the Mountain is now a much more user-friendly experience than it was previously! One of the design goals was to allow for deeply simulated and interesting gameplay, but in a way that is very accessible to new players to the genre. The tutorial is released today with Alpha 3.5!

EGX Rezzed

As mentioned in last month’s update, the plan is to exhibit King under the Mountain at EGX Rezzed in London from 26th March (less than 3 weeks!). Personally I’m expecting it to be cancelled following Coronavirus fears and an increasing number of cases in the UK (and the rest of the world), I can’t see an event where thousands of people are touching the same keyboards and joypads as being allowed to go ahead.

Still, if it does go ahead, I’ll be there exhibiting the game, so please drop by and say hello if you’re a reader of this dev update! You can bag some fairly exclusive King under the Mountain pin badges too:

Dwarf character badges for EGX Rezzed!


That’s all for this month. I’m hoping to have the long awaited brewing of beer implemented in time for Rezzed, I suppose we’ll find out how that went in the next monthly update!

January 2020 Update – Modding is here!

Unusually on schedule, welcome to the January 2020 development update for King under the Mountain!

Alpha 3 Release – Mod Support

At long last, the game now fully supports user-created mods to change and add to the base content pack.

In short, everything in the “mods/base” directory forms the data-driven part of the game (compared to the code that loads and uses it), so hopefully you can go and see how this works to be able to add your own additions or modifications. For (surprisingly?) the first time, I’ve recorded and narrated a video to help better explain this, which ends with me implementing a simple mod to replace the game’s default font with the OpenDyslexic font.

I was very keen to get this release out as soon as possible for those interested to be able to start trying out their own mods, and help me to discover what features are missing when it comes to modding. Although this is released as “Alpha 3”, this isn’t yet covering everything that I plan to release as part of Alpha 3 – most importantly the integration to mod.io to act as a central place for people to upload and browse mods for the game. This will be coming in the near future, but in the meantime please do join the game’s Discord server and hop into the #modding channel with any questions you may have. No doubt I’ll have an FAQ up before too long.

Community Translation Support

One of the “mods” that the game now comes with is the “Community Translations” mod. While King under the Mountain is in active development, the text in the game is constantly being added to. Until release, it would not be feasible to produce a complete translation into the main languages as they would quickly fall out of date with each new release of the game. The intention for this mod is that the translations will be kept up to date with contributions from the game’s developer and community (as in, I’ll add to it as new translation strings are added to the game, and if anyone wants to keep it up to date in a different language from time to time, that would be amazing!). You can find the Github repository here. If you’d like to contribute but don’t know how to use Git or Github, you can download the .csv files, edit them in most spreadsheet software (remembering to save back as .csv) and email it to me at ross@kingunderthemounta.in

Most of the languages have had an attempt at translation using Amazon’s translate service, so they’re probably very poor machine translations that could do with a human touch.

Following the earlier experiment with East Asian character sets, I’m very happy to say that the game does now support translation into Japanese, Chinese and Korean!

The main menu partly translated to German and Japanese


EGX Rezzed 2020

Finally I’m happy to say I’m going back to EGX Rezzed to exhibit King under the Mountain at the end of March! I previously exhibited at Rezzed 3 years ago(!) to coincide with the launch of the original Kickstarter campaign and the first public pre-alpha. The game has come on a long way since then and it’ll be great to be at an expo with more of a game than that early tech demo. If you’re going to be attending Rezzed yourself, please do come and say hi! It’s always an encouragement to hear from and meet part of the small following this game and dev update has. I plan to have the brewing and drinking of beer in the game in time for Rezzed so even if you won’t be there, I’ll be bringing forward that feature from the roadmap a little to add to the game. Also if you are attending, there’ll probably some kind of King under the Mountain-branded freebies to grab, but they are still to be confirmed at this point so tune in to next month’s update to find out more!

December 2019 Update

Welcome to the King under the Mountain monthly update! A little late (again) though I hope you’ll forgive me what with it being the Christmas holidays.

At the end of last month’s update I was all set on finally moving on to mod support, or at least initially different translations. After the update, on 19th November, Alpha 2.8 was released which introduced the new Kickstarter-backer-specified resources. This brought a reasonable amount of traffic from players old and new, including highlighting several bugs and other problems, most of which had been around a while but I hadn’t been able to recreate myself.

In the end, I spent late November and most of December rewriting the item allocations system. That is, whenever something needs to be crafted, or some furniture constructed, or a settler needs a tool, or basically for any use of an item, the game has to keep track of which items/resources are available and which are free to be used. Up to this point, each item entity had a simple pair of integer counters, one for the quantity of the item and one to say how many of that quantity are currently allocated to be in use somewhere. Say a piece of furniture requires 10 stone blocks to be created. It’ll ask for stone blocks to be assigned, and perhaps there are two piles of 6 stone blocks that are available. All of the first and 4 of the second would become “assigned”, leaving 2 of 6 stone blocks available in the second pile. Something might then go “wrong” though, the stone blocks could be being carried by a settler just as a cave-in happens overhead crushing the settler and the items, or the player might decide to cancel the construction. This should then de-allocate the items assigned to the construction, setting the allocated amount for both piles back to 0 (specifically, decrementing the first by 6 and the second by 4). In almost all situations this worked fine, but there was a very hard to track down problem where sometimes items were not de-allocated properly, leaving them stuck as allocated forever even though the original use for the allocation had since been cancelled or completed.

The above was a very tricky problem to recreate – I could never quite figure out under what circumstances this happened, and when helpful members of the community sent me save files that included occurences of the issue, it had already happened in the past and I had no information to look at to see what had led to this point, just a number saying a certain quantity of some items was allocated somewhere and I had no idea where.

I ended up biting the bullet and spending a lot of time rewriting this system, so that instead of a simple number, each item allocation is now a small group of data detailing the purpose of the allocation (such as for hauling, being used in inventory, etc.), who requested it, the intended destination and so on. I couldn’t otherwise figure out the root cause of the problem so at least changing all the item allocations over to this new system would give me enough information to look deeper into the problem and narrow down where it was coming from.

As is often the case with massive changes to a system, having to touch many parts of the codebase led me to discover and fix some existing issues (hopefully including the one that caused me to do this large piece of work in the first place), and of course, inevitably, introduce new problems 🙂 Still, I think the item allocation overhaul has been a big success and was very much worth doing, just a shame it’s delayed the implementation of the modding system for another month or so. It wasn’t just item allocations that were rewritten either, the way stockpiles manage and keep track of their contents was also overhauled, having been one of the earliest parts of the codebase and something else that wasn’t really fit for purpose any longer.

Additionally, I ended up also changing over how liquid allocations work, as that was also a bit of a hack previously. Until now, units of liquids like water and soup were also stored as integers (whole numbers). A barrel can hold 6 units, a bucket moves 2 units of liquid, and so on. This didn’t really work for drinking barrels, as I wanted a single bucket of water (2 units) brought to a barrel to suffice for many settlers to drink from. If the 2-unit bucket of water only supplied enough for 2 drinks, the settlements would spend even longer moving water around than they currently do! The original solution was that instead of removing 1 unit when a settler had a drink from a barrel, there was a random dice roll which determined if a unit of water was removed (I think it was a 15% chance). This way, a bucket of water would last several drinks, it would vary in amounts quite a bit, but overall on average it would balance out. Not a great solution but it did work.

However there was also an assignment problem with water barrels. There would be an issue if dozens of dwarves went to drink from the same barrel with only a small amount of water in (say 1 unit). The first dwarf on the scene might end up emptying the barrel, then all the others would get there, get slightly annoyed the barrel was empty, and have to go in search of another, probably all going in a big horde to the next barrel that would probably get emptied to. To avoid this, each 1 unit of water in a barrel was reserved (allocated) by a dwarf wanting to drink there, and unreserved/deallocated when they finished drinking (if they did not end up randomly using up that unit of water). Much like the item allocations, there was also a bug here that I could never quite track down, where some of these allocations would also get stuck and live forever, resulting in the water barrels eventually becoming unusable as their entire contents were incorrectly allocated (a number of people had encountered this one).

So as well as the item allocation overhaul, I finally did the obvious thing and move liquids to using floating point (decimal) numbers for their quantities and allocations. Now a settler reserves 0.15 units of a barrel, and always removes 0.15 units when drinking. A bucket still brings 2.0 units of water to the barrel so each bucket provides enough for 13 and a bit drinks. There’s still a lot of legwork for the dwarves to do to get drinks available in water barrels, but do not fear, water pipes and pumps are coming in the future to automate this!

In the same way that overhauling item allocations seemed to fix the problem I was looking for, I believe the new liquid allocations (which get tracked with more info in the same way as item allocations now do) do not have the problem I was looking to solve anymore. Good news!

Helpful members of the community (especially SirRockstar who’s been a fantastic help with detailing problems) have been sending me details and savegames for issues in the current versions so there’s also been quite a lot of bugfixing going on. A nice one to finally figure out was that bridges didn’t always get constructed (I think it depended which side they were “dragged” from by the player) so that’s now sorted, and a major quality of life improvement in that constructions now use the nearest available resources rather than what was effectively any (random) available resources.

Sorry it’s been a very plain, media-free update this time around. I said it last time but now I will be going on to the first part of modding with language support so look out for that! There’s also some semi-exciting news to share but I’ll leave it until next month when I have more details nailed down, so see you then!