June 15, 2004

Take Off Every Zag

by Nick Montfort · , 1:51 pm

For great justice, a new version of the Zag Glulx interpreter is now available. Zag is written in Java and has done a lot to ease this Mac user’s Glulx woes. It’ll let you run large, multimedia IF pieces such as Narcolepsy and Lock & Key (found on Adam’s IF Page), City of Secrets, and El extraño caso de Randolph Dwight.

One Response to “Take Off Every Zag”

  1. Michael Says:

    I’ve been using Zag on both the PC and Mac for some Glulx work I’m doing. I’ll write more about this in a future post, but one of my students, Ari Lamstein, and I are experimenting with hooking a search-based drama manager to an IF piece. We’re using Michael Gentry’s Anchorhead – Michael was kind enough to give us the Inform source for our research. I recently finished porting Anchorhead to Glulx, both because it is so large that the additional content we’ll be adding would make it too large for the Z-machine and because Glulx’s support for file I/O can serve as a poor man’s inter-process communication mechanism for connecting an inform IF to an external AI engine. Actually, even as is the Anchorhead source was to big to compile under inform – I’m not sure how Michael ever got it to build for the Z-machine in the first place. The port was a relatively painful process – the standard libraries had been rather extensively modified for Anchorhead, so I couldn’t just use the bi-platform libraries. Instead I had to manually merge the bi-platform libraries with the several-year-old and customized inform libraries, switch menuing libraries (the one he was using, menus.h, uses Z-machine opcodes for screen manipulation), of course change all the style code (more nasty Z-machine opcodes), and figure out how to use the file I/O routines (the crucial but undocumented ChangeAnyToCString() – thanks to Adam Cadre for his Gull manual that put me on the right track, though he incorrectly calls the function ConvertAnyToCString(), which had me going for a little while). But now I finally have a Glulx Anchorhead that does some file I/O in the main loop to allow an external process to talk to it. Whew.

    Of course the real solution for inter-process communication is modifying Glulx to support generalized stream I/O, including sockets. But that is also a topic for another post. Fortunately, the frequency of drama manager interactions is low enough that file I/O will work for this.

Powered by WordPress