Brass Lantern
the adventure game web site

Search

Linux Text Adventure Interpreters, Page 3

by Stephen Granade

Table of Contents
• Introduction
• TADS
  • Unix TADS
  • Glk TADS
• Inform/Z Machine
  • XZip
  • Unix Frotz
• Hugo
  • Console Hugo
  • X Hugo
  • wxWindows Hugo
• Glulx
• AGT
• Alan

You have two options when it comes to TADS interpreters: the easier to compile yet not quite as nice plain-vanilla Unix interpreter, and the much nicer yet more complicated to compile Glk interpreter. Glk is a portable I/O library written by Andrew Plotkin which is well-suited for text adventure interpreters. I personally recommend you compile the Glk interpreter.

Unix TADS

To compile the Unix TADS interpreter, go to the tads2/unix directory. You will need to edit the makefile before you compile. Fire up your favorite text editor and open makefile. You will need to uncomment the lines under the Linux 386 with GCC 2.7.2 heading. Search for that string. Once you've found it, remove the # from every line under it starting with the CC line and ending with the MAKEXEC line.

Once you've done that, at the command line type make tadsr. This will compile the tadsr interpreter. Watch the pretty compile messages scroll past your window. If you get a bunch of errors right out of the gate, make sure that, if you got the standard source and not the Unixified source, you used the -aa flag when you unzipped it.

The make may crash and burn while trying to compile osunixt.o. If so, edit the osunixt.c file. Near the top of that file will be the line

/*#include <sys/time.h>         /* SRG ditto */

Remove the /* from the start of the line and type make tadsr again. The compile should proceed without trouble this time.

The end result: tadsr. Copy that file to whatever directory you want to keep it in, then either do a make clean to save the source code or delete the tads2 directory and all of the directories beneath it.

Glk TADS

Before you can compile GlkTADS, you have to download and compile the Glk library. Get the Glk library source from the Glk home page. Look for the Liberation heading; you want either the GlkTerm or the XGlk library, depending on whether you want to make a terminal interpreter or an X-windows interpreter. Download the appropriate library archive file into the tads2/glk directory.

Unpack the Glk archive you just downloaded. GlkTerm will create a glkterm directory, while XGlk will create an xglk directory. Change to the appropriate directory.

If you're using GlkTerm and you know that your terminal will support Latin-1 characters, then edit gtoption.h and remove the /* and the */ from in front of and behind the line

/* #define OPT_NATIVE_LATIN_1 */

If you're not sure whether your terminal supports Latin-1, try uncommenting this line. If in the end you see strange characters when you run TADS games, put the /* and */ back around that line and recompile.

With any luck you will be able to type make and have the appropriate Glk library created. If not, you will need to play with Makefile in ways beyond the scope of this document.

Once you've compiled the Glk library, go back to the tads2/glk directory. Now you'll have to edit the GlkTADS Makefile. Fire up your text editor and load Makefile. The first thing to do is uncomment the appropriate library section. For example, if you're using GlkTerm, find the part labelled

#
# GlkTerm
#

and remove the # from the lines below that label until the next blank line. (In the version that was most current when this guide was written, that means uncomment the GLKINCLUDEDIR, GLKLIBDIR, GLKMAKEFILE, GLKEXEFILE, and GLKFLAGS lines.)

Once you've done that, uncomment the appropriate operating system section. Find the part labelled

#
# Linux
#

If you're using Slackware, remove the # from in front of the first OSFLAGS line. If you're using Red Hat (or most any other distribution of Linux), remove the # from in front of the second OSFLAGS line. Then uncomment the OPTIMIZE and OSLIBS lines.

Close your text editor and at the command line type make. The result? tadsr, if you're using GlkTerm, or xtads, if you're using XGlk. Copy that program file to a safe place. If you want to keep all of the source code, type make clean in the tads2/glk and the Glk library directories to get rid of the extraneous files. Otherwise, delete the tads2 directory and everything beneath it after you've copied the program file.

(Note that, if you're going to compile Hugo, you might want to keep the Glk libraries around, as one version of the Hugo interpreter uses Glk libraries.)

Next | 1 | 2 | 3 | 4 | 5 | 6

About Us | Contact Us | Technical Info | History
Copyright © 1997-2010, Stephen Granade.