• Register

Fatty Rabbit Hole is a game about a hungry rabbit falling down an endless hole. Eat all the junk food you can while avoiding obstacles, healthy food, and a collection of shady characters who are out to end your feast!

Post news Report RSS Fatty Rabbit Hole: Getting Worldly

How Fatty Rabbit Hole became a multi-language game, and how I'll do things differently for the next game!

Posted by on

In my last article, I talked about how keeping things up to date lead me from upgrading the game engine behind Fatty Rabbit Hole to making some long-wanted additions to the game, but I didn’t elaborate much on what those will be.

With this article, I’m revealing one of the first major additions to the game: 3 new languages!

The coming update to the game will bring the option to switch between English, Spanish, German, and French, with under-the-hood changes set to make it much easier to include more languages in the future.

For a game like Fatty Rabbit Hole, which is largely dependent on English for its jokes and puns, and which includes a lot text in general, this was not an easy task. Additionally, the game wasn’t built with alternate languages in mind, so a lot had to be done to make this work properly. I’ve run down the steps I had to go through to get things working below.

Language changing script

Language changing script

Tearing Out the Text

The first thing that had to be done was to find all the text in the game and swap it out for variables that could be changed depending on the language the user has selected. This wasn’t particularly easy, because almost all the text in the game existed within individual objects, and much of it wasn’t drawing in a way that would help prevent overflow in case a new translation was longer than the original.

I started by organizing the game’s text content by what screen it appeared on: Titles, Options, Tutorial, etc. I created global arrays for each screen, and then slowly picked through each object that operated in these screens, adding each word or phrase to the array and substituting the appropriate key, so that when they game runs, it just pulls content from the array.

This took some time but was mostly easy to implement. I had to make some special cases for arrays that included text that is pulled at random – since some of the translations, I knew, would not have as many elements as others. Luckily, GameMaker Studio 2 allows for functions that take variable amounts of arguments, and so I was able to write some scripts that would let me punch in however many strings I needed.

The round-choosing Spinner in Endless mode

The round-choosing Spinner in Endless mode

Texture Swaps in Spine Animations

About halfway through swapping out the text for array keys, it dawned on me that a fair number of graphics in the game included text that was not dynamic, and was instead pre-rendered in Photoshop or Illustrator. At first, I though I might be able to just get away with leaving it there – it’s not uncommon, after all, to see some graphics that still use the native language of a game when you’re playing a translated version. But then I remembered that a key element of the original game, the “Spinner”, would definitely need to be translated – it would be silly to have each round get chosen on a wheel that showed only English, and then be presented with a title underneath in Spanish, German, or French. I had no choice but to also translate all of the pre-rendered text as well.

The Spinner turned out to be one of the simpler fixes. Instead of rendering the text directly on the graphic in Illustrator, the wheel would be empty of text, and I would use GameMaker Studio 2’s ability to draw transformed text to dynamically add the translated round titles on the wheel at runtime.

With that out of the way, I set my focus on a seemingly trickier aspect: swapping out the text in the graphics created in Spine (a skeleton animation software that is supported by GameMaker). Some of the game’s graphics, like the congratulatory messages after finishing bonus rounds, include a message like “Nice!” as part of the animation, and these needed the ability to be changed.

After fiddling with things a bit, I settled on including alternate images in the animation itself, and swapping out the contents based on what language the user had chosen at runtime.

Animated bonus round banner

Animated bonus round banner

There is perhaps a more eloquent way of doing it (I think I could have also left those slots blank in Spine, and then subbed in a new image at runtime), but this solution works and wasn’t hard to implement. A larger game would want to handle it differently because holding all the sprites for every language in memory at all times doesn’t make much sense.

Getting Things Translated

After getting done with all of the above steps, all that was left was to have the game actually be translated! This seemed straightforward, but I quickly realized that it takes quite a bit of organization to go through this process.

I don’t speak any of the translated languages (well, anyway), and so I needed to hire people to help me with this – but I didn’t want to get others involved before I had everything organized in a Word document, with clear instructions, contextual hints, etc. These documents took a long time to write up, and I realized after I’d submitted some of them that they weren’t complete, and so I had to ask my translators to do a few extra lines after the fact – or rely on machine translation in limited cases.

I also had to find people who were up to the task of translating a game that included a lot of jokes and puns that wouldn’t convert well to other languages without a fair amount of re-interpretation. Luckily, I was able to find some people on Fiverr who seemed to understand the nature of the job well, and were willing to work with me to get things done right.

Options menu, with new language button

Options menu, with new language button

Conclusion

Though I’m happy with where things are at now, if I had this to do over again, there are a few things I’d do differently:

  • I would have made the game ready for translation from the ground up. Going back and subbing in arrays later was not fun.
  • I would have made a game with less text in general. Fatty Rabbit Hole needs a lot of text, so it is what it is, but my next game will not be as reliant on text as this one (or if it is, it will likely be English-only).
  • I would make my language files external from the game. Currently, all the translations are contained in a script inside the game project – it’d be better from an organizational perspective to have it all load from external files. I might still make this change to Fatty Rabbit Hole in the future.

In addition to support for Spanish, German, and French, there are many other new features – big and small – that are coming to Fatty Rabbit Hole, including a new game mode!

I’ll have more on that in a coming article however, so thanks again for reading, and hope to see you back here soon!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: