Z-machine

from Wikipedia, the free encyclopedia

The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank in 1979 and used by Infocom for their text adventures .

technology

The Z-machine was a program that was created once for a platform and that interpreted a platform-independent game file and took care of the inputs and outputs on the respective platform. For the creation of a new game, only the respective game file had to be created; the Z-machine, which was already created for these computers, took care of the display on any computer. In view of the large number of incompatible home computer systems at the time , this represented a great advantage over programs created directly for the respective computer platform. The programmers succeeded in structuring the company's games in such a way that all game-specific content was saved in a file and were read from this. Since the non-commercial Z-machine revival of the 1990s (triggered by Graham Nelson's Inform compiler and his first published game, Curses ), the names of files with Z-code mostly have the file extensions .z1 , .z2 , .z3 , .z4 , .z5 , .z6 , .z7 or .z8 ., where the number denotes the version number of the Z-machine for which the file is intended. Versions 7 and 8 are by Graham Nelson . At the time of Incocom, the extensions .dat ( data , in contrast to the native executable file with the interpreter) and .zip (ZIP = Z-machine Interpreter Program ) were common for file names on systems that used file extensions . Today, however, the latter collides with the widespread use of this file extension for PKZIP -compatible archive files.

The game files were created in the ZIL ( Zork Implementation Language ) programming language developed by Infocom , which was based on the MDL language developed at MIT .

history

The "Z" in Z-machine stands for Zork , Infocom's first adventure game. Infocom created six versions of the Z-machine itself. Only two files from Infocom are known of the first two versions. The later versions had more options, with the sixth version even having graphics support. The compiler that Infocom used to create their story files ( called Zilch ) was never published, even if the documentation for the language used ( ZIL for Zork Implementation Language ) still exists. In May 1993, Graham Nelson finally published the first version of his Inform compiler, which also generates Z-machine files. It was also he who created a Z-machine standard during the 1990s after a detailed analysis of the existing Infocom files. The underlying programming language Inform is, however, significantly different from ZIL.

In the meantime, Inform has become very popular in the interactive fiction community, so that a large part of the interactive fiction is now created as story files for the Z-machine. The desire to be able to create larger and larger game files prompted Graham Nelson to create versions 7 and 8 of the Z-machine, although version 7 is rarely used. Due to the way addresses are used, Story Files for version 3 were limited to 128 KB in size. Version 5 already allowed a size of 256 KB, and version 8 even allows story files with sizes up to 512 KB. These sizes may appear small in view of today's conditions in the computer game sector, but in the case of text adventures they are sufficient even when creating very large games.

interpreter

Today there are Z-code interpreters for a wide variety of computer platforms . Popular interpreters are Nitfol and Frotz , as well as Text Fiction for Android.

Nitfol

Nitfol uses the GLK programming interface and supports versions 1 to 8 of the Z-machine, including the graphical version 6. Scores are saved in Quetzal format. Binary files currently exist for a wide variety of operating systems, including Macintosh, Linux, MS-DOS, and Windows.

Frotz

Frotz on an iPhone with the game Zork

Frotz is another implementation of the Z-machine and perhaps the best known and most popular. Frotz is one of the earliest (though not the first) implementations not made by Infocom. The first version - published by Stefan Jokisch - dates back to 1995. Frotz was created in the easily portable C programming language , which enables the original DOS version to be ported to most modern computer systems, including not just Unix and Windows, but even palmtops and cell phones. Various enhancements have since been added, including those for sound effects and graphics.

In 2002 David Griffith took over responsibility for the basic Frotz code. At that time, the code base was clearly separated between the code for the virtual machine and that for the user interface . This made the virtual machine completely independent of the user interface, which enabled some of Frotz's fancier ports to be programmed. This includes one in which a Frotz version is surrounded by an instant messenger , so that most Z-machine games can now be played with an instant messenger.

Text fiction

Text Fiction is a popular implementation of the Z-Machine for Android. Its special features include an operating concept that is based on known instant messenger apps, as well as the ability to build commands using verb icons and copy & paste, so that the keyboard can largely be dispensed with.

Web links

Individual evidence

  1. Nick Montfort: Twisty Little Passages - An Approach to Interactive Fiction . The MIT Press, Cambridge 2003, ISBN 0-262-13436-5 , pp. 127 .