Welcome to the (late) August update forKing 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 theres 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 theres 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 dont see as much similarity as you do with some games using Unity not that thats a good or bad thing! Slay the Spireis an amazing game also written in LibGDX, and it plays very differently toKing 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 dont supply your own font image, you get the LibGDX default which is Arial in 15 point and looks like this:
Early on I decided I didnt want the absolute default to at least differentiate the game from other basic LibGDX projects, so I decided to use Googles Roboto font, mostly because its 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):
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:
Its 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 Id 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 months 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 games 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 Googles Roboto font to Googles Noto font family as the latter aims to cover all unicode characters. Having added quite a large body of text to the games 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:
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 doesnt 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 dwarfs 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! Im 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)!
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 Im going to focus on translation support initially as theres 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 Im 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, Ive recently updated the Steam store page to be marked as coming soon in 2020 rather than 2019. Im 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 Im fully committed to getting it there in 2020 rather than any further delays!
And with that Ill leave for a few more weeks until the September update, where Ill 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!
[ 2019-09-12 13:52:49 CET ] [ Original post ]
- King under the Mountain Linux [712.99 M]
The game is based around these central pillars:
- A simulated world – The game world is built on a series of interlocking systems which combine together to simulate a living, breathing world. As night changes to day, trees and plants will grow (or not) based on sunlight and rainfall. The local environment and changing seasons have effects on the native flora and fauna. Your settlers and other characters have their own personal social and physical needs that you’ll have to fulfil to keep them happy (or at least stop them from breaking and going insane!)
- Procedural generation – Every map is randomly generated from an initial seed (a large number) so that no two maps will ever be the same – unless you choose to use the same seed! The art assets for the game have been created in such a way that they can be drawn by the game engine for near limitless variation in colour – so every tree, plant and character will have their own unique combination of colours and appearance.
- Peaceful expansion – It’s an important design goal that it’s possible to play the entire game without getting into armed conflict with other factions (if you choose to). Although weapons and combat can be significant parts of gameplay, we wanted to make sure you can peacefully build up a fully-functioning town to have the satisfaction of sitting back and watching your settlers go about their business in an “art farm” style of play.
- Multiple ways to play – As well as different ways to build and grow your settlement (do you focus on mining? farming? crafting? buying and selling goods?), in King under the Mountain you can play as several different races and factions each with their own unique gameplay elements. You could build a dwarven fortress dug deep into the side of a mountain, a town of humans at an important river crossing, or a tribe of orcs hunting and raiding others. More than just different races to play as, we want to introduce completely new play styles as unusual factions – perhaps a lone wizard building their secret lair with golems they have constructed, an evil necromancer raising an army of the dead, a dragon amassing a hoard of gold in a giant cave system, or even an invasion of demons attacking the material world.
- Player-driven content – Have you ever spent hours in a creative game building something, only for it to sit hidden away on your computer? In King under the Mountain, players can opt-in to automatically upload their settlements for other players to visit. This drives the basis of the adventure mode – you put together a party of champions from your settlement’s population, and go off on an adventure to explore another player’s creation. This mode will involve turn-based tactical combat as you explore and battle through another player’s fortress, claiming rare resources that may be difficult or impossible to acquire otherwise. It’s important to note that nothing will be lost by either player in this encounter – you don’t actually “attack” the other player, only a copy of their settlement, and there are benefits to be gained by both parties.
- Mod friendly engine – Another big design goal is that everything you see or read in the game (and the variables behind them) are fully open to modification. In fact, the base game is built as an engine with one base mod applied to it (which modders can look at to see how things work).
- Processor: Intel Core2 Duo 2.4Ghz or HigherMemory: 4 GB RAM
- Memory: 4 GB RAM
- Graphics: Intel HD Graphics 3000
- Storage: 500 MB available space
[ 6140 ]
[ 1688 ]