Friday, 4 September 2015

Supporting Multiple Languages

Hi everybody!

I've talked about the language system in Brick Inventions for quite some time now, so I want to use this post to explain how it works.

Let's start at the beginning. After several months of development, I saw that people from many different countries liked the game and I knew that it would be impossible to translate the game into all those languages (especially since I'm only one person). So I created a system, which would allow users to create their own language files besides the official ones that can also be shared with other people.

The System

Let's have a look into the system. If you start the game for the first time, it will create a new folder in "C:\Users\<User>\AppData\LocalLow" called "BrickInventions". This folder contains 3 important folders:
  • Maps (Which contains all your sandbox maps, each map stored in a file)
  • Inventions (Contains all your inventions)
  • Languages
By default, the languages-folder contains an .xml-file for each "officially supported" language. These files can be opened with any editor (Like the standard Windows Editor or Notepad++, which I normally use). The content of the file looks like this:

 (The game is still in development, things might change until release)

For those of you that are not familiar with .xml-files, such a file consists out of opening tags like <string> and closing tags </string>. These tags can have attributes like "id", which is in this case used to identify where the text should be displayed in the game. Between and opening and closing tag, there can be other tags or just text (that will be displayed in the game).

If you want to create a new file, just copy one of the "official" ones in the folder, open it, and change the text between the <string> tags. The game will automatically check if the file is valid and you will be able to select the language in the options menu. There will be a more detailed description about how to do it one the game is out, this should only be an overview. Since editing such an file can be difficult, I'm also thinking about creating a simple website or tool which is basically a form that you can fill out and it then creates the file for you.

I'm also thinking about changing the system form xml to csv which would be a bit more convenient to edit I guess? Tell me what you think about it :)

Current Game Progress

I've already tweeted yesterday that there has been much progress with the game during this week - I first started to work on the sound system and the sound effects, which are (almost) finished now. Then there was another fun play testing session, which also showed some problems that I fixed afterwards. During this process, I also added level-numbers to the podium of producers and other buildings in the multiplayer, which gives a better overview. After that, I gave the sandbox map a new, better environment as well as a completely new skybox.

Currently, I'm working on the Singleplayer levels, which is, besides the Steam integration, one of the last two parts of the game that are not finished yet. There will also be a new video, in which I will introduce the multiplayer mode.

That's all for now, exciting weeks lie ahead!

1 comment:

  1. Hey! I can help you with multiple languages and translate Brick Inventions to russian!