informa
/
2 MIN READ
Blogs

Creation of a Point & Click screen - PART 3 : The translations

Some "behind the scenes" on the creation of a room in Demetrios! Here we study how to code translations!

In this new part, I'm going to focus on integrating text, and more precisely : the translations!

Hotspots

Hotspots

 

Last time, we've seen that hotspots on the screen have a label associated. But in the game program, this label isn't an english text. Instead, it is an ID (identifier).

For example : PC16_REEDS for the reeds hotspot.

Why? Why not putting english directly into the game code?

The answer is : to be able to do translations. Separating the game code and the text itself is much better because the whole text will be contained in a file, ready to be translated by a third party.

When it comes to programming, this is good practice : the more you separate each aspect of the software, the better! (I admit not pushing this to an extreme though, as doing it would make the development process a lot longer)

For Demetrios, all the text is located into raw text files, and these files have several versions : one by language.

In the English text file, here's what you'll find :

PC16_REEDS=Reeds

In the French text file, you'll find :

PC16_REEDS=Roseaux

And so on! Simple as that!

This way, translating is very easy : just open the raw text file and translate the words, line by line. The ID is the link with the program itself!

Based on the ID, the code searches through the current language text file, retrieves the translation and displays it!

The same applies to dialogs and interactions in the game, which also have IDs (one separate ID by speech).

For example :

PC01_TOPLEFTDOOR_UNLOCKED_IDCARD-1=This is no place to put an ID card!

PC01_TOPLEFTDOOR_UNLOCKED_IDCARD-2=It's much better to leave it in some random pocket of a random jacket.

Dialogs had a black background like Gabriel Knight 1

The old version of my game didn't have any translation. Only French!

Don't make that same mistake, plan a translation system from the beginning!

 

In the next and final part, we'll talk about the game dialogs engine!


Aside this, some news on the development!

As I'm now developing the later chapters of the game, I'm careful about what I can show. I wouldn't want to spoil the surprises!

However, I couldn't resist showing you a screenshot from the latest room I've done a few days ago!

Work in progress!

Work in progress!

 

My Kickstarter finishes in less than one day! Be sure to support it if you're interested!

https://www.kickstarter.com/projects/983902887/demetrios/

 

Latest Jobs

Disbelief

Hybrid, Cambridge, MA or Chicago, IL
5.31.23
Quality Assurance Lead

Bladework games

Remote (United States)
5.18.23
Senior Gameplay Engineer

High Fidelity, Inc.

Remote
6.2.23
Game Interaction Designer

Fred Rogers Productions

Hybrid (424 South 27th Street, Pittsburgh, PA, USA
5.19.23
Producer - Games & Websites
More Jobs   

CONNECT WITH US

Explore the
Advertise with
Follow us

Game Developer Job Board

Game Developer

@gamedevdotcom

Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Browse
Advertise with

Game Developer

Engage game professionals and drive sales using an array of Game Developer media solutions to meet your objectives.

Learn More
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more