• Register

King under the Mountain is a simulation-based strategy/management game where you design, build and run a settlement in a fantasy world. Then, once you're up and running, you can send out groups of adventurers to explore and loot other players' creations, playing out through turn-based tactical combat. You start a game on a randomly-generated area map with a few settlers, tools and other provisions, and slowly grow into a self-sustaining village, town, or eventually, a city. You play as one of several fantasy races each with their own unique gameplay mechanics.

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Post article RSS Articles

August 2019 Update

News

Welcome to the (late) August update for King under the Mountain! Apologies for the lateness of this, August was a crazily busy month personally, but I thought it still worth putting out a delayed dev update rather than nothing at all until the end of September.

The good news is that tooltips for nearly everything in the game have now all been implemented (thousands of words in total!) and there's a new alpha build (Alpha 2.6) available on the Itch.io page for all current and future owners to get hold of with these tooltips in. As well as providing some super useful information to the player (especially to explain what a pillar actually does), this is also the start of background lore in the world of King under the Mountain with references to the magic system and the world at large.

Now that there's larger sections of text in the game, it really started to highlight the issues with the font currently in use. King under the Mountain is built using LibGDX, a gamedev application framework that works as a fairly high level API over graphics (OpenGL) and sound (OpenAL) and other things such as input devices, but it is not a full game engine like Unity or Unreal. Instead, for example, it gives you commands to load images from a file as a texture, or draw those textures to the screen, or play a sound from an audio file. Everything on top of that is written by game developers so you don't see as much similarity as you do with some games using Unity - not that that's a good or bad thing! Slay the Spire is an amazing game also written in LibGDX, and it plays very differently to King under the Mountain! When it comes to text drawn on screen, LibGDX works with glyphs in a sprite sheet that it then renders to the screen, in exactly the same way other images are drawn to the screen from spritesheets. If you don't supply your own font image, you get the LibGDX default which is Arial in 15 point and looks like this:

libgdx default font arial 15


Early on I decided I didn't want the absolute default to at least differentiate the game from other basic LibGDX projects, so I decided to use Google's Roboto font, mostly because it's designed to be clear and readable, but more importantly that it was also released under a permissive license - most fonts have restrictions around their licensing.

However, armed with the Roboto font file, it needed turning into a spritesheet of glyphs similar to the above. One of the several tools LibGDX provides is a tool called Hiero which performs this task. Running that with the Roboto font file produces the following (actually done for several different font sizes):

roboto sprite sheet


Note the greatly expanded set of characters to the above, this is to include cyrllic characters to support languages such as Russian.

That was all fine for a while, but it became apparent that the spacing around some letters (the "kerning") was a bit off, leading to weird gaps in some blocks of text as you can see here:

old font example

It's subtle, but the letter "e" tends to not have enough space around it, while the "a" has too much space in most cases. This has really bothered me for a long time and makes the game feel lower quality in my opinion. I put this down to a quirk of either the Heiro tool and/or the Roboto font and decided I'd replace it at some point in the future, because there was another problem I wanted to tackle...

Creating a spritesheet of glyphs is fine for the number of characters shown above, but as someone who knows a little Japanese, I really wanted to be able to include the main East Asian languages - Japanese, Korean and Chinese. The Korean language with only 24 characters in Hangul would be fine to add, but Chinese with potentially thousands of characters, and Japanese also using these alongside hiragana and katakana would potentially be too much to include depending on the size of the font and the max texture size allowed on any given graphics card. As an aside, games in 2019 and onwards can probably safely rely on a max texture size of 4096px in both dimensions or even 8192px, depending on how old the hardware that a game wants to support is, so this may be a non-issue by the time of release.

This problem of supporting East Asian languages in LibGDX is often discussed with several possible solutions. Most rely on the fact that there is an extension to LibGDX (gdx-freetype) that generates font bitmaps on the fly from font files, rather than the developer providing a pre-generated bitmap image like the above. From there you can either just generate the snippets of text that you need at any given time, or perhaps generate a spritesheet with all the characters your game is ever going to use but crucially not the entire set of Chinese characters that exist.

