How to: Multi-Language Mechanic

In modern games you typically select your language at the beginning, or it is detected automatically and the system selects the language.

The limitations of the Game Boy are present in this topic as well, as developers had to figure out other ways of supporting multiple languages. A common practice is to release the game on different cartridges with one language per cartridge / rom. So you had “Pokémon Blue” for English-speaking folks, and “Pokémon Blaue Edition” for German-speaking folks (the one I had as a kid).

Since space on cartridges is very limited, there would’ve been no way of providing more than one language for Pokémon games on one cartridge.

But if your game is smaller in scale (like a short puzzle or arcade game), and you can afford the space on the cartridge, then it’s a different story.

In this article, I’ll guide you step-by-step through the process of creating your own multi-language mechanic to support multiple languages on one rom.

Step 1: Preparation

First you should decide which languages you want to support.

In my example, and in my game “Fuse Dash,” I decided to support English, German, French, Portuguese, and Spanish, to cover a large portion of people around the world.

If your game is for Game Boy Color only, then you can even work with country flags (which are harder to differentiate with the 4 colors DMG palette).

Create a language select background in the pixel art program of your choice.

A GB Studio scene background created in Aseprite, providing 5 language options.
Creating a scene using Aseprite.

Now create an actor sprite that you can use as your cursor.

For this example project I used the arrow that comes with every new GB Studio project (as of version 3.2.1).

GB Studio's sample arrow sprite.

It’s best to select “Fixed Direction” in the animation type of the sprite, so you don’t have to handle actor facing directions later.

The GB Studio sprite editor.
Selecting the 'Fixed Direction' animation type for an actor in GB Studio.

Now you can create a new scene, select your language-select background and your cursor actor.

The scene type can be “Point and Click,” but it should also work as Adventure or Top Down 2D type.

Setting a scene type to "Point & Click" in GB Studio.

Step 2: Cursor movement

When we run the game, the cursor actor can move freely.

So we need some mechanics to restrict the movement to be inside of our list of selected languages.

First, we add the UP movement mechanic.

Add “Attach script to button” to the scene and select the UP movement. Inside you’ll have to add an “Actor move relative” script and add -2 to the “Y” value.

Searching for an event in GB Studio.
Entering the coordinates in a Move Relative event in GB Studio.

Now wrap the previously added “Actor move relative” inside the Else of an “If Actor at position” script, which you set to the highest place your cursor should be able to move up.

In the case of this example, that’s X:2 and Y:5.

You can use the red indicator while increasing or decreasing the values.

Why use the Else in this script? Because we only want the cursor to move 2 tiles up, if it’s not at the highest position already.

A screenshot of the input script being written in GB Studio.
An additional screenshot of the input script being written in GB Studio.

Now do the same for the Down input. You only have to edit the “Actor move relative” Y to 2 (instead of -2), and edit the Y value to represent the lowest point the cursor should be able to move to. In this case it’s Y:13.

Creating more input scripts for our menu scene in GB Studio.

And as the last step for the cursor movement, we need to restrict the cursor in moving left and right.

Add another “Attach script to button” script to the scene and select Left and Right. Also make sure to tick that “Override default button action” checkbox.

Selecting multiple inputs with the Attach Script to Button event.

Now your cursor should only be able to move from line to line in a vertical manner, without going above or below the list.

The language selection screen we created in GB Studio, with the option for English displayed.
The language selection screen we created in GB Studio, with the option for French displayed.
The language selection screen we created in GB Studio, with the option for Spanish displayed.

Step 3: Language selection mechanic

We now need a variable to store which language was selected.

Create one and name it accordingly. In this case I named it “language.”

A screenshot of the variable details in GB studio.

Add yet another “Attach script to button” script and select A as your selection button. You can of course also use another button, like B or Start, or straight up all of them if you like.

The Attach Script to Button event in GB Studio.

Now we’re again using the fixed positions of the cursor to determine which language is selected.

We’ll start with the first language, which in this case is “English” and would be selected if the cursor is at X:2 and Y:5.

Using the Player at Position event to run a script for our cursor at different positions.

Add a comment field and write down which values represent which languages.

Creating comments in a GB Studio script.

Add a “Variable set to value” script, set the variable to your language variable (again, in this case I’ve called it “language”) and set the respective value.

Setting the value of our variable with an event.

Now do the same for all other languages. Copy the “If player at position {2,5}” script, place it inside the previous ELSE state and change the X and Y, as well as the language variable values accordingly.

Using an IF statement to control which variables are set at which cursor positions.
Expanded image showing the rest of the script we have written.

Now place a change scene event at the end of the “Attach script to button” for the language select button so it changes the scene when the player has selected a language.

Adding a scene change event in our GB Studio script.

Step 4: Showing the right dialog

Now add a new scene, or go to the scene in your game where you want to show a dialog.

Creating a new scene in GB Studio.

Add a “Switch” script, change the “Number of options” to 5, and let the numbers start with 0 instead of 1.

A screenshot of a Switch event in GB Studio with 5 options available.

In this example, 0 is used for English, 1 for German, and so on.

So if the language variable has the value 0, it should show an English dialog. If it’s 1, it should show German, and so on.

A screenshot of a Switch event in GB Studio. The first option has English dialogue, while the next has German.

And that’s it, you now have a language select within your game!

Selecting English from the language selection screen we created for our game.
A GB Studio scene with English text.
Selecting German language from the options screen we created.
A GB Studio with German text!

Liked it? Take a second to support GB Studio Central on Patreon!
Become a patron at Patreon!