6 Tips for Game Localization

Torgar’s Quest is my first title to be published in other languages than English. I am stoked and nervous at the same time, because seeing my game in other languages is just awesome, but in my day job I work as test lead in localization testing, so I also know how many things can go wrong.

To help myself and other game developers, who are considering getting their games localized, I have put this list of Dos and Don’ts together.

1. Separate the content from the code

The first thing you need to do, if you want to localize your game, is to replace all hardcoded strings with a script that pulls it from a data source. When a string is needed, that script is called using a reference to pull the right bit of text.

For Torgar’s Quest, I have a script that takes 2 arguments; a filename and a number. The filename refers to which file the string is in (see below for more on that), and the number indicates which line the string is on in that file. The game loads the language setting into a variable at the beginning, and this variable is used in the script, to pull the right translation.

2. Get organized

To stay organized, consider splitting the text assets into multiple files, divided by area in the game (or in some other logical way). For instance, you can keep all menu strings in one file, and the in-game story strings in another. Splitting content into categories like this, makes it easier to find specific strings and to reference them in the code and when communicating with translators/testers. Staying organized is key once you start asking others to work on the localized content.

3. Prepare your game

Many things you take for granted in English might be completely different in other languages. English uses a lot of short words, for example, but this is not true everywhere. For instance, German has lots of really long words that may not fit on tight buttons. Japanese is different again, with its own rules for text wrapping. These are things to research and keep in mind when designing menus and UI elements.

Quick tip: Use W to see how many characters fit in a text box, as it is the widest character in the Latin character set.

Besides making room in the UI, you will also want to make sure that the fonts you are using contain all special characters and diacritics used by the languages you intend to include. Obviously, trying to display characters not included in the font set, will not work out in your favor.

4. Standardized formats are not standard

Metric system vs. Imperial? If your game uses distance, weight or other measurements, you better make sure the right format is supported. Don’t assume that a Swedish gamer is familiar with how far a mile is (and just to make things even more complicated, try looking up how long a Swedish mile is). The same goes for time. You might be used to a 12-hour clock (am/pm), but in many countries the 24-hour clock is standard.

Date formats and decimal separators also differ from region to region. For example, in the US people are used to seeing MM/DD/YYYY as the standard date format, whereas in Europe it is typically DD/MM/YYYY. When displaying a date like 1/10/2015, this distinction becomes important. Decimals and thousand separators are a similar difference. In the US, people use a format like 1,234.5 but in other countries it might be 1.234,5.

5. Provide context

Never rely on translation without context. If you can’t provide a copy of the game itself, at the very least provide some screenshots and a design document, describing the game. This is important, because words can often be translated in many different ways, some of which will certainly not match the context of your game. These issues will not be caught by a spellcheck, or someone looking at a list of strings, and could end up making your translation nonsensical or even involuntarily hilarious when seen in the game.

On that note, do not ever rely on auto translation. Google translate does not understand what your game is about, nor can it look at a screenshot, and it’s just not good. Don’t do it. Ever.

Context is also helpful in cases where you are using puns, pop-culture references or other linguistic finesse in your content. Such strings may need a complete retranslation to work in the intended market, which a good translator should be able to do – but only if they are aware of when it is needed.

6. Allow time for testing

Once you begin separating the content, you will probably realize that there is a lot more written content that you thought. These take time to translate, and after you’ve integrated the localized content, you are still only halfway done. Next up is the localization testing.

In a perfect world, you will have someone who is a native speaker, but not the same person who translated the content, testing the game with its localized assets implemented. This person will need to cover every area of your game, and see every single string in place, to check for things like consistency (did you translate XP the same way everywhere?), grammar and typos, things out of context or strings you missed, when you were separating the content.

Each issue needs to be described, logged, evaluated and fixed. Then the fix needs be put in, so a new build can be sent back to the tester for verification. This process takes even more time. Make sure you plan for it.

These are some tips that will hopefully put you on the right path. As for which tools to use, that depends on the size of your team and your project. I use a combination of spreadsheets, text documents and Trello, which I may cover in a later post.

Designing Procedural Dungeons for Torgar’s Quest

Torgar's Quest
There are many ways to approach procedural level design. For Torgar’s Quest, I wanted randomly generated mine-like dungeons, so I went with the carving approach: starting with a map filled with “walls” from which you cut out the level.

The key to this approach is designing the carver object, the thing that cuts out rooms and corridors. You need to make sure, you don’t get too close to the map edge, or you will have a hole in your level. You’ll also want to decide when to turn in a new direction, and to do so at a good rate, thus avoiding long, unbroken corridors on one end of the spectrum and huge caverns on the other end. I spent a lot of time changing parameters to find an algorithm that generated the kind of map I wanted.

Torgar's Quest

I realized, I would need more than one carver object in order to spawn off side corridors. At first I spawned these at different pre-determined coordinates and let them do their thing. However, this approach proved imperfect, because half the time one or more carvers would fail to connect with the others, so there was no path there, which in turn caused problems when spawning in things like the player and the level exit.

To fix this, I ended up creating a master carver, which would then spawn other sub-carvers from within its own path. These new carvers thereby start from somewhere along the main path and create forks in the map. The trickiest part then, was balancing when and where to spawn in the sub-carvers, in order to get a dungeon that felt right. Again, this came down to trial and error.

Torgar's Quest

How I did it was based on time. The master carver runs for X seconds, and after a quarter of the time has elapsed, it spawns the first sub-carver, then again at half time, and finally again at three quarters. At full time, the master carver destroys all carvers and moves on to spawning in monsters, etc.

One challenge with this approach is time. The carvers need to crawl around and generate the map, but I did not want long load times for the player. A few seconds was fine, because it gave me a chance to display a new bit of the game story, but it had to be balanced. Initially it took too long for the maps to generate, so to fix this, I sped up the frame rate of the game while the map generated, thereby speeding up time in a way.

Once the carvers are done, the loading screen goes away and the action begins.

For more about Torgar’s Quest, check out the website (where you can play the browser version, too).

Introducing Torgar’s Quest (roguelike)

Torgar's Quest (alpha)For several months now, I have been working on a 2D village building game, Founder, using the Gamesalad engine. Since Gamesalad runs on Mac and mine started randomly rebooting several times a day, I could no longer reliably work on my village builder.

Bummer. Doubly so because I have limited time, so a trip to the Apple Store will have to wait until after the holidays.

They say you should make lemonade, when Life gives you lemons, so I fired up my PC instead, and GameMaker Studio, which I have been using more and more anyway, and started a project I had wanted to try for a long time: building a roguelike dungeon crawler.

Thus Torgar’s Quest was born!

For those not in the know, a roguelike is a turn-based game inspired by the classic game, Rogue, in which you run around fighting things on a randomly generated map. Oh yeah, and there’s no saving the game, so if you die, you have to start over. Read more about roguelikes elsewhere (I will be following up with a post on how I went about it later).

I was initially thinking of this project as an exercise in coding the procedural level generation, just a bit of fun while I wait to get my Mac fixed. But as it sometimes happens, the side project took on a life of its own, and I let it, because I love roguelikes.

Within a few days, and with the use of a fantastic, free tileset, I had a working alpha build. From here, it’s a matter of tweaking the balance, adding a few more features and audio. It’s still a work-in-progress, but I am going to keep Torgar’s Quest pretty small.

Right now, a playthrough takes just a few minutes to play, unless you get really lucky or play better than usual (read: me), and that is pretty much perfect for what I am looking for.

Eventually, the finished game will be available for sale, but while it’s still in alpha, it is absolutely free to download and play (at the time of writing, it’s Windows only). The game even has its own website, where you can play a web-based version as well.