What have we been up to this week?
Hey hey! Here is your 36th ScourgeBringer open development issue!
Previously on ScourgeBringer: I made some very good progress on our editor by adding the possibility to play directly within the editor, while editing stuff. I also started to play around with lasers. Florian on his end, is still working for Ankama until the end of the month.
Before we get into what I've been up to last week, I'd like to talk about pacing and the weekly stream. We are going to stop it, but hopefully replace it with something more relevant (like a monthly video recap).
This is motivated by the fact that I'm having a hard time to keep up. For the livestream to be relevant and interesting, I need to have new things to show every week. The problem is that I sometime would like to spend more than a week on a new feature or to spend time on "invisible" elements. Forcing ourselves to work on "showable" stuff every week bends our way of working too much, and we don't want to end up in a situation where we are focusing on showing things instead of actually designing things. And there's also the fact that I'm streaming during my afterwork hours (because it's the best time slot for both EU & US viewers), which directly impacts my social life.
Hence, we are going to stop the weekly stream, and we are looking into new ways to post video content. So far, the idea is to make a monthly video recap of our progress.
Now, about last week. =P
I spent a lot of time figure out a way to properly support CJK (Chinese, Japanse, and Korean) languages in ScourgeBringer. When doing pixel arts games, you have to be careful about the fonts you are using because some languages (like CJK) need way more pixels to be readable than the roman alphabet. Back on NeuroVoider, we made some bad design choices that prevented us to translate the game in Chinese, but we're thinking ahead with ScourgeBringer.
Supporting CJK can be challenging, because it represents a combined set of more than 80 000 characters. If you're not familiar with how text is rendered in a game, it is now as simple as adding a TTF file. That said TTF has to be rendered into a texture to make a "bitmap font", like this one.
Plenty of tools exist to generate bitmap fonts, but the problem with CJK, is that rendering 80 000 characters into one or several textures is very impractical and prone to hardware incompatibilities. So the idea is to render only characters that are actually used in the game, which can help going as down as a 1000 to 2000 characters (which can fit in a single moderately sized texture). But then comes another problem: if we want to allow players to make their own translations (or translators to have a live preview of what they are doing), we still need to support characters beyond what's currently in the game.
So I spent some time on figuring out how to generate bitmap fonts directly within the game (instead of using an external tool to do that at build time) so that the game can auto-render every needed characters based on user data. And for this to happen, I had to rewrite my own text renderer. But we do support CJK languages now!
I then spent the remaining of the week working on a pixel perfect more for ScourgeBringer. This is yet another problem with pixel art games. Have you ever noticed non-square pixels in games?
This problem is due to how games are stretched and also because modern display are ultra sharp. Pixel art games are rendered at quite small resolutions, like 417x235, and are then stretched to modern resolution like 1920x1080. That means that each of the original pixels are 4.6x4.6 modern pixel wide. But hey, how do displays render 0.6 pixel? Short answer: they don't, or sometime they overdo it. To keep that 4.6 ratio, it either renders too many pixels once in a while, or too little, resulting in... non-square looking original pixels!
So how to you handle that? By forcing pixels to use the closest inferior ratio, that would be 4x4, but that also means that we will have to add 141 pixels of letterboxing and 250 pixels of pillarboxing to fill up the entire 1920x1080. Yes, that's lost space, but the game will look perfect.
What we did with ScourgeBringer, is to choose a base resolution that has the roundest ratio for the most widely spread resolutions. This means that the game will look perfect on 1080p, 1440p, and 2160p without any boxing, and the other resolutions will have an option to either enable or disable boxing to be pixel perfect.
Here we are! I didn't made any gameplay progress last week, but our game engine is more capable than before and it should help us to make things smoothly from now.
And that's it for this week! See you next mission!