Coherent GT 1.6 – Your new secret weapon to fight the monsters in your UI

by Dimitar Trendafilov November. 18, 15 0 Comment

It’s pretty common nowadays for the big titles to ship with multiple supported languages. Native speakers of large markets often expect exactly that.

Localization is one of the many issues in software engineering that look easy at first sight. When underestimated however, it gradually starts to look like Viktor Frankestein’s monster – stitched up from various pieces of repulsive code.  And you often end up wondering whether and how do these pieces even work. Here is an accurate explanation of the Localization horror story.

We at Coherent Labs can’t really kill Frankenstein’s monster for you, but we can give you this awesome monster-destroying rifle that can ease your hunting.

Update: Check the latest release – Coherent GT 2.0

Introducing the localization API

How cool it would be if you could add an attribute to your HTML elements and have their content translated automatically? Well, with Coherent GT 1.6.1 you can do that! But wait, does that mean that you must throw away that nice localization system that you just spent 2 months on? No, of course not, you just tell Coherent how to interact with it:

Now go ahead and tell your designers to add the data-l10n-id  attribute to any HTML elements deemed worth of translation and watch our rifle blast the monster to stitches and patches:

When you load the page, the button’s text will be set to the return value of MyLocalizationSystemBridge::Translate  when passed "text-for-destroying-the-monster" . To see this in action, check out the new localization sample found in the Coherent GT for native package (or the updated localization map for UE4):

 

Example of menu with localization API

Furthermore, you can use request translations on demand by calling engine.translate("text-for-destroying-the-monster") .  Also if you’ve changed the current locale, you can request Coherent GT to reload all localized text by calling engine.reloadLocalizaton()  . Both of these are demonstrated in the sample mentioned above.

 

Enhancing user experience with gamepad

Good games let the users play them any way they wish and gamepad support is among the most often requested features. Some developers believe that adding gamepad support is as simple as mapping the gamepad input to gameplay actions. I hope you know well enough to never do that. You can achieve a good gamepad support only if you plan and design everything in your game for it. Naturally this includes the user interface. Easy tasks with mouse and keyboard like drag & drop or typing your character’s name can become nuisances if not properly reworked to fit the gamepad.

Until recently, users of Coherent GT had to simulate gamepad buttons using keyboard to make them accessible in JavaScript but no more. The W3C added gamepad API to HTML5 as early as 2011 and the proposed standard underwent major changes since then. It’s now stable enough to be used reliably, which is why Coherent GT 1.6 shipped with implemented gamepad support. Users of our plugins for Unreal Engine 4 and Unity3D or native users with access to console SDKs can check this new feature immediately in the supplied inventory sample:

 

Example of gamepad map for gamepad support

 

Upcoming

Assuming you have defeated both the localization and gamepad monsters, you should take some well-deserved rest. Put the rifle we provided aside. Coherent GT 1.7 will arrive in early December and will be more like a tank, not just a rifle.  An amphibious, flying tank that also transforms lead into gold and leaves a trail of unicorn fairy dust*.

The secret ingredient will be that Coherent GT 1.7 will feature a new, custom-built rendering engine with codename Renoir (after the French painter). This will bring many improvements to the rendering-side of the library. Stay tuned to learn more and if you have any questions leave a comment below, in the forums or on twitter!

* Neither fairies nor unicorns have been hurt while creating the release.

 

Social Shares

Related Articles

Leave a Comment