Devlog Three: How's Your Mandarin?


Devlog Three: How’s Your Mandarin?

Hello there. Not too much to say this time around, just a small update before the IRL play-testing tomorrow!

Language support

There’s something I find really cool about adding support in a game so that more people can enjoy it. Languages, colour adjustments, disability settings, etc… They don’t ‘add’ anything to the game per say, they just take content and make it more accessible… and that’s cool; it just feels rewarding to me.

However, it isn’t as simple as popping your text into Google Translate and making duplicates through the code, that would be too easy.

Firstly, the code side wasn’t too bad. A static variable to hold the language setting, that could be referenced in any scene made it a series of conditionals on each relevant Awake() call. Job done, the text even looked good dimension wise, and no scaling was needed. It did look a little squished… but it’s another alphabet (If that’s even the correct term!), maybe it was supposed to look like that? (spoiler, it was not).

Unfortunately, the Unity Editor will display the text in a system font that supports those particular characters, but on export to the WebGL version will show nothing at all.

The reason for this is quite interesting. The font I was using didn’t have those characters, the data simply wasn’t there. In the modern day where computers have a lot of storage and RAM this might make little sense at first; even if there are 10s of thousands of Chinese characters, it wouldn’t be a problem to handle that.

But consider that whoever makes a font has to create each symbol individually, and you quickly realise that it’s a problem. Luckily, Google had a font (ZCOOLXiaoWei-Regular) that supported Latin and Chinese symbols, so I slipped that into the project and everything worked fine.

I’ll finish this off by mentioning that I’m considering this a minor update. V0.2.1 is the version you’ll want to be playing from today onwards.

Changelog

  • I’ve updated the game so that it supports Chinese(simplified)!
  • Updated a rogue light which got stuck underground!
  • Updated the colour of the death count and timer so they’re easier to see!

Files

trial-by-fire-v0-2-1-webgl.zip 20 MB
Oct 25, 2022

Leave a comment

Log in with itch.io to leave a comment.