While I was improving the tooltips from what you can see in last month's video (for example, improving the way they break over multiple lines and tidying up whitespace around them), I thought it was a good time to finally try to improve the game's font too, now that there were larger sections of text which was really highlighting the kerning problem. Coupled with the desire to get East Asian fonts working, I switched from Google's Roboto font to Google's Noto font family as the latter aims to cover all unicode characters. Having added quite a large body of text to the game's translation files, I figured I could calculate all the unique characters across every language and generate a font bitmap from these using the gdx-freetype extension to get closer to using the actual font rather than the pre-generated bitmap from Hiero.

In something of a happy accident, this led to a much clearer looking font with massively improved kerning:

new font example

Look how smooth the kerning and font itself is in "dwarven woodcutter" now! The light blue also denotes that you can hover over it for a tooltip, actually separate tooltips for "dwarven" and "woodcutter".

It doesn't look like much has changed in the UI but adding tooltips was actually a massive change to the way all text is handled in the game, and the main reason this took so long to get done alongside the large amount of words that needed adding. Instead of simple strings of characters, every section of text is now broken into sections which can have their own independent tooltips, which is what we see here for the dwarf's description text. Those tooltips themselves draw more of this text which can have further tooltips, and so on from there. It also handles and inserts line breaks which is an incredibly basic feature of displaying text but something that I had to build on top of what LibGDX already does! I'm quite proud that the tooltip is neatly tied into different classes of each word that can be translated and replaced into other text, for example the noun, adjective and plural of "dwarf", "dwarven" and "dwarves" would all share the same tooltip, and this tooltip would be applied to any text where this "single" word has been replaced.

This also means that with a slight swap of the default Noto font to one of the Noto font files that includes Chinese and Japanese, I was able to prove that, finally, these languages can work in the game (despite LibGDX making it slightly difficult)!

japanese font test


Now that all of this is accomplished, and the tooltips are in place, the game is in a good place to be opened up to supporting other languages. Alpha 3 is all about modding practically everything in the game, but I'm going to focus on translation support initially as there's been quite a bit of interest and offers of help from the community with translations.

This month marks one year since the Kickstarter campaign was completed successfully, and while I'm sometimes frustrated by what feels like slow progress month-to-month, the game has developed massively since the pre-alpha that was available alongside the Kickstarter, right through to being released in Early Access on Itch.io and now heading towards a more polished, fully-featured Steam Early Access release! On that front, I've recently updated the Steam store page to be marked as "coming soon" in 2020 rather than 2019. I'm very sorry to push back any dates that have already been written down like this. The roadmap still has quite a way to go before I think the game is ready for the Steam audience, but I'm fully committed to getting it there in 2020 rather than any further delays!

And with that I'll leave for a few more weeks until the September update, where I'll get into more detail on how translations are actually going to work, and if you want to, how you can get involved and help out with them!

July 2019 Update

July 2019 Update

News

Monthly dev update for King under the Mountain - a simulation-based strategy game inspired by Dwarf Fortress, The Settlers and Prison Architect.

King under the Mountain June 2019 Update

King under the Mountain June 2019 Update

News

Monthly dev update for King under the Mountain - a simulation-based strategy game inspired by Dwarf Fortress, The Settlers and Prison Architect.

King under the Mountain May 2019 Update - How Modding Works

King under the Mountain May 2019 Update - How Modding Works

News 1 comment

Monthly dev update for King under the Mountain - a simulation-based strategy game inspired by Dwarf Fortress, The Settlers and Prison Architect. This...

King under the Mountain April 2019 Update

King under the Mountain April 2019 Update

News

Monthly dev update for King under the Mountain - a simulation-based strategy game inspired by Dwarf Fortress, The Settlers and Prison Architect.

Add file RSS Files
King under the Mountain win32 v0 3 3

King under the Mountain win32 v0 3 3

Demo

Early playable prototype of King under the Mountain, for Windows 32 bit.

King under the Mountain linux64 v0.3.3

King under the Mountain linux64 v0.3.3

Demo

Early playable prototype of King under the Mountain, for Linux.

King under the Mountain mac v0.3.3

King under the Mountain mac v0.3.3

Demo

Early playable prototype of King under the Mountain, for Mac.

King under the Mountain win64 v0.3.3

King under the Mountain win64 v0.3.3

Demo

Early playable prototype of King under the Mountain, for Windows

Comments  (0 - 10 of 11)
RomanianReaver
RomanianReaver

No beer? And yet you say they're dwarves?! **opens the grudge book**

Reply Good karma Bad karma+3 votes
RocketJumpTechnology Creator
RocketJumpTechnology

