Saturday 28 December 2019

A Hös Lovag: An Early Hungarian Text Adventure in BASIC


The author of the Rosetta Interactive Fiction blog writes (translation from Hungarian courtesy of Chrome):
In 1986, the Hungarian translation of the book: The Adventures of Writing an Adventure Program - or How to Write an Adventure Program on a School Computer in the BASIC Language (Technical Publisher,Budapest), author F. DaCosta. (We've been guessing for a long time what the "F" is ... I just found out that it is "Frank.") Frank DaCosta's work (the original English edition) was published in 1982 by TAB Books Inc. under the title Writing BASIC Adventure Programs for the TRS-80. (or other sources according to the McGraw-Hill School Education Group) and is still available at Amazon along with the writer's other book of 1979 (How To Build Your Own Working Robot Pet - to my knowledge, has not been translated into Hungarian). The original book is still available today in PDF form.
The Rosetta Interactive Fiction blogger continues:
The Hungarian appearance of the book roughly coincides with the beginning of the advent of literary adventure writing in Hungary as a kind of "popular movement." It's only roughly because the first (documented) works came sooner: In '84 the English language Eureka! (Domark-Andromeda-Novotrade), and in '85 some Hungarian-language programs (games by Miklós Tihor, András Laczi and István Rátkai). So it wasn't the book that started the movement-- but it undoubtedly had a very strong impact on it (and in many ways was seminal).
The first two commercial adventure games (both already on the domestic retail market), launched by Novotrade Rt. In '86 (both on the official school computer Plus / 4 and C16, respectively) were already having an effect. The Treasure Hunter game used a version of  imperative expression imposed by Peter Ban the translator, which was simply a direct translation of the English sentence structure. Luckily this rather stilted way of presenting hungarian did not catch on; although it was used in another game called A Hös Lovag (Hero Knight). The author's explanation of the format in the manual for that game tells it all:
"You have to know that this type of game also comes from English, where the structure of the language is particularly suited to adventure games: the imperative expression is the same as the infinitive expression you find in the dictionary. This is not the case in Hungarian-- in our case, the imperative has a special expression that the program does not understand. Therefore, the player can only chat with the machine in a specific, terrible form of the Hungarian language.
For example, if the hero knight feels his power is low but he has bread, we don't have to type EAT BREAD, but EAT BREAD. It needs to be worded as if expressed by someone who is just beginning to study and speak our mother tongue... Over time, this type of program may be able to use correct Hungarian and recognize the suffixes, but for the time being it can only process the vocabulary of words. This is an unfortunate circumstance, but the game may be so interesting that we can forgive this handicap."
It is intriguing to consider the complexities of language that the translated phrase "EAT BREAD, but EAT BREAD" obscures. Hungarian is an agglutinative language, which uses many word prefixes and suffixes to express subtle details of meaning and grammatical structure. Check out this neat video about the language by Langfocus. Certainly when I would put sentences into Google translate you would get nothing but word salad back. For example "hiaba van kardod, egy eleteros sarkany" produced "hiaba you have a sword, a misfit stub."  I eventually translated this as "YOU HAVE A SWORD, BUT YOUR ATTACK IS IN VAIN!"  I was greatly aided in this task by my son Charlie, who showed me the trick of separating each word onto its own line, or of leaving certain words together on a line, to get different suggestions of meaning from Google.

I have now completed an English language version of this interesting early Hungarian text adventure. The following video provides a complete walkthrough, so beware of spoilers:


I want to thank the author of the Rosetta Interactive Fiction blog for making me aware of this program and with sharing his thoughts on the challenges faced by early Hungarian BASIC programmers. I also appreciate his discussion of the DaCosta book and hope in the near future to try creating a working copy of its example program "Mazies and Crazies."  There doesn't seem to be a working copy in any of the TRS-80 program databases that I am aware of.  This is a shame, as  DaCosta's book seems to have had a significant influence on early BASIC programming in a number of countries.
Screenshot of C16 game

Walkthrough for A Hos Lovag (Hero Knight) English Language version by Jim Gerrie 2019

GET STAFF, GET BREAD
LEAVE,E
GET STONE
E,JUMP,N
KILL SPIDER
S,E,S,W,W
PULL MAN
E,S,E,S,W
GET SHOVEL
E,S,S,ENTER
PLAY FLUTE
GET FLASK
LEAVE,N,E,E
DIG
GET CHEST
UNLOCK CHEST,GET GOLD
W,N,N,LEAVE,E
GET BIRD
UP
DROP BIRD
DOWN,E
BUY SWORD
N,E
GIVE BREAD
LEAVE,S,E,S
THROW STONE
E
WEAR RING
UP,E
MOVE ROCK
W,S
WEAR ARMOUR
E
KILL DRAGON
USE FLASK
E,S,W,N,W,N,UP


The following are some translations of the verbs:

10000 data e,d,k,ny,fel,le  ,be   ,ki   ,fog ,felvesz,dob  ,letesz,l,lista ,n,nez ,v,vizsgal,huz
10000 DATA N,S,E,W ,UP ,DOWN,ENTER,LEAVE,TAKE,GET    ,THROW,DROP  ,I,INVENT,L,LOOK,V,EXAMINE,PULL


10010 data eszik,%,maszik,visel,hord,vag,nyit  ,zar ,nyom  ,felad,szol ,mond,as
10010 DATA EAT,   ,CLIMB ,WEAR ,DON ,CUT,UNLOCK,LOCK,SEARCH,QUIT ,SPEAK,SAY ,DIG


10020 data fuj ,ol  ,ut  ,hasznal,megment,ad  ,vesz,mozdit,lok ,ugrik
10020 DATA BLOW,KILL,BEAT,USE    ,SAVE   ,GIVE,BUY ,MOVE  ,PUSH,JUMP


10050 data bot  ,pogacsa,ko   ,gyuru,sip  ,kulcs,ladiko,arany,aso   ,eletviz,kard ,pancel,szikla
10050 DATA STAFF,BREAD  ,STONE,RING ,FLUTE,KEY  ,CHEST ,GOLD ,SHOVEL,FLASK  ,SWORD,ARMOUR,ROCK

10060 data kismadarka,fuldoklo,fa  ,boszorkany,utonallo,sarkany,pok   ,kiralylany
10060 DATA BIRD      ,MAN     ,TREE,WITCH     ,ROGUE   ,DRAGON ,SPIDER,PRINCESS