Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Commands with special characters not working

A topic by komarcell created Dec 08, 2023 Views: 366 Replies: 8
Viewing posts 1 to 3

Hi,

I'm currently translating the game into Hungarian, however during testing none of the commands that have special characters (i.e. vowels with diacritics, such as áéóöőúüű) seem to work. For instance, I translated prega (pray) as imádkozz and the command broke. Or during movement, north and south are broken, because in Hungarian the words include special characters (észak (north), dél (south)).

Could it be an encoding issue with Javascipt? Diacritics do appear correctly when displayed in the text.

If I change the commands to not include any special characters, then they resume working, but I would rather find a different solution, as letters without diacritics can be hard to read in Hungarian. Does anyone know what might cause this issue or how it might be solved?

I'm kind of new to localizing so thanks in advance :))

We will think about it, but the simple solution is to write the internal command logic WITHOUT the accents.

1) Externally, the engine doesn't parse accents in the input. Both imádkozz and imadkozz are read  as imadkozz.
2) Internally, the engine cannot work with accented commands. As you rightly say, a command instruction written with imádkozz will just not work.

But since the engine can display accents without trouble (and can ignore them in input like we said), it's just a matter of avoiding accented letters in the internal logic and the whole thing is transparent for users. Just keep in mind that you can't have two commands differentiated by accents, since internally they are the same.

(If you are wondering why this quirk: it's an historical artifact of the Apple II not having accented letters at all. When Federico recreated the original game in Javascript, he kept it for fidelity -his Italian doesn't use accented letters either-)


I see, thank you so much for the detailed reply!

(1 edit)

Hey there!

I'm having a similar issue, but it is when typing the words. I understand the engine doesn't differentiate the accents, but whenever I try to type them I get these ominous DEAD or META inputs before the letters with accents, which I imagine would be very confusing to the player trying to type with accents.

Is this normal? Does this happen to everyone?


Is this normal? Does this happen to everyone?

Yes, due to the way input in handled, one key at a time, which means that it detects when you press the “next letter needs an accent mark” key (i.e., the so-called “dead keys”), and it shows its name without  waiting for the next letter.

If you want, you can filter out these keys in line 275 of IFEngine/js/CRT.js, however the game’s license forbids modifications to its code, therefore i would avoid it.

Indeed, that is the system trying to input "dead key" and "meta key" and the game engine not knowing what to do with them, since those keys didn't exist in 1982. I will warn Federico but I doubt this will be fixed.

(1 edit)

Hi @Rafagam, Thank you for the issue report. W e're fixing all. We'll release a patched version soon. :)

Hi Federico! I noticed a bug in the game. According to the map of the game, to the west of the dining hall you should find the kitchen, however the text that appears is for the vegetable pantry. Also, if you try to look at the stains, that you are supposed to see in the pantry, the game says that you don't see any, whereas if you tell it to look at the kitchen, the command works. This screenshot explains it better:


Hi @komarcell!

Thank you for the report, The problem is in AvventuraNelCastelloJS.js where the description pointed at the wrong i18n.js key. My fault.  I've fixed in the upcoming version that will be released soon.

:)