What Comes After the AI Revolution

What does a technological utopia look like? What effect will AI have on work and how we perceive it?

Going back to the industrial revolution, and especially following the invention of the assembly line, machines have taken over more and more human jobs. This is not a bad thing in itself, as there are many jobs better left to machines, because they are too dangerous, disgusting, or repetitive for humans. And of course, machines work faster, increasing profit for businesses adopting them.

Through evolving technology, fewer people have had to do low level work due to increased efficiency and automation and – in theory – have been freed up from the burden of repetitive, awful jobs. Presumably, they also learned more advanced skills for other careers, or they are now simply unemployed. A term, and an assumption, I shall return to later.

The Arrival of Artificial Intelligence

Fast forward several decades from Henry Ford’s assembly lines, and we now face the next step; Industrial Revolution 2.0 – The Era of AI. This next step involves deeper automation through artificial intelligence, and it is already underway. AI is everywhere, and it’s getting smarter every day.

Recently, OpenAI was able to teach itself Dota 2 to the point of beating professional players consistently. This included using feints and other psychological tricks to manipulate its opponent. This is much more advanced than when Deep Blue became the first computer to beat a human chess champion, and it doesn’t require a super computer to run (a Mac or PC running Linux will do).

Through machine learning technology, AIs can not only learn from trial and error, but learn context, find patterns and predict outcomes. This enables it to better sort through all the possible decisions and pick the best one, which it will also learn from, and so on.

I predict that many jobs we now think of as strictly human, will be taken over by AI technology in the next decades. It has already begun in some industries, like software quality assurance, translation, data analysis, even marketing. Pretty much any job that can be reduced to a set of parameters to indicate success, could eventually be handled by AI.

There are obvious industries like logistics – self driving trucks never need sleep, and why not use robots to load and offload said trucks at the warehouse, which is also managed by AI. How about self driving garbage trucks with robots to handle and empty the bins. No humans needed.

Let’s use Board Game Design as a less obvious example – an AI could analyze and play hundreds of games to learn how the systems work. Then compare that data to other data points (sales, reviews, common complaints about games, etc.) to learn good from bad. Finally, based on this data, the AI can design new game systems at a rate no human could ever keep up with, including preliminary playtests. A human editor can adjust the AI parameters if none of the games are that great, and the next day a whole new slew of iterations are ready to test. Add a 3D printer, and it might even make a prototype for you to try.

With this approach, you will get a myriad of products and very little innovation (the AI might accidentally innovate game mechanics, for example, but it would be a side product). Innovation then comes from how humans teach/train the machine.

Bartenders could be replaced by AIs who remembers your name, favorite jokes, drinks and songs on the jukebox – it can even suggest people to talk to, who share your interests, all in a tone of voice that is custom generated to your taste. It will also measure any loss of balance you might display, and cut you off when you’re too drunk. Once we can design them to look cute enough, you won’t care that it’s not a person – you’re not there to see the bartender after all.

Another example of what AI might do in a few years is Movie Editing – an AI can analyze the editing of countless movies and compare cutting techniques with how well different scenes were received. It can learn to adapt to genres and themes, follow the soundtrack, etc. and within a few hours create multiple rough cuts of an entire movie.

Again, you are not likely to see a lot of innovation, and the final cut would likely still need to be tweaked by a human. But the number of hours saved equals considerable cash savings, and we all know that given enough time, even the final edit by a human would be removed in low budget productions. Animated movie? A team of AIs could do the whole thing, from script to edit, even computer generated voice over!

In other words, there are thousands of jobs and career paths that will be changed forever by artificial intelligence and machine learning, exactly like manual labor was changed by early automation and robotics. One major difference is, that the AI revolution will happen at a much faster pace. This leaves us with some questions to consider, and we should consider them sooner rather than later.

Did I mention that Google designed an AI to help them build better neural networks, and now it’s better at it than their own engineers? AIs building AIs better than humans can – it’s a thing.

The Grander Vision

I am a proponent of AI and machine learning; I’ve even played around with it a little for fun. I find myself seeking some deeper answers to where technology could take us as a species. No doubt, there are problems associated with it, but by thinking about long term goals, it becomes easier to fit technology’s place into the bigger picture and hopefully find solutions to those problems.

If technology were to replace 50% of all jobs within 50 years, what do we do with all the unemployed people?

It’s time to rethink what unemployment means. By that, I mean that if the goal of technology is to free humans from doing work they don’t want to do, that in turn must come from wanting to free up our time. In other words, a society where most people are technically unemployed because of successful technological advances is actually the goal!

The problem is, that this goal is in conflict with many building blocks of society, where unemployment is typically associated with failure of some sort (you lack skills, education, experience, have health issues, etc.), and there is a lot of status associated with job titles. But if freedom through automation is achieved, unemployment becomes an expression of that freedom (to pursue your interests).

