About zphp
zphp is a re-implementation of the
Z-machine written in
PHP (5.3 or later). It is Z-code interpreter, or a
virtual machine, for the old text adventure games by
Infocom and also a few
non-commercial games.
It only supports
Z-code
version 3 games (now usually found with file extension .z3
but
originally had .DAT
or .ZIP
). There are many more games that are
in version 5 or newer format and games has been re-released with a
newer interpreter.
Z-code version 5 support should not be that hard to add in zphp. It
was originally planned but I will probably never get around to
actually implement it. And I have absolute no plans to support
anything beyond version 5. Use some other interpreter which there are
plenty.
The zcli.php
uses the tput
command to find out the size and some
control codes for the terminal/console. This means it will probably
not work on a Windows system without Cygwin or some other Unix-like
enviroment (Microsoft used to have the
SFU and now
they have an Ubuntu enviroment for Windows 10.) Anyways, use php zcli.php story.z3
to start a game.
License
zphp is released under the
GNU General Public License, version 2.
Supported Games
A near-complete list of games that should be playable (I haven't
completed any of them):
- Adventure aka Colossal Cave (Jesse McGrew, 2015)
- Ballyhoo (Infocom, 1986)
- Catseye (Dave Bernazzani, 2004)
- Curses (Graham Nelson, 1993)
- Cutthroats (Infocom, 1984)
- Deadline (Infocom, 1982)
- Deja Vu (Graham Nelson, 1993)
- Enchanter (Infocom, 1983)
- Guss's Death (Kyle Frownfelter, 2004)
- The Hitchhiker's Guide to the Galaxy (Infocom, 1984)
- Hollywood Hijinx (Infocom, 1987)
- Infidel (Infocom, 1983)
- Leather Goddesses of Phobos (Infocom, 1986)
- The Lurking Horror (Infocom, 1987)
- Mini-Zork (Infocom, 1988)
- Moonglow (Dave Bernazzani, 2004)
- Moonmist (Infocom, 1986)
- Planetfall (Infocom, 1983)
- Plundered Hearts (Infocom, 1987)
- Seastalker (Infocom 1984)
- Sorcerer (Infocom, 1984)
- Spellbreaker (Infocom, 1985)
- Starcross (Infocom, 1982)
- Stationfall (Infocom, 1987)
- Suspect (Infocom, 1984)
- Suspended (Infocom, 1983)
- Wishbringer (Infocom, 1985)
- The Witness (Infocom, 1983)
- Zork I (Infocom, 1980)
- Zork II (Infocom, 1981)
- Zork III (Infocom, 1982)
Some of these games have been re-released in a newer Z-code versions
which are not supported by zphp.
It not uncommon for games to require a leaflet that came in the box to
be able to complete them. Luckily there are scans and photos of most
of the boxes and accessories online.... as well as walk–through
guides.
If you want to test this but do not have any of the games, the
original Zork trilogy
seems to be legally available for download. You only need the story
files DATA/ZORK{1,2,3}.DAT
from those zip archives.
Screenshots
ZORK I: The Great Underground Empire
ZORK II: The Wizard of Frobozz
ZORK III: The Dungeon Master