Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!Dortmund.Germany.EU.net!Germany.EU.net!wizard.pn.com!brighton.openmarket.com!decwrl!spool.mu.edu!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: Inform/Zmachine thoughts
Message-ID: <erkyrathDyItFJ.5zo@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <VA.00000009.000adcbd@104312.2206>  <erkyrathDyCJvx.Hyq@netcom.com> <VA.0000000a.0031fbde@104312.2206> <baf.844033911@max.tiac.net>
Date: Mon, 30 Sep 1996 00:59:42 GMT
Lines: 44
Sender: erkyrath@netcom20.netcom.com

Carl Muckenhoupt (baf@max.tiac.net) wrote:

> All this talk about save formats got me thinking:
> There is actually some merit to saving games in straight
> Z-code format (.z5, .z8, and so on.)
> That is, the saved game would be another Z-file whose
> initial state is the state of the saved game.
> The merits are these:
> It's platform-independent.
> Any Z-code interpreter can read it.
> Don't need the original game file to play.
> Greater efficiency - no need to load the initial state
> *and* your saved game.

The save files would be pretty monstrous, though. 

> Greater integration with Win95-like user interfaces:
> open saved games directly from the desktop.

What, like MaxZip does already? :-)

(Only if you create a standalone game, though. Hm. I could make it work 
for non-stand-alone games, yes. Some other month.)

> Now, how possible is this?  I can easily imagine some
> quirk of the Z-machine that makes the initial state
> special in some way.  (How does "RESTART" work, for
> example?)

You've got it. RESTART works by going back to the original story file and 
re-loading it. If the save file is living on its own, there is nothing to 
go back to, and you can't restart.

Also, a game file doesn't include a stack, because the Z-machine always 
starts up with an empty stack. But when you execute a @save opcode, 
you're inside a function; there is stuff on the stack, whch it's 
necessary to save.

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