It also does not mean that people stop working. Most of us like to make things and to feel productive, and this will never change. This is where innovation comes into the picture again. And sure, some people are content to watch movies all day, but if we don’t need to work, why shouldn’t they?

Well, how would they get paid? How would they pay their bills?

This is another realm, where technological advances are in conflict with traditional capitalist thinking, namely that you have to work to earn an honest wage. I challenge that notion. If there is no need to work, no one should have to – but those that want to, should be encouraged and rewarded. And if we can lower production cost of living through technology, money becomes less important.

I am a firm believer in rewarding those that go the extra mile, and even in my imagined tech utopia, that is still a necessary and good component. If you do want to work, you should get rewarded for it – and I think it’s necessary to scale that reward with the contribution made, to keep talented people interested. Note that rewards can come in many forms, not just monetary.

I propose that we use technology to work towards a society where traditional work is voluntary but rewarded, and those who can’t or don’t want to contribute in that way, are able to choose that without poverty or shame. A passion-driven society, where we hand over the boring stuff to machines and use the gains to raise living standards of all, starting with those whose jobs we are eliminating in the process.

Is it just around the corner? No. The day may never come at all. We could continue to drive towards faster, more profitable ways to work without considering the human (or planetary) implications, as we have in the past, but I don’t think that will end well. I prefer the alternative, where we embrace the future but seek to shape it in a way that benefits everyone.

How to Translate a Game 3/3: Gamemaker Studio 2 Example

This is part 3 of my article series about translating video games. Part 1 gave you a high level overview of the process, and things to consider when translating a game. Part 2 talked about splitting up the content and handing it back and forth, plus tools for getting it done.

In this final act I talk implementing it all, using a Gamemaker Studio 2 project as an example (download link below). Note however, that using this approach can be done with any engine. With a few changes, you could adapt a similar solution using XML-files with C#, instead of ini-files and GML.

Open the example project to get a better idea of how all the elements fit together. Note that the free version of Gamemaker Studio 2 does not support included files. For the record, yours truly has no official affiliation with YoYo Games or Gamemaker. I use Gamemaker in this article, because that is the engine I used for Torgar’s Quest. As a final disclaimer, while these scripts are all fairly simple, I do not explain any basic concepts like if/else-statements.


DOWNLOAD EXAMPLE PROJECT FILE: LocTut.zip – You will need to unzip it, before you can open it in Gamemaker Studio.

Setting Up Project and Assets

Your text assets should be correctly formatted files, added and organized by language for easy navigation. A main folder with a subfolder for each language is a good starting point, giving you a path like: text_assets/en/strings.ini

If you want to generate a set of ini-files that go with the example project, you can use the spreadsheet provided in part 2. It already contains the needed data and a macro that spits out an ini-file for both languages in that project.

When abbreviating a language for reference, use its actual ISO code. That way everyone knows what you mean, or can at least google it. Find a list of codes here: https://en.wikipedia.org/wiki/ISO_639-1

Next, make sure you have imported all relevant special characters for each language. From umlauts to caron characters, fonts are not always imported with these by default, or may not even include them at all. The reasoning is that fonts take up memory, so any unneeded character that is excluded equals memory saved and performance gained. This especially true with alphabets containing many characters, such as Chinese.

Identify exactly which special characters are needed for your translations, and add them to the game. For Torgar’s Quest, I asked each translator to provide a list of special characters (since they know their language better than me), and trusted that they did not miss one. And when it happened anyway, it was still caught in QA and fixed in a couple of minutes.

If a font used in the project does not include the characters you need, you may have to use a different font altogether. At that point you will have to decide whether to change that font game-wide or just for this one language. Game-wide changes can affect the overall look and feel of the game, and language specific changes can result in a mess of exceptions, as different languages have their own issues. This is a common example of a translation related problem that appears late in the development or QA phase of a project, and may require last minute design compromises.

Implementation in Gamemaker Studio

Match the folder structure in your project with the one on your drive to avoid unnecessary confusion. Little consistencies like that make a big difference in keeping things organized as your project scales.

When the game launches, it loads the default settings. In our example, the default is English. Next, the strings are loaded into a ds_map called global.text (if you are unfamiliar with GML, a ds_map is the equivalent of a Dictionary/Hashmap in other languages). Since I only have a small amount of data, I just add it directly. If you don’t have a ton of text, this is fine. If you have a lot of data, you may want to make a loop of some kind instead.

This script is only executed on launch.

GML Script:
// default language
global.language = "en";

// Initial setup of map to hold the strings
global.text = ds_map_create();

// Open the ini-file matching the language
ini_open(working_directory+"\\text_assets\\"+global.language+"\\strings.ini");

