So I spent about twenty minutes last week, and added Unicode support to the VectorStorm engine’s font system.  I’d been put off from doing it before, in part because I know from experience how complicated it can be to deal with Unicode-encoded text, and in part because I was worried about how many big changes it would require in the VectorStorm codebase.

But it turned out to be pretty easy;  it required less than two dozen lines of new/modified code, in total.  Why was I worried about doing this, again?

Key to making this work was discovering an open-source library utfcpp, which made extracting code points (roughly, individual glyphs) from a UTF-8 string a breeze.  I’d been dreading trying to integrate a heavy library like ICU into the VectorStorm engine, and then wrestling it into agreeing to work across all the game’s different platforms.. but luckily, I didn’t have to!

Now, VectorStorm still doesn’t come with a bitmap font, and the built-in vector font still doesn’t support Unicode at all;  so for Unicode support, you need to create your own using BMFont (or any of the many other tools which create BMFont-format data files).  But we now do support drawing UTF-8 text, if your font contains the needed characters.

For example, in MMORPG Tycoon 2, we now support all the glyphs from latin1 and latin1-extended, which I believe is all you need for the standard English/French/Italian/German/Spanish languages.  And the system itself would support any other languages, if I was only to add the extra glyphs to the game’s font.

I’m still not certain to what extent I’m going to localise the game into non-English languages;  I’d very much like to do that, but I’m worried about all the procedural text in the game;  things like the generated game names, character names, town names, and so forth;  a lot of effort has gone into making vaguely plausible names in English, and I’m not sure if the systems I’m using to do it in English will work, if translated into (for example) Spanish.

I guess this will definitely be something I need to chat with marketing people about, before launching the Greenlight campaign!  I’d like to have my story straight and a strategy in mind, in terms of what languages the game will support upon release!