Ah but the beer is coming, with a very detailed production chain and a major part of the economy! :) Just not in this version sadly, but the next major one I'm sure it will be.

Reply Good karma+3 votes
RomanianReaver
RomanianReaver

That'll do laddie, that'll do.

Reply Good karma Bad karma+2 votes
EarlyAccessGamer
EarlyAccessGamer

Hi, I was really enjoying playing your game. Even so early in development the mechanics are tight and fun. However, the demo crashed shortly after I started using it and I noticed that I was up to 3GB of memory usage from the game. I think you might have a memory leak :(

Reply Good karma Bad karma+3 votes
RocketJumpTechnology Creator
RocketJumpTechnology

Here's a quick look at memory management under the hood - it's very spikey due to the Java garbage collector but over time seems to use the same amount of memory for the duration, dropping down to about 250MB on average. How much memory do you have on your machine? Any info helps!

Kingunderthemounta.in

Reply Good karma+2 votes
RocketJumpTechnology Creator
RocketJumpTechnology

Thanks a lot for bringing that to our attention! Looking into it now! The game does seem to hover around 2.8GB of memory usage normally (not been at all conservative with memory usage at this stage) which is a lot but shouldn't be a problem for modern desktops/laptops. Will do some debugging now to see if I can find a memory leak.

Reply Good karma+2 votes
EarlyAccessGamer
EarlyAccessGamer

Hi, I have 32GB of memory so it shouldn't be a problem at all (and I'm not even entirely sure it was the cause of the crash - I looked for a log file just now but couldn't find anything). My suspicion is that not enough memory is being assigned to the JVM which could cause it to crash if memory usage spiked. I'm really keen to make a video on this game so I'll try again this evening (GMT+13) and get back to you with an update.

Reply Good karma Bad karma+1 vote
Rasip
Rasip

The windows demo is using 32bit java. It doesn't matter how much ram your computer has 32bit java will not be able to address more than 4GB, but in most OS it is closer to 3GB.

Reply Good karma Bad karma+2 votes
RocketJumpTechnology Creator
RocketJumpTechnology

Actually every platform only comes with a 64-bit launcher, mostly due to this memory constraint.

Reply Good karma+1 vote
ayarger
ayarger

The game's looking good! I enjoy all the activity and movement, and Dave's art is adorable. I think you could really make things feel cartoony and lively if you gave the sprites a bit of bounce as they move, south-park style.

Reply Good karma Bad karma+4 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
King under the Mountain
Platforms
Windows, Mac, Linux
Engine
libGDX
Contact
Send Message
Release date
Game watch
Follow
Share
Style
Theme
Fantasy
Players
Single Player
Project
Indie
Twitter

Latest tweets from @rocketjumptech

RT @SamuelPartridge: Still absolutely mind blowing that @OverTheAlpsGame is live on @AppleArcade this week. It’s had a ton of love put i… T.co

Sep 17 2019

Finally have a proof of concept for East Asian fonts in King under the Mountain! Even the font will be replaceable… T.co

Sep 9 2019

RT @jordanchinmusic: Our Steven Universe fan album, Songs from the Planet Earth, is out in 5 days! I wrote the track “Growing Up,” about… T.co

Sep 4 2019

RT @jordanchinmusic: 16-bit RPG + LGBT themes is basically my dream game. Excited to share a project that I've been helping out with a l… T.co

Aug 14 2019

RT @bonzrat: Might just share the first art/character design from my giant robot roguelite game Escape From Citytron later today… T.co

Jul 29 2019

RT @Cringer63: Spending at least the first 2-3 hours today checking out an early alpha game, King Under the Mountain from… T.co

Jul 11 2019

RT @filibusterfrog: dwarf hair infosheet T.co

Jul 10 2019

RT @BBCTech: Pirate our games, don't buy them from key resellers, say indies Bbc.in

Jul 8 2019

Embed Buttons
Link to King under the Mountain by selecting a button and using the embed code provided more...
King under the Mountain
Statistics
Last Update
Watchers
155 members
Files
4
Articles
37
You may also like
Fragment's Moonrise
Fragment's Moonrise Real Time Strategy
Community INC
Community INC Real Time Strategy
The Protectors
The Protectors Real Time Strategy
Survivors of Ragnarök
Survivors of Ragnarök Real Time Strategy
Crossroads Inn
Crossroads Inn Real Time Strategy
Heroes of Delum
Heroes of Delum Real Time Strategy