Z-machine/Infocom interpreter in Python?

Erik Max Francis max at alcyone.com
Wed Jul 10 16:31:46 EDT 2002


[Including comp.lang.python in newsgroups one last time, since this
still involves Python; followups to rec.arts.int-fiction only.]

Andrew Plotkin wrote:

> There was a Perl Z-code interpreter. I don't see it on the Archive,
> but do a web search under "Rezrov". I believe it's written to be a
> normal application, not a chat plug-in, but converting it might be
> easier than converting a C application.

Right, a Perl buddy of mine is looking into that one.  Evidently it's a
fairly general library so it would probably do the job on the Perl side.

> I don't recall a Python interpreter. I'm in favor of one, though. :)
>
> Then there's Floyd, the bot who hangs out on IFMud and does more or
> less this job. I'm not sure what he's written in. I suspect pipes and
> hackery are involved.

Right.  That is certainly feasible, but it isn't elegant and would be a
headache.  I was hoping for a pure Python solution so that I can just
"make it go."  I might end up writing my own, though as indicated I'd
only be concerned with the barest minimum of implementation.

> Z5 and Z8 are what you're looking for. Z6 was the graphics-supporting
> version. (Z8 is not graphical; it's a minor variant of Z5 with a
> different memory map, so most interpreters that support 5 also support
> 8.)

I read the Z machine specification last night.  It's pretty
straightforward; it looks like the biggest roadblock is going to be
maintaining compatibility with multiple versions of the Z machine.  z5
and z8 would be obvious targets, although since I'm interested in the
ability to play legacy Infocom games as well, it looks like I'm going to
need z3 support, and maybe z4 or even z2.  z1 is so ancient it doesn't
seem necessary, and z6 is the graphics stuff I don't want.  So should a
first run target z2, z3, z4, z5, and z8?  Does that sound right?

> The status line would have to be dealt with specially. The simplest
> plan is to have the system intercept a particular command ("$STATUS"
> maybe) and dump the status window.

Right, there would have to be some out-of-band solution to get at the
status line; it wouldn't be a normal part of the back and forth with the
game client.  Seems relatively straightforward, anyway.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ See the son in your bad day / Smell the flowers in the valley
\__/ Chante Moore
    Bosskey.net: Aliens vs. Predator 2 / http://www.bosskey.net/avp2/
 A personal guide to Aliens vs. Predator 2.



More information about the Python-list mailing list