On Designing a New Z-machine

Gareth Rees, January 1995

This topic turns up fairly frequently in the newsgroup rec.arts.int-fiction. A contributor points out that the design specification of Infocom's Z-machine has a number of limitations and that effort should therefore be directed towards developing either a new version of the Z-machine or a new virtual machine for running adventure games.

Suggestions for a new virtual machine have included:

The first proposed change results from imperfect understanding of the design of the Z-machine. The lack of a distinction between nouns and adjectives (thus allowing car red to be just as appropriate a noun phrase as red car in player input) is a design decision of the Inform parser, not of the compiler or the Z-machine. It should be possible to change the behaviour of a game just by changing the TryGivenObject() routine in Parser.h.

Some of the proposed changes appear to be more out of a concern for the quality of the design of the Z-machine than out of any actual need. A version 5 game is very large, with up to 50,000 words of text (a short novel!) and no limit on the numbers of objects, and the version 6 specification is twice that size. I'm not convinced that free or shareware games are pushing these limits yet (but I would love to be convinced otherwise!).

The remaining proposals (pen support and typesetting) are presentational (I note in passing that no-one is proposing that graphics capabilities should be added to a common virtual machine specification!). The problem with this sort of extension is that it quickly gets very messy. In his specification of the Z-machine, Graham Nelson writes:

By 1985 there were two basic pressures to change. One was that home computer were larger, and several fundamental restrictions [...] were beginning to bite. The other was the drive for more gimmicks [...] The former led to logical, easy to understand structural changes in the machine. The latter, in contrast, made a mess of the system of opcodes.

I think that a specification should include a description of 'minimal platform' on which games are to be run. Possibly this could be even more minimal than that required for the version 3 Z-machine to run (it might, for example, be no more than a terminal with text input and output, and not even the ability to draw a status line). Any features which could not be implemented on the minimal platform would be provided via some uniform 'escape' feature, which interpreters would be free to implement or ignore, depending on the platform. The idea would be that a single game file would contain fancy features, but could still be run (albeit without those features) on all machines.

Here's my personal wishlist for a virtual machine format:

 
 
(Scripts) NEXT
(Design and Analysis) PREV
(Writing index)   UP
  TOP
----------------------------------------  
 

Andrew Clover