// Copy data from the ini to the map.
ds_map_add(global.text,"MENU_BUTTON_SAVE",ini_read_string("menu","MENU_BUTTON_SAVE","MENU_BUTTON_SAVE"));

ini_close();

Normally, I would put this code in a persistent controller object, but for the sake of simplicity, in the example project the button itself runs the code to set things up as well as switching the language, which comes next.

The current language reference code is stored in a simple, global string. To change the language, we call a script called s_setLoc() and provide the language code, we want to switch to, as an argument.

Any time you want to change the language, run this script with the target language as the parameter, for example to change the language to Danish, type:
s_setLoc(“da”);

GML Script for s_setLoc:
/// Sets the active language.
global.language = argument[0];

// Opens the ini file matching the language.
ini_open(working_directory+"\\text_assets\\"+global.language+"\\strings.ini");

// Replace the current string with the same one from the new language
ds_map_replace(global.text,"MENU_BUTTON_SAVE",ini_read_string("menu","MENU_BUTTON_SAVE","MENU_BUTTON_SAVE"));

ini_close();

As you can see, changing the language is very similar to the initial setup.

The strings are loaded into memory to avoid opening the ini-file every time a string is displayed. Continual loading of a file would slow down your game’s performance on lower end systems, and it’s just not a good approach. Loading from memory is faster and more efficient. If you have tons of text, you may have to expand on this to support several sources instead of just one ini-file per language, and then only load what is needed for the section of the game that is running.

Once the language is set and the assets are loaded, you call another script to show the specific string. That script takes the string ID as its parameter, then matches the ID with the keys of the string map in memory, and spits out the matching value.

This script doesn’t care what your language setting is, it strictly matches an ID with whatever is in that slot in the map. If there is no translation for a string at all, or the ID was mistyped, the ID itself will be displayed in-game. This helps with debugging, making it very easy to see, what still needs to be translated.

Call this script from anywhere in your code to fetch a string. Following the example project, to display the button text, the script is called like this:
s_print("MENU_BUTTON_SAVE")

GML Script for s_print:
/// Fetches string based on language setting and resource ID
myString = argument[0]; // Resource ID requested

// If the string does not exist, return the ID as a string.
// Otherwise return the string value matching the ID.
if (global.text[? myString] == undefined) {
return myString;
} else {
return global.text[? myString];
}

Troubleshooting

If you are seeing unexpected results, check that…

  • You are using the most current assets.
  • Are you using the right version of Gamemaker Studio?
  • Your ini-files are utf-8 formatted, which is what Gamemaker expects. You can check this (and convert if necessary) from most text editors.
  • You have included all necessary special characters in your font set.

Final Words

Translation is so much more than switching one language out with another, both in terms of content considerations and technical challenges. I hope these three articles have helped shed some light on what is actually involved, what most of the dangers are, and how some of them can be averted. I don’t claim to have all the answers, in part because I believe every project is unique and will come with its own set of challenges.

I guess you can boil it down to this: successful translation of a video game is the sum of good source material, careful scope consideration and properly equipped translators, held together by a streamlined workflow. It may be rare to see those factors all come together perfectly, but aiming for the best is always a good starting point.

If I missed anything, please do share it, drop a comment or reach out to me on twitter (@theprint).

How to Translate a Game 2/3: Preparation and Tools

In this second part of the translation guide, we look closer at how to separate content from code, and set up strings to become translated text assets. The first part, in case you missed it, gives you a higher level overview of the entire translation/localization process, and the next part will include an example project, and show how to implement it all using Gamemaker Studio 2’s GML scripting language and ini-files.

Torgar’s Quest was built in Gamemaker Studio, but the approach I took for separating the content of the game out from the code is not engine specific. In fact, I first saw this done on a game I worked on, which was built in Unreal. Regardless of your engine, you can use this technique or a variation of it, such as replacing ini-files with XML.

Optimize the Source Material

An often overlooked part of translation begins with fine tuning the original source material, so it becomes primed for good translation. This includes running a terminology consistency check on the content, making sure you refer to important things the same way throughout the game. You should also revisit any flavor text or descriptions which may include either pop-cultural references (trivia), political content (check against local law in your target markets), mature themes or puns. For different reasons, these can all pose challenging for translators.

Some of the worst mistranslations I have seen, have come from the translator not understanding a pun or cultural reference in the source material, and thus translated it word-for-word in their own language, losing all cleverness and sometimes meaning in the process. For better results, be critical of your source material before you hand it to translators.

This does not mean your content has be bereft of pop-culture references or the like. Just make sure you leave it open enough, that a translator can localize it and substitute references with similar ones of their own. If editing your writing to make translation easier sounds like a bad compromise to you, consider that the end goal is to have the best possible result across all supported languages, otherwise why support them in the first place.

