intfiction.org

The Interactive Fiction Community Forum
It is currently Tue May 21, 2013 7:24 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Jun 16, 2012 8:21 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
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.


Top
 Profile Send private message  
 
PostPosted: Sat Jun 16, 2012 9:57 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 2084
Gargoyle is the current best practice for that.

http://code.google.com/p/garglk/


Top
 Profile Send private message  
 
PostPosted: Sun Jun 17, 2012 1:27 am 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
zarf wrote:
Gargoyle is the current best practice for that.

http://code.google.com/p/garglk/
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.


Top
 Profile Send private message  
 
PostPosted: Sun Jun 17, 2012 11:35 am 
Offline

Joined: Tue Apr 27, 2010 1:02 pm
Posts: 797
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.


Top
 Profile Send private message  
 
PostPosted: Wed Jun 20, 2012 1:10 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
bcressey wrote:
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". :)


Top
 Profile Send private message  
 
PostPosted: Wed Jun 20, 2012 2:31 pm 
Offline

Joined: Tue Apr 27, 2010 1:02 pm
Posts: 797
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.


Top
 Profile Send private message  
 
PostPosted: Thu Jun 21, 2012 6:41 pm 
Offline
User avatar

Joined: Fri Jul 15, 2011 2:46 pm
Posts: 230
Location: Cental Ohio
Wouldn't it be easier to just pass the file to a web-based parchment install?

_________________
David Good
http://david-good.com/portfolio/interactive-fiction/
http://www.facebook.com/duodave


Top
 Profile Send private message  
 
PostPosted: Thu Jun 21, 2012 7:37 pm 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
duodave wrote:
Wouldn't it be easier to just pass the file to a web-based parchment install?


I've already done that. :) Enjoy: http://quuxplusone.github.com/Advent/play.html

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.


Top
 Profile Send private message  
 
PostPosted: Fri Jun 22, 2012 3:58 am 
Offline

Joined: Mon Dec 07, 2009 5:14 am
Posts: 902
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"?


Top
 Profile Send private message  
 
PostPosted: Fri Jun 22, 2012 11:29 am 
Offline

Joined: Sun Apr 15, 2012 9:48 pm
Posts: 77
Peter Pears wrote:
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...


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group