Hobbit, the true story in python

/* Updated on 26/01/2026 : programme runs on Linux directly from the shell */

I’ve recently come accross an original game named Hobbit, the true story. This game was released in 1993 and updated in 2001. The original aspect of the game is that it was written in MS-DOS batch, which is a rather unpleasant script-shell langage.

You can find information about Hobbit, the true story on IFDB and also on Tolkien Gateway.

The game is fun as it is a parody of « The Hobbit« , the book byTolkien. I have made a port of the game in Python, so it can be easily played on any modern computer, regardless of the operating system.

The original MS-DOS version was created by Fredrik Ramsberg and Johan Berntsson and this programme is an unofficial port. I release it as a free software under the GNU General Public Lincense, as published by the Free Software Fondation. I hope the creators of the original game will agree with this, since my port is intended as tribute to their work.

First, you need to download the programme, which consists of a single python file available below:

Once downloaded, extract the python file :

If you are using Linux, make sure the file has execution rights:

Then launch the game:

Execution of the programme requires Python 3.

On Windows, start the game as follows:

Now you can play!

Hobbit the true story is a very small adventure and is quite easy to solve. However, if you get stuck, here are some general hints :

  • You need the torch and the map.
  • You can find both at home, and Gandalf will hand over the map to you if you ask him.
  • You also need the sword to cut Smaug’s cigar. You can find it in the cave north of the Troll’s clearing. They won’t let you pass unless you wait until sunset (they don’t like sunshine).
  • From there, go to the forest north of Rivendell, and use the raft to reeach Smaug’s den. Smaug will happily give you his treasure if you help him with his cigar.
  • Then go back home, and the adventure is complete.

Have fun!

Tays house adventure deciphered

The Calormen website provides an online Applesoft BASIC emulator developed in javascript. You can enter or upload your code into the emulator and run it immediately, without needing to install an emulator on your PC. The website also offers many examples of Applesoft BASIC source code, including games and graphic demos.

Among these programs, I found a text adventure game called Tays House Adventure, developed by Floyd McWilliams. The goal is to find treasures while avoiding traps in the house of your obviously mad Uncle Tays. While the concept itself is not very original, what really caught my attention was the way the BASIC program was written; all character strings are encrypted, preventing a hacker – or a curious player – from inspecting the source code to crack the game.

For example :

To better understand how the game works, I wrote a Python program that decrypts all the character strings and outputs a BASIC program in which everything is readable. The goal is to obtain a clean Applesoft BASIC program with no encrypted data.

Continuer la lecture de « Tays house adventure deciphered »

Assistant de traduction de jeux en BASIC

Un seul programme, plusieurs langues

J’aime les jeux d’aventures programmés en BASIC, en langue anglaise et en langue française. Il y a quelques temps, j’ai eu pour projet de traduire « The treasure of Elgon » en français. Mais c’est fastidieux, le texte à traduire étant noyé dans les instructions du BASIC.

J’ai donc développé un outil d’assistance à la traduction. Ce dernier, écrit en Python, va lire chaque ligne du programme BASIC, en extraire le texte (i.e. les caractères entre guillemets) et l’écrire dans un fichier. Celui-ci peut ensuite être traduit, soit à la main, soit en utilisant un site de traduction en ligne tel que DeepL ou Google Translate.

Une fois la traduction effectuée, le fichier peut être réintroduit dans le programme BASIC initial et l’on obtient ainsi un programme fonctionnel dans la langue cible.

Continuer la lecture de « Assistant de traduction de jeux en BASIC »

Un jeu d’aventure bien aligné ou justifié

Il est important de bien soigner la présentation de vos jeux d’aventures. Si vous n’y prenez garde, vous risquez de retrouver cela :

Une présentation bof, qui n’incite pas à poursuivre l’aventure.

Pas très lisible, n’est-ce pas ? (on peut même dire que c’est moche). Les mots sont coupés au delà de la 40ème colonne, sans tenir compte des règles usuelles de présentations des documents.

Dans cet article, nous allons voir comment afficher un texte avec un alignement à gauche, sans couper les mots, ou un alignement justifié. Avec une subroutine en BASIC !

Continuer la lecture de « Un jeu d’aventure bien aligné ou justifié »

Traducteur d’instructions graphiques du langage BASIC

Dans les années 80, le langage BASIC a donné lieu à d’innombrables dialectes, chaque machine étant livrée avec son propre « BASIC » et ses particularités. Les instructions les plus courantes sont en général standardisées (PRINT, INPUT, LET, IF…THEN, FOR…NEXT, GOTO, GOSUB) mais il en va tout autrement pour les instructions graphiques. Les modes graphiques sont également très variables d’une machine à l’autre, que ce soit le nombre de couleurs ou la définition de l’image.

Continuer la lecture de « Traducteur d’instructions graphiques du langage BASIC »