Play Zork and Other Zmachine Files on Linux.
by Computothought in Living > Video Games
9669 Views, 6 Favorites, 0 Comments
Play Zork and Other Zmachine Files on Linux.
Sort of miss the old text adventures where you were allowed to use your imagination. This instructable uses what is known as the zmachine. There are a ton of zmachine games out there. Just use your web search engine to find them. In this case I will at least get you a zork starter file.
Get the Zmachine Source Code and Games:
You need to go to http://www.eblong.com/zarf/xzip.html and download the source code.
To get some games go to http://www.ifarchive.org/indexes/if-archiveXgamesXzcode.html .
To get some games go to http://www.ifarchive.org/indexes/if-archiveXgamesXzcode.html .
Downloads
Compiling the Code.
You need to install the c development system for your version of Linux. It varies from distro to distro.
Extract the files.
$ tar zxvf xzip182.tar.Z
change to the source directory
$ cd xzip
Edit Makefile
$ nano Makefile
You will need to uncomment three lines. Scroll down to where you see your linux distro.
Uncomment "SYSTEMFLAGS = -DAUTO_END_MODE"
Uncomment the last two lines for your version of linux (i used redhat for fedora).
Save your work and exit.
Now we need to compile the code.
$ make
The we need to install it.
$ sudo make install
$ sudo install -s xzip /usr/local/bin
$ sudo install xzip.1 /usr/local/man/man1
That should be it if all went well.
Extract the files.
$ tar zxvf xzip182.tar.Z
change to the source directory
$ cd xzip
Edit Makefile
$ nano Makefile
You will need to uncomment three lines. Scroll down to where you see your linux distro.
Uncomment "SYSTEMFLAGS = -DAUTO_END_MODE"
Uncomment the last two lines for your version of linux (i used redhat for fedora).
Save your work and exit.
Now we need to compile the code.
$ make
The we need to install it.
$ sudo make install
$ sudo install -s xzip /usr/local/bin
$ sudo install xzip.1 /usr/local/man/man1
That should be it if all went well.
If you want to avoid all the compiling you could just check your repo to seeif it has frotz or xzip.
Debian based:
frotz - interpreter of Z-code story-files
gargoyle-free - graphical player for Interactive Fiction games
xzip - Interpreter of Infocom-format story-files
$ sudo apt-get install frotz
Fedora based:
frotz.i686 : Interpreter for Infocom and other Z-machine games
$ sudo yum install frotz
FROTZ V2.43 curses interface.
An interpreter for all Infocom and other Z-Machine games.
Complies with standard 1.0 of Graham Nelson's specification.
Syntax: frotz [options] story-file
-a watch attribute setting -O watch object locating
-A watch attribute testing -p plain ASCII output only
-b # background color -P alter piracy opcode
-c # context lines -r # right margin
-d disable color -q quiet (disable sound effects)
-e enable sound -Q use old-style save format
-f # foreground color -s # random number seed value
-F Force color mode -S # transscript width
-h # screen height -t set Tandy bit
-i ignore fatal errors -u # slots for multiple undo
-l # left margin -w # screen width
-o watch object movement -x expand abbreviations g/x/z
-Z # error checking mode (default = 1)
0 = don't report errors 1 = report first error
2 = report all errors 3 = exit after any error
Debian based:
frotz - interpreter of Z-code story-files
gargoyle-free - graphical player for Interactive Fiction games
xzip - Interpreter of Infocom-format story-files
$ sudo apt-get install frotz
Fedora based:
frotz.i686 : Interpreter for Infocom and other Z-machine games
$ sudo yum install frotz
FROTZ V2.43 curses interface.
An interpreter for all Infocom and other Z-Machine games.
Complies with standard 1.0 of Graham Nelson's specification.
Syntax: frotz [options] story-file
-a watch attribute setting -O watch object locating
-A watch attribute testing -p plain ASCII output only
-b # background color -P alter piracy opcode
-c # context lines -r # right margin
-d disable color -q quiet (disable sound effects)
-e enable sound -Q use old-style save format
-f # foreground color -s # random number seed value
-F Force color mode -S # transscript width
-h # screen height -t set Tandy bit
-i ignore fatal errors -u # slots for multiple undo
-l # left margin -w # screen width
-o watch object movement -x expand abbreviations g/x/z
-Z # error checking mode (default = 1)
0 = don't report errors 1 = report first error
2 = report all errors 3 = exit after any error
Running From the Command Line.
usage: xzip [options...] story-file
or
You can get help with:
$ xzip -help
usage: xzip [options...] story-file
XZip - a Z-machine interpreter.
Version 1.8.2 by Andrew Plotkin (erkyrath@eblong.com).
Based on ZIP Version 2.0 by Mark Howell.
Plays Z-machine files of versions 1-5 and version 8.
-help: display full list of options
-bindings
-geometry
-statgeometry
-inputstyle
-marginx
-leading
-justify
-autoresize
-autoclear
-history
-buffer
-background
-foreground
-greycolor
-resizeupward
-strictz
-spec
-XXX-color
-XXX-font
(for XXX in n, r, b, rb, i, ri, bi, rbi, f, rf, bf, rbf, if, rif, bif, rbif)
or
You can get help with:
$ xzip -help
usage: xzip [options...] story-file
XZip - a Z-machine interpreter.
Version 1.8.2 by Andrew Plotkin (erkyrath@eblong.com).
Based on ZIP Version 2.0 by Mark Howell.
Plays Z-machine files of versions 1-5 and version 8.
-help: display full list of options
-bindings
-geometry
-statgeometry
-inputstyle
-marginx
-leading
-justify
-autoresize
-autoclear
-history
-buffer
-background
-foreground
-greycolor
-resizeupward
-strictz
-spec
-XXX-color
-XXX-font
(for XXX in n, r, b, rb, i, ri, bi, rbi, f, rf, bf, rbf, if, rif, bif, rbif)
Making a Gui Loader.
You will need to create a shell file called xzip.sh
xzip.sh
[code]
szAnswer=$(zenity --file-selection --title="Select a file to run")
xzip $szAnswer
[/code]
Then, you need to copy the file to the desktop if you are running lxde, otherwise you need to make an applet.
To start the program double click the applet and choose the file to run.
That's it!
xzip.sh
[code]
szAnswer=$(zenity --file-selection --title="Select a file to run")
xzip $szAnswer
[/code]
Then, you need to copy the file to the desktop if you are running lxde, otherwise you need to make an applet.
To start the program double click the applet and choose the file to run.
That's it!