RogueBasin
Menu (Edit):
Contents:
  1. Language in Roguelikes

Language in Roguelikes


When I started playing Omega, I was just twelve years old, I couldnā€™t understand many things in it as Iā€™m Finnish and school English didnā€™t quite match the language in Omega. It was way too slangish and used terms that werenā€™t proper for school courses ;) So I picked all stuff up and my English grade went up like a rocket. Or could it have been that frantic watching of TV ?

Now I feel at home in Omega as I know the language. It even seems a bit too easy ;) But the most irritating thing in games today is that the same phrases come up again and again. You hit it! You hit it! Kobold is dead! You critically hit orc butcher! Orc butcher is dead! Something like that. Most of these sentences are really simple and stick to the same format. Subject does verb to object.

It doesnā€™t need to be this way. As lazy person as I am, I havenā€™t bothered to read too many sources for roguelike games. But what Iā€™ve seen has showed things like print(ā€œYou hitā€);print(mons_article); print(mons_name_short); Not too hard, easy enough to not be bothered. Still thatā€™s what gamer gets all the time. Itā€™s of course nice that experienced players get info just by examining structure of sentences or something as easy, it just requires a bit of playing ;)

With a proper interface, a game can be much more colorful. Here is a C++ show (of interface I think to be the best).

if(this!=player) msgbar << subjadj << this->damage_report();
msgbar << subj << this->simpleflags() | 0x20*map->isseen(this->x,this->y);
msgbar << verbadj << "critically" <<
verb << "hits";
msgbar << objadj << mons->damage_report();
msgbar << obj << mons->simpleflags() | 0x20*map->isseen(mons->x,mons->y);

when damaging a monster.

if(msgbar.isstop) return;
msgbar << cont << obj2subj;
msgbar << passive << but;
msgbar << verb << "protected";
msgbar << obj << "armor";
msgbar << stop;

The player would see a message like

  • You critically hit badly wounded orc but he was protected by his armor
  • You hit orc
  • You simply blast orc but he was protected by his armor
  • You strike it (blind)

And dozen of other choices.

This could be done by saving words to data structures with info about itā€™s meaning. When that sentence is asked, it would be built by an other function. That function could also drop words depending on verbose level, it could search for synonyms and even translate simple sentences quite easily.

Why would anyone do it in such a hard way ? You could just make a list of sentences and use them by index (if done cleverly this is a nice way). Or words too. Because this more modular, which helps it to be maintained and programmers donā€™t need to think about the language. It is left to translators and those with better language skills. And because it is just so damn fun to write such a tricky interface.

Of course this could be used in a dozen other games, especially sports games, but in roguelike games we have a pressing need for this. One should naturally have a mode of :

msgbar << sentence << "You hear a voice : Thank you for helping me. ";
msgbar << "Killing The Big Bad Monster was beyond my abilities but";
msgbar << "I can die in peace, come to me for reward." << stop;

Such sentences could be indexed and translated later. But they are quite easy to recognize and translate by a function, if needed.

Another thing could be languages in game. Like dwarf or elf speech.

msgbar << says_in_language << "Village elder says"
msgbar << "You are welcome to our village" << stop;

could be showed as

75% lang skill Village elder says :"You ar velkom to our villch"
50% lang skill Village elder says :"yu ar vlekm vil"
25% lang skill Village elder mumbles :"yu r vlkm vil"

and so on. In most languages, IMO, itā€™s easy to spot things that go amiss. Like those ā€˜eā€™ letters, they really can be hard to spot as are word ā€˜toā€™ also. Thatā€™s in English, in Finnish it might be the thing that itā€™s easy to get opposites like ā€œpankkiinā€ and ā€œpankistaā€ are in and out (of bank). And that words tend to be long and they are many times added to each other. The late word can be quite hard to spot, Iā€™d guess.

Now for more important matters ;) As of the 1st of March 2000 (today) I make public my intentions to make a roguelike game (ā€¦silence..) and Iā€™ve already written some code (very little) but I really would like to get in touch with some people that could help, either coding (I donā€™t have too much time) or just suggesting things. Iā€™ll call my game Unjust World Of Adventures. But the game isnā€™t all of it: Iā€™ll try to create the engine and basic world code to be used by anyone willing to make a roguelike game.

I develop using gcc(egcs) in a GNU/Linux system. All code is in C++ but it should work in any modern compiler environment (except curses and graphics).

Those interested should contact me, Iā€™ll send code (tar.bz2 or zip) in email (about 50Kbytes at the moment ;) or upload it someplace.

Copyright (C) 2000 Esa Ilari Vuokko. All rights reserved.

As far as law permits author (Esa Ilari Vuokko) canā€™t be held responsible of any use of this text. Anyone may publish unmodified text in electronic media without specific permission. Though I really appreciate notes.