Split In-Game Content into Areas

If you have not done so already, now is a good time to categorize your in-game content. This is useful for referencing specific areas later, or for directing focus onto a specific part of your game. A typical way to split up written in-game content might be: Menus, Tutorial, In-game UI, Enemy info, Item descriptions, Chapter 1, Chapter 2, etc.

How it best makes sense to split up your content, depends on the game you are making. You can define these areas even if your in-game content is incomplete, as long as you know your game well enough to know what parts are still missing.

Double Check the Scope

Besides the strings in your game, there may be other content to consider for translation. If you have Voice Over in your game, will that be localized and recorded for different languages too? Will it be subtitled? How about your store description text and sales copy? What about achievement text, help documents, marketing material and your entire associated website? Point being: be aware of all the content surrounding the project, not just what is in the menus and on screen during gameplay. You must draw the line somewhere, and this phase is your last good chance to double check that line before committing to it.

For Torgar’s Quest, I decided to leave the voice over in English only, as it is purely there for flavor and is non-essential for the game. Compare that to the major hassle and expense of getting it done by voice actors in several countries, and it just was not worth it. I did choose to translate the Lore books you can find, which are also purely flavor, but since they are text based and appear in-game, it would seem weird if they were left in English. Likewise, I chose to translate the store description and achievements, but not the associated website or the trailer.

When preparing content for translation, always look beyond your game itself. Don’t be surprised by these things and end up piling on extra translation work right before launch. Map it out and make strategic decisions now!

Separate Out Hardcoded Strings

If you are like me, every string was first hardcoded straight into the code, and will now have to be found and replaced. I cover how to load the strings in part 3. For now, all you need to know is that every string must be replaced by a string-ID reference. When a string is displayed, the ID is matched with the correct text asset, which is then shown.

Using the areas you defined before, go through each one, looking for strings to replace with IDs. Add the area names as part of your string-ID naming standard. Like with variables in code, it is highly recommended that you name your string-IDs in a way that helps identify where they belong, and what their context is.

Compare these two string-IDs both referring to the label for a save button. Which one is easier to understand:

  • MENU_BUTTON_SAVE
  • MB30221

I have seen both styles used, even in AAA projects, and I know which one I prefer. You will notice in the top example, the first word refers to the overall area where this string appears, the menus. This helps to locate it on screen, but also, in cases where there are similar strings in different parts of the game that may have different meanings, like saving game progress vs. saving a hostage. Small nuances like these can be important in translation. The second part specifies where the string appears (on a button), and finally, there is contextual keyword to help identify what the string is about. Not rocket science, but you can save yourself a lot of headaches later, if you start out with solid naming.

File Formats and Handling of Assets

Depending on your project and the tools you are already using, setting up the cadence and tools for handing strings back and forth can be surprisingly challenging. For larger projects with multiple translators, you need a system where two people can’t work on the same strings simultaneously (thus overwriting each other and wasting time). Many team-based tools allow checking out of files and locking assets, but it is still something to take into consideration. I have worked with Perforce and Team Foundation Server for this purpose, and they both do a great job. On the low end of the scale, I have used Dropbox, and worked on shared Google spreadsheets, where you had to pay attention to other users’ names, to make sure you weren’t working on the same areas. Not a recommended way to work.

For small games with just 1 person per language, you can take a simpler approach. I used spreadsheets with the source string in one column, the translation in another, and columns for notes and IDs. I would hand over the spreadsheet to each translator, filled out except the translation part. Once completed, they sent it back. I would then compile (also known as copy and paste) each translation into a master spreadsheet. Here is where it gets technical.

In my game, I store the text assets in ini-files, 1 file for each language, and each section within the file matching a previously defined area. These are very easy to work with in the code, but not so much for keeping track of translations.

Ini-files have to be maintained with every translation update, every added, changed or removed string, and that is a mess to do manually. Errors will happen without a doubt! For that reason, I made a macro in the master spreadsheet, which allows me to export a pre-formatted ini-file straight from Excel. It also adds a version number to each file, in case I end up with multiple copies and not sure which one was newer. This took a little time to make, but saved so much more time and frustration down the road.

I am including the master spreadsheet here to hopefully help make your life easier.

DOWNLOAD: Game Translation Master Spreadsheet

You are free to use it or modify it for your own project without paying or crediting me (though I do appreciate a shout out or game key). It has a single record in it, just to show how one would enter records. We will also be using this in the example project, in part 3. As a disclaimer, you are using this at your own risk. I am not able to provide support for using or modifying the tool.

In part 3 I take you through the implementation of this into a Gamemaker Studio 2 project. Do you have questions? Did I leave something out? Let me know, and I will address it.