Horrible hacks and Language Support in BEP

Usually I don’t do too many updates anymore because I’m afraid of just running out of material and showing the whole game off before it’s done, but this should be fun.

So one thing I noticed with IWBTG is that it was very popular in Japan and the Japanese fans of my work are super cool. While this popularity probably won’t extend over to BE:P, I still always wanted the game to be easily localizeable for them. Unfortunately, far too late in the development, I discover Construct Classic doesn’t support unicode. Brutal!

So in the last two days I implemented a hack I’ve been thinking about for awhile. Construct uses the ANSI character set, provides 217 characters. BE:P uses 83 of those characters by default. The rest of the characters are accented letters and bizzare stuff like § or † or even ‡! Really wacky symbols. So most of that could all go. Unfortunatey, even if I used all 217 characters, that would be an insignificant amount of kanji. FORTUNATELY, basically all NES games were written, due to space issues, in kana. Kana lends it’s self better to this, being two syllabic character sets. Between alternative characters and japanese diacritic marks, the set comes out to 100ish characters, just barely squeezing in. In fact this is apparently how any “English -> JP” fan translations end up being done.

So the next step would be keying ansi characters to kana. Fortunately, BE:P doesn’t use a real font or anything so it’s easy for me to make a character appear however I’d like. Characters are searched for on a big key string and that index is used to set the text objects frame. The character key when Japanese is enabled looks like….

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!/#$&'()*+,-./0123456789:;<=>? @`;€ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—™š›œžŸ¡¢£¤¥¦§¨©ª«¬1®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ”

Everything up to ? and ” ” is represented in game in english. @ and ` are controller characters for linebreaks in the dialog engine and everything after that is dedicated to kana. So if we were to search for “©” on this string it would come up as character 120. Frame 120 of the text object is the pixel version of “は”. Easy breezy! The dialog file also has support for easily creating additional text boxes. This is going to be important for Japanese because “kana only” japanese is, screen space wise, pretty inefficient and the kana font I’m using now only allows for 3 lines of text to english’s 4. Still, it ends up looking really nice! Also in this setup, I can easy change the secondary characters. The game can only display one set at a time, but that still allows me to implement all accented latin characters, or Cyrillic or any other non-logographic character set.

Of course this brings up the issue… if construct can’t handle UNICODE, how can I even read the dialog? Oh, well I had to hack together a crummy little python script that’ll read a file and “encode” it into the hacked ANSI characterset setup. So when release is near (it isn’t) I’ll make that available to help people localize the game in other languages if they want without having to resort to dealing with super gross hacks directly.


Not sure if the Katakana is even right, but it’s looks pretty cool!

12 thoughts on “Horrible hacks and Language Support in BEP

  1. I’d have done:


    But I think either is acceptable ;)

    Also, I’m not sure what the middle aligned dots mean, but they do help separate words (which, without Kanji, you’re probably gonna need!).

  2. Yeah I’ve been wondering about the dots. I see them sometimes but not only times. I suppose I should include a character for that just in case. Also yeah, I think your translation works much better!

  3. ナオミ·ヴォス·クルーズ would probably be the most accurate. Japanese doesn’t natively have a “v” sound, so substituting a “b” is pretty common, but the modern convention is to use ヴ if your character set allows for it. You seem to have a lot of names with V in them so…!

    The dots are generally used to separate words in Western-style names or phrases (and also to help indicate that the name is arranged given name first, surname last, rather than the Japanese norm of surname first) but aren’t strictly necessary. You’ll also sometimes see a “=” sign used for the same purpose (e.g. “DEATH=ADDER”)

    actually since I love doing this stuff, here are some more

    Trevor Vos Cruz = トレヴァー·ヴォス·クルーズ
    Sinlen = シンレン (be careful not to write ツンレン, despite how appropriate it would be~)
    Donovan = ドノヴァン
    Vayn = ヴェイン
    Ruby Knight = 紅玉の騎士 kougyoku no kishi (knight of ruby)
    Phantasmagoria = 幻魔 genma (phantasm demon)

    since I assume you use bitmaps for the boss names rather than fonts, I figure you can go nuts with esoteric kanji combinations which is always fun

  4. I just got away from using Bitmaps but because of this, I decided to put a hook in to allow translators to use them. For fun, I put together a test image using your Ruby Knight translation. Actual description is machine translated so it’s probably total rubbish but it makes for a good test. I’m sure whoever works on this will have a better sense of japanese typography than me!

  5. Are you using an image for a sprite font? Would it be easier to switch out the image containing Latin characters with one containing kana? I’ve only used C2, not Classic, so idk.

  6. Couldn’t quite do that because japanese games use latin characters a lot. I could always throw a little language switch for midline changes, but honestly that’s more complex than the ‘stuffing into unused characters’ method. But yeah still totally possible. Basically the pure latin and latin+kana sets are two different animations with all the characters as frames.

  7. Kayin please, I’m turning into a skeleton and Brave Earth is not out yet. Just be sure to pick up my money I’ll put it in my rib cage.

Leave a Reply

Your email address will not be published. Required fields are marked *