I decided to play the classic interactive fiction game Zork, which is available as a Hugo re-write. Unfortunately, the gargoyle-free package for Ubuntu doesn’t have the (non-free) Hugo interpreter. Straight-up Gargoyle from github does, but it was a bit of a pain to compile.
PreReqs
This is what I think I had to install (from sudo apt install
) to get the current release (Gargoyle 2019.1.1) to compile. The source code comes in a tar.gz and the instructions have some hints for another distribution, but not Ubuntu.
I’m not positive that these are the packages I installed, or that you really need all of these, but here it goes:
- jam
- libsdl-sound1.2
- libsdl-sound1.2-dev
- libsdl2-dev
- libsdl-mixer-2.0-0
- libsdl-mixer-dev
- libfreetype-dev
- libjpeg-dev
Note: I have yet to encounter an IF game with sound, so editing the Jamrules file and changing USESDL to ‘no’ might save you some aggravation.
Tip: There’s a list of prereqs for Fedora in the INSTALL file, but the names don’t match Ubuntu’s. To find the Ubuntu equivalent for most of these, it helps to do sudo apt-cache search XXXX
for the name and pipe that into grep, searching for ‘dev’ (most of the prereqs listed are -devel packages).
Example: The INSTALL file lists ‘freetype-devel’ as a prerequisite, so doing:
sudo apt-cache search freetype | grep dev
returns ‘libfreetype-dev’ as one of the options.
Compiling
There’s an issue a ran into compiling on another machine. Compiling seemed to go fine, but then running the gargoyle binary resulted in an error message about not being able to find a labgarglk.so file that was in the same directory.
I guess I maybe found a solution some time ago (on another machine) that you might try. That’s what the -s "LD_LIBRARY_PATH=."
is for. It tries to get the binary to look in the current directory. This shouldn’t be necessary once you move the libgarglk.so file to the right place, so it’s optional.
jam -s "LD_LIBRARY_PATH=."
jam install
./build/dist/gargoyle
The first command builds the binaries (see note above about the LD_LIBRARY_PATH). The second one copies them to ./build/dist/. And the last one, of course, tries to execute the new binary.
It’ll probably look like it failed
If gargoyle fails to run, complaining about not finding libgarglk.so (which is in the same build/dist directory), then you can try setting the LD_LIBRARY_PATH to ‘.’ and export, then try again, or copy garglk.ini to /usr/local/lib
and see if that fixes it.
This seems to be a quirk that isn’t much advertised, but I guess I found something about it in the Issues section of their github page. This was very frustrating for me the first time around. Everything had compiled correctly, but by all appearances, it was broken. 😡
Install
Make a directory on /usr/local
to hold the contents of build/dist
. Then copy them over.
sudo mkdir -p /usr/local/libexec/gargoyle
sudo cp build/dist/* /usr/local/libexec/gargoyle/
Now symlink the gargoyle executable and the libgarglk.so library to where the OS will find them.
sudo ln -s /usr/local/libexec/gargoyle/gargoyle /usr/local/bin/gargoyle
sudo ln -s /usr/local/libexec/gargoyle/libgarglk.so /usr/lib/libgarglk.so
And one last step: Put the default garglk.ini in /etc/.
sudo cp garglk/garglk.ini /etc/garglk.ini
Zork
Zork is one of those classics of Interactive Fiction that… well I’m not sure it’s a classic. It’s old and it gets mentioned a lot, so I figured it was either pretty popular when it came out, or very influential, or both. I really didn’t know much about it, but I wanted to try it out.
I have an old Samsung NC10 that I got for $25 off of Craigslist and it’s still hanging in there. It’s pretty ideal for playing IF because it’s a good compact size and these games don’t require a lot of power or a big screen. The bad news is that it’s got a 32bit processor, so if the old Ubuntu repositories don’t have something, I often have to compile from source.