Jan 11 2011

BattleWire16K in Chinese

BattleWire16K was translated to Chinese courtesy MochiMedia/ShandaGames. You can see it here. Note that that’s a link to a Chinese website and other than to note that the orange button below the screenshot launches the game, I don’t really know what any of the text says.

The one issue that came up, is that the recommended font, Microsoft YaHei, is large and embedding it into my .swf turned a game made for a 16kb contest into an 7,823kb monster. (MSYH, being a font designed for use in China contains character information for over 20,000 characters in comparison to an English/Latin font which has a few hundred.)

However, the translation needed only a handful of these. The solution was to embed by unicode range. Of course I didn’t know the character numbers for the Chinese text, and don’t have a utility to readily find unicode character numbers. Fortunatley, there are several web pages which will take arbitrary text and turn them into a series of unicode characters. I used one by Russel Cottrell.

To get the characters which needed to be embedded, I took the text sent back by the translator and copy-pasted it into the block which is labeled ‘Click to insert characters below’, selected Hex and click convert to HTML. This produces in the bottom block output which will look like “知名坦克”

Copy paste that block to a new file in any adequate text editor, and find-replace &#x with U+ and ; with ,

Remove any linebreaks and you now have a list of Unicode characters used in your translation, which you can copy into your embed tag using the unicodeRange= option. Using this process, I was able to reduce the file size from almost 8MB to a more reasonable 76kb.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment