As one of the Kickstarter rewards for Colossal Cave: The Board Game, I’ve committed to distributing “Adventure-on-a-USB-stick”: a USB stick with versions of Adventure playable on “all major operating systems.” And it’s getting closer and closer to the time when I have to actually deliver this thing.
So, can anyone recommend an interpreter for .z5/.z8 files that has a “nice” user experience, and also that is freely distributable? (GPL would be okay.)
My hope is that I find something that fits in with the look-and-feel of each operating system (i.e. better than running Frotz/Fizmo in a terminal window). My fallback plan is to just invoke the native browser on an HTML page that uses Parchment to run the game; but that feels a lot like a cop-out.
EDIT: Or of course I have C source code for “Adventure”, so there’s nothing that says I have to use a Z-machine interpreter to present it.
Thanks! I’ll probably end up asking on the garglk-dev mailing list in a day or two, so I might as well ask here now: what if I don’t want to “install” Gargoyle, but just run a single instance of it from the USB drive? I know this is likely to be a question more about Windows/Mac trivia than about Gargoyle itself.
Installing Gargoyle means different things depending on the OS.
On Windows, it registers file extensions, installs the default Unicode fonts, and sets up the garglk:// URL handler.
On Linux, assuming you are using a package, it pulls in the required dependencies. Of these, the SDL libraries and the fonts may not be installed by default.
On Mac, it is a trivial user-driven operation, and does essentially nothing.
The garglk:// handler is something I put together for the Seattle IF group’s demo CD one year. It enables a HTML page index where you can click an element to launch Gargoyle as an external app. It hasn’t seen much use (or any documentation) and it hasn’t been ported to Linux yet, where it would probably require a package based install.
If you are trying to avoid packages altogether, there’s a Windows binary-only package that you can use. The Mac one is fine as-is. On the Linux side you could build the binaries with a self-contained copy of the garglk library, provided you disable SDL (aka sound) support. Then your dependencies will be limited to libjpeg, libpng, freetype, and Gtk2; these should be available out of the box on most GUI systems.
On all three platforms you would have to select fonts known to be installed on the system via the garglk.ini you distribute, or else fall back to the built-in fonts (Bitstream Charter and Luxi Mono). The latter course is much easier.
You would probably also want to hack up launcher.c to always load your particular story file, change the executable icon to something of your choice, and (on the Mac side) edit launcher.plist to remove the default document types and give your customized Gargoyle a unique name. These will require rebuilding Gargoyle on all three platforms - the wiki has some documentation on this and I am happy to answer questions. This approach gets you a single-purpose app with your own branding.
I have not started looking at this yet, but I have minor updates: (1) Yes, I’m trying to avoid “install this package” dialogs altogether, so I will look into that Windows binary-only distribution you referred to, if I can find it. (2) I love Bitstream Charter, so fonts won’t be an issue. I assume there’s no copyright issues with distributing these fonts, or you’d have run into it long ago, right? (3) I have downloaded the Gargoyle .dmg to my Mac and verified that it handles “Adventure” just fine, and it does look nice. Haven’t tried the Windows or Linux builds yet.
Gargoyle’s normal icon seems appropriate for “Adventure”, but I’ll definitely want to change the title bar text from “adv550.z8 — Bocfel” to something nice like “Adventure”.
Bitstream Charter and Luxi Mono (the built-in fonts) are unencumbered, though Luxi is non-free because you’re not permitted to distribute modifications.
The fastest way to deal with the title is to patch cgmisc.c and recompile. You could also wrap the .z8 file in a blorb and add the title to metadata; Gargoyle will find and use that info if it’s available.
But for this project, the whole point is to provide a portable “Adventure-on-a-stick” that doesn’t require an Internet connection to play (so “Web-based” is right out) and provides some sort of value-added over the stuff I’m already serving on Github for free (so Parchment is my worst-case fallback position, but feels like a cop-out compared to an actual native executable). You’re correct that the existence of the Internet makes this whole project pretty much moot… but I’m doing it anyway.
Forgive my ignorance, but there’s so many versions of adventure flying around… which one did you use? Or did you create a new one? Is it supposed to be a straight port of the original, very first version? How does it differ from Nelson’s “R9”?
Forgiven. Actually this is all explained in the README (follow the “Source Code” link and scroll to the bottom of the page), and I should make you read it, just to see if the README is clear enough. But since I like talking…
My port of Crowther & Woods’ “Adventure” started out as a refactoring of Don Knuth’s CWEB port. I don’t read Fortran fluently, but I used Woods’ Fortran code as a secondary source in places where I already suspected something was amiss in Knuth. There were a few places where Knuth had (apparently) changed some of the original messages (relative to the Fortran version that I had), so I changed them back. But all the data structures are straightforward ports of Knuth’s code, which appears to be a straightforward port of Woods’ Fortran code. In particular, this means that BACK works correctly and the dwarves and pirate wander around as per the original.
My port of Platt’s “Adventure 3” (Adventure 550) is a completely hand-coded reimplementation of Platt’s A-code. As I was writing it, I found a bunch of bugs in Platt’s code that I wanted to fix, so I branched my repository into “original-bugs” and “master”, and fixed a lot of the bugs in “master”. The bug-fixed “master” is what you’re playing when you play it online.
With all due respect to Graham Nelson himself, his “R9” is an Infocom-ization of the original. To take the most obvious differences: Nelson adds the verb EXAMINE (and responses such as “Sure looks yummy!”). The magic words don’t work until you’ve seen/heard them, which completely defeats the purpose of XYZZY. You can’t OPEN GRATE until you have first UNLOCKed GRATE WITH KEYS (a four-word command!). The default response to BLAST is “Frustrating, isn’t it?” His dwarves behave like Platt’s in spawning randomly, rather than via full simulation…
Graham’s parser-upgrade of Adventure was a conscious decision, of course.
I always took the purpose of XYZZY to be a shortcut into and out of the cave once you’ve gotten inside the manual way. The implementation in the Inform version supports this.
I’ve never considered whether the original authors had the sense of a storyline which should be preserved as much as possible. (E.g., if bypassing the locked-grate puzzle was in some sense doing damage to the integrity of the game.) I’d say that by the early 90s, when Mike Roberts and then Graham were doing their ports, the community did have that sense – the implementation made sense to me at the time.
Yes, although I took a curmudgeonly tone, I do understand why some versions of Adventure treat XYZZY the way they do.
From all I’ve read (which has been quite a lot, and quite lately), I believe the original authors had some sense of a “storyline”, but it was more in the sense of the player’s real-world game experience, not the PC’s in-game story. I.e., once you-the-player have successfully found the cave, the game rewards you-the-player by telling you the magic word XYZZY. From then on, you-the-player are allowed to skip that opening sequence and get straight to the meat of the game. Dennis Jerz, as usual, has the good stuff:
I strongly suspect that XYZZY/PLUGH were the original motivation for Don Woods’ adding the chained bear deeper in the cave; it means you have to touch the keys even if you already know the magic words. There seems to be a pattern of Adventure expansions that add new uses for the crappiest items in their parents: Platt forces you to hang onto the black rod with the rusty star on the end (which in C&W350 gets dropped on turn 18 and never picked back up), and Woods’ 430-point version adds more uses for the bird-and-cage (which otherwise get permanently dropped on turn 22).
The original Adventure is also very much a speedrun/preparation-oriented game; if you haven’t won by turn 300 or so, your lamp goes out and you die. Platt’s version is even more preparation-oriented: even being thoroughly spoiled on the locations of all the treasures, I bet it’s humanly impossible to map all the necessary mazes in a single playthrough. If the maze connections were randomized anew for every game, I think it would be impossible to execute all the necessary mapping algorithms before your lamp went out. (Platt’s version also has a hard time limit of 800 turns; if you haven’t won by then, the game ends, regardless of how your lamp is doing.) It’s definitely a story of you versus the game, not the PC versus anything — the PC is completely expendable in the service of the player.