Parchment: a web-based z-interpreter powered by Gnusto

125 views
Skip to first unread message

var...@gmail.com

unread,
May 26, 2008, 12:32:04 PM5/26/08
to
Hello everyone,

I just wanted to let you know about a z-interpreter I've been working
on. A few weeks ago, I wanted to see if I could take the engine from
Gnusto, which is a Mozilla extension, and decouple it from any chrome-
specific dependencies (e.g., XPCOM) to embed it in a purely client-
side web application. That worked, so I kept playing with it and now
I've given it a name and set up a Google Code project for it:

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

If you're interested in playing around with it, you can play any z-
based game on the if-archive here:

http://parchment.toolness.com/

Most of the ones I've tried work, but I'm sure that there's still lots
of bugs in Parchment and there are still some unimplemented UI
routines that I haven't run into "in the wild" yet. I can assure you
that any bugs are almost certainly my fault, and not Gnusto's. :)

The basic idea here is that I'm trying to make a web-based 'terp that
doesn't require any funky plugins (e.g. Java, Flash), nor a persistent
connection to a server, and still has all the bells and whistles that
a desktop app has. There's some really cool features in HTML 5 that
can help with this, such as support for offline applications. If
you're using Firefox 2 or above, you can select "Work Offline" from
the file menu and play a game without an internet connection
(including save/restore). The interpreter currently works on Safari
3.1+, but I haven't gotten save/restore functionality to work on it
yet, and I haven't even tried it out on Internet Explorer (I will
eventually, though). It doesn't yet work on the iPhone's peculiar
version of Safari either, unfortunately, but I'm working on it. I've
blabbed about some other thoughts I've had on the Google Code project
page, if you're interested.

Anyways, any feedback is more than welcome--and if you're interested
in contributing, please consider yourself invited. :)

- Atul

David Kinder

unread,
May 26, 2008, 12:56:06 PM5/26/08
to
Ooo, this is very nice!
David

ChicagoDave

unread,
May 26, 2008, 1:13:51 PM5/26/08
to
On May 26, 11:32 am, "var...@gmail.com" <var...@gmail.com> wrote:
> Hello everyone,
>
> I just wanted to let you know about a z-interpreter I've been working
> on.  A few weeks ago, I wanted to see if I could take the engine from
> Gnusto, which is a Mozilla extension, and decouple it from any chrome-
> specific dependencies (e.g., XPCOM) to embed it in a purely client-
> side web application.  That worked, so I kept playing with it and now
> I've given it a name

Doesn't work in IE7 on Vista. Works fine in FireFox on Vista and yeah,
pretty cool.

David C.

James Jolley

unread,
May 26, 2008, 1:38:00 PM5/26/08
to
On 2008-05-26 17:56:06 +0100, David Kinder <da...@david.david> said:

> Ooo, this is very nice!
> David

Agreed, really good ideas in there.

Sean Huxter

unread,
May 26, 2008, 2:00:29 PM5/26/08
to
I've been using CellarDoor lately to test my own code when I'm on the road,
which I find to be a great development tool, as well as a fun interpreter to
play some of my favorite games while I'm on the go.

I'd love to use this to test while I'm at another browser, (until I can
release my first game confidently.)

How can I set this up to use it with my own game files? (So I can, say, put
a link on my own home page to my own games people can play online just by
going there and playing?)

I uploaded my current z8 file to: http://www.huxter.org/files/piracy_2_42.z8

Then I ran the following command in my Firefox 2.0.0.14:

http://parchment.toolness.com/parchment.min.html?story=huxter.org/files/piracy_2_42.z8


But it gave me the following red-screen error:

An error occurred:

Error occurred when retrieving z-code: loadBinaryUrl() failed, status 404

Traceback (most recent call last):

(anonymous function)
_zcodeLoaded
FatalError
What am I doing wrong? I assume from the 404 code, that it couldn't find my
.z8 file, but I was using the proper address, I believe.

Since a proper command has "story=if-archive/games/zcode/tell.z5", which
maps to the web address: www.if-archive/games/zcode/tell.z5 I thought my
command (above) should be correct.

Sean.


<var...@gmail.com> wrote in message
news:2b26ddfb-0c5b-4500...@w1g2000prd.googlegroups.com...

George Oliver

unread,
May 26, 2008, 2:46:36 PM5/26/08
to
On May 26, 9:32 am, "var...@gmail.com" <var...@gmail.com> wrote:
>
> Anyways, any feedback is more than welcome--and if you're interested
> in contributing, please consider yourself invited. :)
>
> - Atul

Wow, this looks really good, thanks Atul!

Aaron A. Reed

unread,
May 26, 2008, 5:10:37 PM5/26/08
to

This is fantastic. The fact that it requires no plug-ins, and looks
like it could seamlessly integrate into the body of a webpage without
borders, (AND is designed with an eye for both speed and style) means
this could quickly become the standard way of running z-code online.

Like Sean below, I would love to use this right now to demo games on
my website. And I'd love to see Glulx support make it onto the feature
list. :)

--Aaron

George Oliver

unread,
May 26, 2008, 5:19:37 PM5/26/08
to

>
> This is fantastic. The fact that it requires no plug-ins, and looks
> like it could seamlessly integrate into the body of a webpage without
> borders, (AND is designed with an eye for both speed and style) means
> this could quickly become the standard way of running z-code online.

After reading the Strange Horizons IF article, I was wondering what
the relative merits of Parchment/Gnusto and Flaxo are for deploying an
IF work on a website like SH's.

It seems like in either case SH would have to install a Parchment/
Gnusto plug-in or a Flaxo executable for people to visit their site
and play the IF, right? Only in Parchment's case the visitor wouldn't
need Flash -- but it seems like Flaxo might be better for cross-
browser compatibility. Anyone have thoughts on this?

Otto Grimwald

unread,
May 26, 2008, 5:35:15 PM5/26/08
to
Sean Huxter wrote:

> Error occurred when retrieving z-code: loadBinaryUrl() failed, status 404

/.../


>
> Since a proper command has "story=if-archive/games/zcode/tell.z5", which
> maps to the web address: www.if-archive/games/zcode/tell.z5 I thought my
> command (above) should be correct.
>

I couldn't find it, but I'm pretty sure the base url for ifarchive is
somewhere in the code.

If you want to use parchment with your own game, I suggest you upload the
code of parchment on your website.

It's what I did for our website, now we propose our French games with java
or parchment, and also in flash.

For ex:

http://ifiction.free.fr/index.php?id=jeuparchemin&j=206

I've tested a few games, everything seems to work ok. Parchment/Gnusto is a
wonderful and good-looking interpreter!

--
-------------------------
http://ifiction.free.fr

Sean Huxter

unread,
May 26, 2008, 6:12:28 PM5/26/08
to
Yeah, I'd like to see a Hot-To guide on this.

I figured I could redirect the filename from if-archive to my own site, and
have the installed Parchment code execute it from there.

I'd love to get this to work from my site, on my games, so people can play
them without having to find interpreters, etc.

Sean.


"Otto Grimwald" <use_form_...@anamnese.fr.st> wrote in message
news:483b2d13$0$31877$426a...@news.free.fr...

var...@gmail.com

unread,
May 26, 2008, 7:11:01 PM5/26/08
to
Thanks for the feedback, everyone!

Sorry about the how-to issue; I'm going to come up with a better
solution for doing it, but for the time being, here's a quick way to
put Parchment on your own site and play/host your own z-code files:

(1) Navigate to the following URL:

http://parchment.googlecode.com/svn/trunk/parchment.html

(2) View the source code of this HTML (on Firefox, this can be done by
going to the "View" pull-down menu and selecting "View Source").

(3) Copy the source code of this HTML and paste it into a file on your
web server with the same name.

(4) Modify your web server's copy of the HTML and add the following
tag just below the <meta> tag in the <head> element:

<base href="http://parchment.googlecode.com/svn/trunk/" />

(5) Copy your z-code file into the same directory as this HTML file.
For now, we'll assume your story is in a file called mystory.z5, and
you've placed the HTML file at http://www.myserver.com/parchment.html.
The URL to play mystory.z5 should be:

http://www.myserver.com/parchment.html?story=mystory.z5

Let me know if that works... Again, sorry it's such a hassle right
now, I'll make it a lot easier soon.

- Atul

Sean Huxter

unread,
May 26, 2008, 9:56:05 PM5/26/08
to
Wow. That worked! Thanks, Atul!

And just as a preview, or anyone who wants to see it working, here it is on
my pre-release of my first Inform game (based on a BASIC game I wrote in
1984, though this one is much more robust, and is not humor-based.)

http://www.huxter.org/parchment/parchment.html?story=piracy_2_42.z8

This is not yet a real release, though I am confident it all works as
designed. I still have some things to add, some things to fix, and serious
testing to put it through, plus a good look at the story text to see if it's
ready for Prime Time... So far there is no ABOUT or HELP or any other useful
commands that I may add later, but it's otherwise complete.

Sean.


<var...@gmail.com> wrote in message
news:07e9f329-bcbe-4617...@w5g2000prd.googlegroups.com...

Daphne Brinkerhoff

unread,
May 26, 2008, 10:44:22 PM5/26/08
to
On May 26, 12:13 pm, ChicagoDave <david.cornel...@gmail.com> wrote:

> Doesn't work in IE7 on Vista. Works fine in FireFox on Vista and yeah,
> pretty cool.

Doesn't seem to work in IE7 on XP either -- at least, both Sean
Huxter's and Otto Grimwald's pages give me an error message.

--
Daphne

Emiliano 'Inform Ninja' Short

unread,
May 26, 2008, 10:53:31 PM5/26/08
to
Nice.

Pity it doesn't work in many browsers.

In Swiftfox (Gecko/2008052214 Firefox/3.0pre) it works, but "save"
just produces "OK".

In Epiphany 2.22.1.1 (gecko-1.9) it works, but "save" causes a freeze-
up.

It fails in Opera 9.50 Beta 1 and Konqueror 3.5.9. In Konqueror 4.0.3
it produces the following error:

An error occurred:
Component: engine

Detail: c339

Traceback (most recent call last):

(anonymous function)
_zcodeLoaded
_webZuiStartup
(anonymous function)
(anonymous function)
(anonymous function)
ge_run
ge_compile
gnusto_error
FatalError

It also fails in Internet Explorer 6 under Wine.

Sean Huxter

unread,
May 26, 2008, 10:58:11 PM5/26/08
to
Yeah, his post states he hasn't tested it in IE yet. I hope he does, as I'd
like this to be platform-independent.

My game does work in Firefox 2.0xxx however.

(However, the command has changed, since I uploaded a more up-to-date
version. It's still NOT a release, however, just a test.)

http://www.huxter.org/parchment/parchment.html?story=piracy_2_43.z8


Sean.


"Daphne Brinkerhoff" <cen...@hotmail.com> wrote in message
news:f397cd13-d78a-4337...@d1g2000hsg.googlegroups.com...

Michael Martin

unread,
May 26, 2008, 11:16:56 PM5/26/08
to
On May 26, 9:32 am, "var...@gmail.com" <var...@gmail.com> wrote:
> I just wanted to let you know about a z-interpreter I've been working
> on.  A few weeks ago, I wanted to see if I could take the engine from
> Gnusto, which is a Mozilla extension, and decouple it from any chrome-
> specific dependencies (e.g., XPCOM) to embed it in a purely client-
> side web application.  That worked, so I kept playing with it and now
> I've given it a name and set up a Google Code project for it:

Looks great! I just got it to play Weishaupt Scholars in Safari, and
it seems to work fine.

Thanks for this!

--Michael

var...@gmail.com

unread,
May 26, 2008, 11:25:00 PM5/26/08
to
Thanks for all the information on how this runs on different browsers.

If it says "Ok" after you type "save" and you can still play the game,
then the save actually worked--right now there's only one save "slot"
per game, so the second save will overwrite the first one without
prompting. I've got it in the issue tracker to eventually allow for
multiple save-game slots per game, but for now it seems like cross-
browser compatibility is the highest priority.

You're welcome to post here if you find more bugs, or you can directly
post them to the issue tracker here:

http://code.google.com/p/parchment/issues/list

Whichever you're more comfortable with. :)

- Atul

Emiliano 'Inform Ninja' Short

unread,
May 26, 2008, 11:56:10 PM5/26/08
to
On May 27, 1:25 pm, "var...@gmail.com" <var...@gmail.com> wrote:
> Thanks for all the information on how this runs on different browsers.
>
> If it says "Ok" after you type "save" and you can still play the game,
> then the save actually worked

But where does that save go exactly?

var...@gmail.com

unread,
May 27, 2008, 1:08:13 AM5/27/08
to
On May 26, 8:56 pm, "Emiliano 'Inform Ninja' Short"

Good question. At the moment, it gets saved in the DOM globalStorage:

http://developer.mozilla.org/en/docs/DOM:Storage#globalStorage

Specifically, it creates a variable called "<story-name>_saveData" in
globalStorage, so that if you're playing e.g. "if-archive/games/zcode/
Galatea.zblorb", the saved game is in
window.globalStorage['parchment.toolness.com']['if-archive/games/zcode/
Galatea.zblorb_saveData']. The data itself is just a base64-encoded
Quetzal file; I'll be adding a feature eventually that allows you to
export the Parchment saves to your local disk and import them too.

- Atul

Christopher Armstrong

unread,
May 27, 2008, 8:04:12 AM5/27/08
to
On Mon, 26 May 2008 14:19:37 -0700, George Oliver wrote:
> After reading the Strange Horizons IF article, I was wondering what the
> relative merits of Parchment/Gnusto and Flaxo are for deploying an IF
> work on a website like SH's.
>
> It seems like in either case SH would have to install a Parchment/
> Gnusto plug-in or a Flaxo executable for people to visit their site and
> play the IF, right? Only in Parchment's case the visitor wouldn't need
> Flash -- but it seems like Flaxo might be better for cross- browser
> compatibility. Anyone have thoughts on this?

I've only played the online demo for Flaxo, but I'm really turned off by
the fact that when I type SAVE, it tells me that it hasn't been
implemented yet. If Parchment can implement save games without requiring
the user to reconfigure their browser, well... it would actually be
useful.

--
Christopher Armstrong, International Man of Twistery
http://radix.twistedmatrix.com/
http://wordeology.com/planet-if/ - Planet IF blog aggregator

namekuseijin

unread,
May 27, 2008, 12:29:53 PM5/27/08
to
This is completely awesome!! Thank you very much for your effort!
This'll eventually become the standard way to play IF indeed.

It indeed doesn't play on IE7, which is a shame. For IE7 that is:
seemingly the browser developers have been busy on adding flashy
interface matters and not so much on supporting a robust
infrastructure based on standard ECMAscript and DOM model. I keep
hearing of these same errors for ages on IE.

Luckly, it runs lovely on open-source browsers like Firefox and
Safari.

Nathan

unread,
May 27, 2008, 12:54:03 PM5/27/08
to
namekuseijin wrote:

> Luckly, it runs lovely on open-source browsers like Firefox and
> Safari.

Safari is open source? Whatever.

Andrew Plotkin

unread,
May 27, 2008, 1:06:48 PM5/27/08
to

The bulk of Safari is WebKit, which is. (WebKit is the basis of
several other Mac web browsers.)

--Z

--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
If the Bush administration hasn't thrown you in military prison without trial,
it's for one reason: they don't feel like it. Not because you're patriotic.

JDC

unread,
May 27, 2008, 1:07:34 PM5/27/08
to
On May 26, 12:32 pm, "var...@gmail.com" <var...@gmail.com> wrote:
> If you're interested in playing around with it, you can play any z-
> based game on the if-archive here:
>
> http://parchment.toolness.com/

> Anyways, any feedback is more than welcome--and if you're interested


> in contributing, please consider yourself invited. :)

This is really great; nice work. I have noticed one thing: there seems
to be a prroblem with menus (maybe this is in the "unimplemented UI
features"). I tried the "about" menu of my game Mobius (using the
ifarchive link), and after selecting and reading a menu item, when it
says "Press space to continue) it seems to have after pressing space.
This happens both in Firefox (linux)and Safari (OS X).

But I like it a lot and look forward to seeing how this progresses.

-JDC

JDC

unread,
May 27, 2008, 1:19:57 PM5/27/08
to
On May 27, 1:07 pm, JDC <jd...@psu.edu> wrote:
> [...] it seems to have after pressing space.

"Hang", of course (not "have").

-JDC

namekuseijin

unread,
May 27, 2008, 1:57:36 PM5/27/08
to
On 27 maio, 14:06, Andrew Plotkin <erkyr...@eblong.com> wrote:

> Here, Nathan <ntsp...@netscape.net> wrote:
> > namekuseijin wrote:
>
> > > Luckly, it runs lovely on open-source browsers like Firefox and
> > > Safari.
>
> > Safari is open source?
>
> The bulk of Safari is WebKit, which is. (WebKit is the basis of
> several other Mac web browsers.)

Exactly. Anyone knows if Opera handles it?

Here at work, download of executables is forbidden, which is both a
shame and why this fantastic software in javascript is so amazing! :D

James Cunningham

unread,
May 27, 2008, 3:39:26 PM5/27/08
to
On 2008-05-27 13:57:36 -0400, namekuseijin <nameku...@gmail.com> said:

> Exactly. Anyone knows if Opera handles it?

Opera doesn't, unfortunately -- neither the 9.5 beta nor the current
stable. Only blankness.

Best,
James

Adam Thornton

unread,
May 27, 2008, 7:33:49 PM5/27/08
to
Has anyone done a Gnusto-equivalent for glulx?

How hard would it be to adapt this approach to do Glulx games as well (a
curses-style interface (pref. with Unicode, yes) is all I'm asking for,
not a full-on graphics-and-sound Glulx)?

Adam

var...@gmail.com

unread,
May 28, 2008, 4:47:19 AM5/28/08
to
I think I've gotten things to work on Internet Explorer 7 and Opera
9.27. Give it a try:

http://parchment.toolness.com/

A few notes:

* It runs really slowly on MSIE at the moment. I think this is
because my code for displaying the top window is horribly inefficient;
I'll work on improving that, but for now, please give the app some
time to do its thing.

* Don't use save or restore in MSIE, Opera, or Safari--I'm pretty
sure it'll crash/hang Parchment. I'm working on a fix for that. :)

* I've had to change the method by which Parchment retrieves z-code
files; the good news is that the parchment.html hosted on Google Code
can now load story files from anywhere on the internet, but the bad
news is that the story files have to be in JSON format. I'm going to
write up a new how-to on how to do this, but for the time being, any
embedded Parchment games on other servers may be broke. Sorry about
that.

- Atul

var...@gmail.com

unread,
May 28, 2008, 4:52:11 AM5/28/08
to
I'm not sure how hard it'd be to adapt this approach to do Glulx games
because I don't know a whole lot about Glulx, unfortunately, but I'm
interested in making it work on Parchment after the standard z-machine
interpreter is stabilized.

- Atul

miket...@embarqmail.com

unread,
May 28, 2008, 5:40:14 AM5/28/08
to
On May 28, 4:47 am, "var...@gmail.com" <var...@gmail.com> wrote:
> I think I've gotten things to work on Internet Explorer 7 and Opera
> 9.27.  Give it a try:
>
>  http://parchment.toolness.com/
>
> A few notes:
>
>   * It runs really slowly on MSIE at the moment.  I think this is
> because my code for displaying the top window is horribly inefficient;
> I'll work on improving that, but for now, please give the app some
> time to do its thing.
>

It seems to be working fine now on IE7 under winXP (other than the
slugishness and lack of save, which you mentioned). Nice job Atul!

One other issue: I noticed the up arrow doesn't work as a "previous
command" key. Am I correct to assume this is a feature that hasn't
been implemented yet and not some peculiarity of IE?

Skinny Mike

jon.i...@gmail.com

unread,
May 28, 2008, 6:58:03 AM5/28/08
to
On May 28, 10:40 am, miketarb...@embarqmail.com wrote:
> On May 28, 4:47 am, "var...@gmail.com" <var...@gmail.com> wrote:
>
> > I think I've gotten things to work on Internet Explorer 7 and Opera
> > 9.27. Give it a try:

> One other issue: I noticed the up arrow doesn't work as a "previous


> command" key. Am I correct to assume this is a feature that hasn't
> been implemented yet and not some peculiarity of IE?

The up arrow doesn't work in Firefox either, so I guess it's just
missing from the implementation.

I have a weird IE (6, xp) bug: the text windows are coming out at
about 10 characters wide!

jon


Eric Eve

unread,
May 28, 2008, 7:25:53 AM5/28/08
to
<var...@gmail.com> wrote in message
news:ac221e57-2e1f-46ce...@h1g2000prh.googlegroups.com...

>I think I've gotten things to work on Internet Explorer 7 and Opera
> 9.27. Give it a try:
>
> http://parchment.toolness.com/
>
> A few notes:
>
> * It runs really slowly on MSIE at the moment. I think this is
> because my code for displaying the top window is horribly
> inefficient;
> I'll work on improving that, but for now, please give the app some
> time to do its thing.

I had a very quick go in MSIE 7, and it didn't seem *that* slow, but
I've not yet got it to run in anything else, so I've nothing to
compare it with. In particular, I've not been able to get it to work
in Firefox 3 (using the link supplied above displays the general
introductory paragraph but doesn't list any games that can be
played).

-- Eric


Andrew Plotkin

unread,
May 28, 2008, 11:42:57 AM5/28/08
to
Here, var...@gmail.com <var...@gmail.com> wrote:
>
> * I've had to change the method by which Parchment retrieves z-code
> files; the good news is that the parchment.html hosted on Google Code
> can now load story files from anywhere on the internet, but the bad
> news is that the story files have to be in JSON format. I'm going to
> write up a new how-to on how to do this, but for the time being, any
> embedded Parchment games on other servers may be broke. Sorry about
> that.

Is this because of the annoying rules on Javascript loading resources
cross-site?

If so, it would be good if it worked both ways -- JSON cross-site and
a simple file load on the same site. One of the big uses of this is
for an IF author to set up his own games on his own server (with
customized CSS and all). I think it's worth making that use case
simple.

Additional idea: somebody could set up a trivial redirector, where
http://WHATEVER/zcode-as-json?http://mirror.ifarchive.org/blah/game.z5
feeds back the named file wrapped in whatever JSON format Parchment
needs.

--Z

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

If the Bush administration hasn't subjected you to searches without a
warrant, it's for one reason: they don't feel like it. Not because of
the Fourth Amendment.

Andrew Plotkin

unread,
May 28, 2008, 11:58:46 AM5/28/08
to
Here, var...@gmail.com <var...@gmail.com> wrote:
> I'm not sure how hard it'd be to adapt this approach to do Glulx games
> because I don't know a whole lot about Glulx, unfortunately, but I'm
> interested in making it work on Parchment after the standard z-machine
> interpreter is stabilized.

My guess is that Glulx will be possible, but more work, because there
are more layers of C code to rewrite.

(When I designed that stuff, I didn't anticipate people redoing entire
interpreters in other languages...)

PS: I also support the notion of having up-arrow and down-arrow work
for command history. That's a big part of my IF-playing habit.

--Z

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

If the Bush administration hasn't shipped you to Syria for interrogation, it's
for one reason: they don't feel like it. Not because you're innocent.

namekuseijin

unread,
May 28, 2008, 1:40:19 PM5/28/08
to
I didn't notice any particular slowdown in IE7 when compared to
Firefox (Core 2 Duo here). And I agree command-history and Glulx
support are good things, but I advise one little step a time. Who
knows, perhaps someday we'll get even TADS on board... XD

It's good enough already at this point to simply fire-up some browser
and play my favorite IF works! Awesome stuff! :)

Daphne Brinkerhoff

unread,
May 28, 2008, 2:16:48 PM5/28/08
to
On May 28, 3:47 am, "var...@gmail.com" <var...@gmail.com> wrote:
> I think I've gotten things to work on Internet Explorer 7 and Opera
> 9.27.  Give it a try:
>
>  http://parchment.toolness.com/
>
> A few notes:
>
>   * It runs really slowly on MSIE at the moment.  I think this is
> because my code for displaying the top window is horribly inefficient;
> I'll work on improving that, but for now, please give the app some
> time to do its thing.
>

Just FYI, seems like the slowness may depend on which game you're
playing. I tried Joe Mason's game A Stop for the Night, and it was a
few seconds before the game started, and maybe one and a half seconds
between turns, no biggie. Then I tried Johanna Hunt's game Aesthetic
Deletions, and it was more like 20 or 30 seconds. There are a couple
of text boxes that come up at the start of that game, and it was the
same length of time between each one. I found it unplayable that
way. (IE7, XP)

--
Daphne

namekuseijin

unread,
May 28, 2008, 4:30:15 PM5/28/08
to
Hmm, Nelson's Jigsaw is horribly slow on IE7. And worse: no jigsaw
pieces visual depiction, both in FF and IE7.

Andrew Plotkin

unread,
May 28, 2008, 4:30:24 PM5/28/08
to
Here, Daphne Brinkerhoff <cen...@hotmail.com> wrote:
> On May 28, 3:47 am, "var...@gmail.com" <var...@gmail.com> wrote:
> > I think I've gotten things to work on Internet Explorer 7 and Opera
> > 9.27.  Give it a try:
> >
> >  http://parchment.toolness.com/
> >
> > A few notes:
> >
> >   * It runs really slowly on MSIE at the moment.  I think this is
> > because my code for displaying the top window is horribly inefficient;
> > I'll work on improving that, but for now, please give the app some
> > time to do its thing.
>
> Just FYI, seems like the slowness may depend on which game you're
> playing.

This will be true on any platform. (It's true on all interpreters, in
fact.) Some Z-code games burn a lot more Z-machine cycles per move,
that's all there is to it.

(I tried "Reliques of Tolti-Aph" on Parchment and it was pretty
painful. Particularly at startup time, when the game does a lot of
table precalculation.)

To compare the performance of two interpreters/browsers, use the
same game file.

> There are a couple of text boxes that come up at the start of that
> game, and it was the same length of time between each one.

This particular problem is the same one noted above. Text boxes appear
in "the top window", really, so they will be inefficient on IE for the
time being.

--Z

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

If the Bush administration hasn't thrown you in military prison

without trial, it's for one reason: they don't feel like it. Not
because of the Fifth Amendment.

Sean Huxter

unread,
May 28, 2008, 7:54:40 PM5/28/08
to

"Daphne Brinkerhoff" <cen...@hotmail.com> wrote in message
news:c1a7791e-d3d5-41c4...@34g2000hsh.googlegroups.com...

Heh. I'm betting someone didn't play "Sorceror" on a Commodore 64! :-)

Sean.


var...@gmail.com

unread,
May 28, 2008, 8:38:33 PM5/28/08
to
On May 28, 8:42 am, Andrew Plotkin <erkyr...@eblong.com> wrote:
> Is this because of the annoying rules on Javascript loading resources
> cross-site?

Nope, it's actually because it's ridiculously nontrivial to load
binary data via an Ajax request. :/ I found a blog post that made it
work on Firefox in the first version of Parchment, but when I tried
getting Parchment to work on MSIE, I couldn't figure out how to hack
it, so the only way I could get things to work on MSIE was by going
the JSON route. I totally agree that it should be as easy as possible
for IF authors to set their own games up on their own servers, though--
if it were up to me I would've stayed with the original, non-JSONish
way of doing it that puts less of a burden on authors. In lieu of
that, though, I'll be setting up the trivial redirector you mentioned,
or something akin to it, unless someone else beats me to it (which
everyone is welcome to do). :)

I agree with the requests to have up/down arrows be bound to command
history and I've made a ticket for it:

http://code.google.com/p/parchment/issues/detail?id=20

Eric, what you said about the list of games not appearing on Firefox 3
concerns me; do you know what your color depth is set to? Or if you
go to "Tools->Error Console", does it list any errors relevant to the
page?

I'll have to check out Nelson's Jigsaw. I know that one of the UI
effects I haven't yet implemented is the one called in response to a
"print_table" opcode, so if Jigsaw uses those then that's the culprit.

- Atul

Daphne Brinkerhoff

unread,
May 28, 2008, 9:04:51 PM5/28/08
to
On May 28, 6:54 pm, "Sean Huxter" <sean.hux...@SPAMverizon.net> wrote:
> "Daphne Brinkerhoff" <cend...@hotmail.com> wrote in message
>
> news:c1a7791e-d3d5-41c4...@34g2000hsh.googlegroups.com...
>

> >Then I tried Johanna Hunt's game Aesthetic
> >Deletions, and it was more like 20 or 30 seconds.  There are a couple
> >of text boxes that come up at the start of that game, and it was the
> >same length of time between each one.  I found it unplayable that
> >way.  (IE7, XP)
>
> Heh. I'm betting someone didn't play "Sorceror" on a Commodore 64! :-)

You got me. :) For what it's worth, I wouldn't have been all "OMG, a
whole *minute* to start up" if I wasn't afraid that it was going to be
a whole minute between each turn. Which, you know, ewww. If that's
how it was back in the day, I don't regret not playing it then.

--
Daphne

Sean Huxter

unread,
May 28, 2008, 11:53:06 PM5/28/08
to
"Sorceror" on the Commodore 64 was routinely 20-30 seconds or more between
responses because of disk thrashing.

Type command. Wait. Watch disk drive lights go nuts. Wait some more. Watch
eventual response show up.

Later INFOCOM games did get a little difficult on a Comodore 64.

Thankfully, I moved to a C128 so I could play Trinity and Bureaucracy.

Sean.


"Daphne Brinkerhoff" <cen...@hotmail.com> wrote in message

news:ea97003e-8d2b-4d2f...@25g2000hsx.googlegroups.com...

Andrew Plotkin

unread,
May 29, 2008, 12:03:25 AM5/29/08
to
Here, var...@gmail.com <var...@gmail.com> wrote:
> I'll have to check out Nelson's Jigsaw. I know that one of the UI
> effects I haven't yet implemented is the one called in response to a
> "print_table" opcode, so if Jigsaw uses those then that's the culprit.

I don't think it does. By default, it prints jigsaw pieces using
normal and reverse-text space characters. (This is what I remember
from ten years ago, anyway... isn't there an alternate display mode
which uses ASCII art?)

Fredrik Ramsberg

unread,
May 29, 2008, 1:31:18 AM5/29/08
to
On 28 Maj, 10:47, "var...@gmail.com" <var...@gmail.com> wrote:
> I think I've gotten things to work on Internet Explorer 7 and Opera
> 9.27.  Give it a try:
>
>  http://parchment.toolness.com/

Looks like a great start!

Tried it on IE6 under XP, on two different computers. In both cases, I
can start a game, but the main text gets a line break after every
word, even after words which are just one character long. The text
appears right in the middle of the screen (horizontally). The status
line looks normal though.

Also, the game The Dragon and the Troll prints an odd set of
characters where nothing at all should be printed (yH* s0fcs1d).

The terp doesn't accept accented characters, like ö (&ouml; in HTML),
in user input.

Finally, if the game supplies a modified Z-character table, the terp
uses it when printing strings, but not when matching dictionary words.

This last bug makes it pretty much impossible to play Swedish games.

/Fredrik

Eric Eve

unread,
May 29, 2008, 3:04:39 AM5/29/08
to
<var...@gmail.com> wrote in message
news:ee688578-b144-4920...@i18g2000prn.googlegroups.com...

On May 28, 8:42 am, Andrew Plotkin <erkyr...@eblong.com> wrote:
> Is this because of the annoying rules on Javascript loading
> resources
> cross-site?

Eric, what you said about the list of games not appearing on Firefox

3
concerns me; do you know what your color depth is set to? Or if you
go to "Tools->Error Console", does it list any errors relevant to
the
page?

Hm. When I tried it just now I got a list of games in Firefox 3 (so
I don't know why I didn't see it before).

However, I just tried running "Dreadwine" in it, and got the
following error in response to X GLASS:

An error occurred:

Unimplemented effect: "XC"

Traceback (most recent call last):

(anonymous function)
(anonymous function)
(anonymous function)
FatalErrorI also get the same problem in Opera (where it seems to
run much slower).(Compare playing it on-line with zmpp at
http://users.ox.ac.uk/~manc0049/files/Dreadwine.htm,which seems to
work okay).-- Eric


jon.i...@gmail.com

unread,
May 29, 2008, 4:36:27 AM5/29/08
to

> I'll have to check out Nelson's Jigsaw. I know that one of the UI
> effects I haven't yet implemented is the one called in response to a
> "print_table" opcode, so if Jigsaw uses those then that's the culprit.

Actually, this might just be the font off/on problem: it renders the
jigsaw using fixed-width characters, and these all get scrunched up

jon

Roger Firth

unread,
May 29, 2008, 6:22:02 AM5/29/08
to
Eric Eve wrote:

> Hm. When I tried it just now I got a list of games in Firefox 3 (so
> I don't know why I didn't see it before).

Not just you: I got the same problem (using Firefox 2) when I tried
a few days ago. Today the list is populated.

--
Cheers, Roger

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
You'll find all my IF pages at http://www.firthworks.com/roger
WARNING: aggressive spam deletion -- use a meaningful Subject!

JDC

unread,
May 29, 2008, 12:18:53 PM5/29/08
to
On May 29, 6:22 am, Roger Firth <ro...@firthworks.com> wrote:
> Eric Eve wrote:
> > Hm. When I tried it just now I got a list of games in Firefox 3 (so
> > I don't know why I didn't see it before).
>
> Not just you: I got the same problem (using Firefox 2) when I tried
> a few days ago. Today the list is populated.

The archive was apparently down for a bit a day or two ago (Zarf
posted about this). Perhaps that was the problem?

-JDC

Dannii

unread,
May 30, 2008, 1:01:14 PM5/30/08
to

Wow, well done to everyone involved.

Now I definitely can't wait for FF4. Bring on Tamarin!

var...@gmail.com

unread,
May 30, 2008, 1:03:10 PM5/30/08
to
Thanks for the additional feedback, everyone. I've created new
tickets for all the bugs that have been reported and will get around
to them as I find time.

I've just committed a major speedup to the top window rendering code,
though, and I tried Aesthetic Deletions on MSIE 7 after doing this and
it seems to work better. Please give it a try and let me know if it's
acceptable.

I've also added a web page that should help authors get their stories
running on Parchment, although at the moment it requires Firefox 3 to
be really useful:

http://parchment.googlecode.com/svn/trunk/zcode2js.html

Even without FF3, though, it still contains useful information.

Daphne Brinkerhoff

unread,
May 30, 2008, 7:40:07 PM5/30/08
to
On May 30, 12:03 pm, "var...@gmail.com" <var...@gmail.com> wrote:
> I've just committed a major speedup to the top window rendering code,
> though, and I tried Aesthetic Deletions on MSIE 7 after doing this and
> it seems to work better.  Please give it a try and let me know if it's
> acceptable.

IMHO, this is a *lot* better. I tried some other random games --
Damnatio Memoriae is a bit slower than most, but still usable (maybe 4
seconds between moves? I didn't time it too carefully). I expected
it would be slow, since it's got some complicated code. Aesthetic
Deletions is now about the same as the other games.

--
Daphne

var...@gmail.com

unread,
May 31, 2008, 4:44:25 PM5/31/08
to
Woot! Good to hear.

I've just added a feature that allows for saving and restoring games
to work in all browsers, but it does so in a kind of odd way: it just
appends a base64-encoded version of the Quetzal save file to the hash
component of the URL. That basically means that URLs for saved games
are really long, but it allows for a number of interesting
possibilities:

* Since a saved game is just a URL, it can be bookmarked or sent to
a friend (or as a bug report to an author) just like any other URL.

* It's not hard to convert it to and from a "real" Quetzal save file
that can be used in other Z-interpreters. (I'll set up a page for
doing this if we end up sticking with this mechanism.)

* When you save/restore your game, because the URL effectively
changes, it actually gets recorded in your browser history. This
means that if you start playing a game and save your games five times
on your way through it, you can just press the "back" button on your
browser to go to each previous saved game.

* If your browser saves the history state of each tab when you quit
and restores it when you restart your browser--I think Firefox 3
behaves this way--you get all your old saved games back for free
(i.e., you don't even have to bookmark them if you don't want to).

* It's a completely client-side mechanism that doesn't require
server-side storage or special permissions, so you can use save/
restore while offline.

* FWIW, it preserves privacy: the hash component of a URL doesn't
get sent in a HTTP get response, so there's no way for the Parchment
host to know anything about where you are in the game. (No idea why
this would be useful, but it's an interesting behavior.)

The limiting factors here are how long browsers allow the hash
component of URLs to be, how big Quetzal files can get, and how
cumbersome it'll be to paste a 5k URL in an email. So this could be a
really dumb idea on my part. :)

Anyhow, feel free to give this a try and let me know what you think.

- Atul

var...@gmail.com

unread,
May 31, 2008, 4:48:45 PM5/31/08
to
Oh, the URL is:

http://parchment.toolness.com

(Also, if I'm spamming r.a.i-f at this point, please let me know--I
don't mean to annoy anyone!)

- Atul

namekuseijin

unread,
May 31, 2008, 11:37:54 PM5/31/08
to
On 31 maio, 17:44, "var...@gmail.com" <var...@gmail.com> wrote:
> I've just added a feature that allows for saving and restoring games
> to work in all browsers, but it does so in a kind of odd way: it just
> appends a base64-encoded version of the Quetzal save file to the hash
> component of the URL.

This is so cool! :)

I was actually going to sugest cookies, but this and the possibilities
sound much nicer.

Keep it up, man! This surely is not spam, only great news!

Damien Neil

unread,
Jun 3, 2008, 12:31:48 AM6/3/08
to
"var...@gmail.com" <var...@gmail.com> wrote:
> I've just added a feature that allows for saving and restoring games
> to work in all browsers, but it does so in a kind of odd way: it just
> appends a base64-encoded version of the Quetzal save file to the hash
> component of the URL.

I've been thinking of adding support for saving to local browser
storage. The feature would only work in WebKit-based browsers at the
moment, though, so it'd naturally have to be optional. Do you think
this would be worth including?

(Details on WebKit's local storage here:
http://webkit.org/blog/126/webkit-does-html5-client-side-database-storage
)

Upside is persistent storage with no need to bookmark a URL. Downside
is no good way to send a saved game to someone else.

- Damien

var...@gmail.com

unread,
Jun 4, 2008, 10:12:29 AM6/4/08
to
Aye, I'm currently using globalStorage in FF3 for the same thing; a
friend of mine alerted me to a persistent storage abstraction layer
called PersistJS, though, which might be more useful to integrate,
since it delegates out to whatever storage the browser happens to
support. There's more info on the bug for it here:

http://code.google.com/p/parchment/issues/detail?id=2

Feel free to submit a patch for it if you like!

- Atul

On Jun 2, 9:31 pm, Damien Neil <ne...@misago.org> wrote:
>  "var...@gmail.com" <var...@gmail.com> wrote:
> > I've just added a feature that allows for saving and restoring games
> > to work in all browsers, but it does so in a kind of odd way: it just
> > appends a base64-encoded version of the Quetzal save file to the hash
> > component of the URL.
>
> I've been thinking of adding support for saving to local browser
> storage.  The feature would only work in WebKit-based browsers at the
> moment, though, so it'd naturally have to be optional.  Do you think
> this would be worth including?
>

> (Details on WebKit's local storage here:http://webkit.org/blog/126/webkit-does-html5-client-side-database-sto...

var...@gmail.com

unread,
Jun 8, 2008, 5:57:02 PM6/8/08
to
Quick update: thanks largely to a code contribution from Damien,
Parchment now supports the use of up/down arrows to navigate through
previous command history and the use of left/right arrow keys to move
the cursor on the line. I've tested this on Firefox 3, Opera 9.x,
MSIE 7, and Safari 3.1, and it seems to work, but let me know if you
have issues.

Thanks Damien!

- Atul

namekuseijin

unread,
Jun 8, 2008, 6:09:53 PM6/8/08
to
On Jun 8, 6:57 pm, "var...@gmail.com" <var...@gmail.com> wrote:
> Quick update: thanks largely to a code contribution from Damien,
> Parchment now supports the use of up/down arrows to navigate through
> previous command history and the use of left/right arrow keys to move
> the cursor on the line.  I've tested this on Firefox 3, Opera 9.x,
> MSIE 7, and Safari 3.1, and it seems to work, but let me know if you
> have issues.
>
> Thanks Damien!

Thank you, both of you! Working like a dream in FF3beta. I'm
actually already putting links here and there, in emails to friends
and forum threads, to zcode games playable in Parchment. Much, much
better solution than a Flash or Java interpreter...

I hope game review sites begin to notice this excellent news.

Fredrik Ramsberg

unread,
Jun 16, 2008, 8:23:02 AM6/16/08
to
On 30 Maj, 19:03, "var...@gmail.com" <var...@gmail.com> wrote:
> Thanks for the additional feedback, everyone.  I've created new
> tickets for all the bugs that have been reported and will get around
> to them as I find time.

Do you have any idea when you might get more time to fix bugs in
Parchment?

I look forward to start using it, once some of the more serious bugs
get ironed out.

/Fredrik

var...@gmail.com

unread,
Jun 19, 2008, 2:20:57 PM6/19/08
to
Hi Fredrik,

I'm trying to go through bugs on a regular basis; on Sunday or Monday
I was able to fix the bug whereby Parchment wasn't displaying fixed-
width text in the bottom window--it turned out to be a bug in Gnusto--
so now the puzzle pieces in Nelson's Jigsaw are visible at least.
I've been doing some research on some other Gnusto-related bugs too,
and there's an RSS feed here for that:

http://code.google.com/feeds/p/parchment/issueupdates/basic

Thanks again for everyone's bug reports that have been submitted to
the Google Code site--they're very helpful!

- Atul

On Jun 16, 5:23 am, Fredrik Ramsberg <fredrik.ramsb...@gmail.com>
wrote:

namekuseijin

unread,
Jun 19, 2008, 3:08:55 PM6/19/08
to
On Jun 19, 3:20 pm, "var...@gmail.com" <var...@gmail.com> wrote:
> I was able to fix the bug whereby Parchment wasn't displaying fixed-
> width text in the bottom window--it turned out to be a bug in Gnusto--
> so now the puzzle pieces in Nelson's Jigsaw are visible at least.

Great! Thanks!

var...@gmail.com

unread,
Jun 23, 2008, 12:35:38 PM6/23/08
to
Over the weekend, Damien Neil and I figured out the underlying bug
behind a number of weird issues with a lot of stories. Because it's a
low-level bug in the interpretation of z-code in Gnusto, there's a
good chance that our fix has resolved a lot of issues along the lines
of bizarre memory deallocation issues, the game not responding to your
commands properly, and things like that. (It definitely does *not*
fix bugs involving not being able to type certain characters into
Parchment, however.)

So if you've been having problems like this with a particular title,
please give it another try and let us know how it goes!

(Also, if you're interested in the technical aspects of the bug, see
this ticket: http://code.google.com/p/parchment/issues/detail?id=43.)

- Atul

Fredrik Ramsberg

unread,
Jun 24, 2008, 5:34:39 AM6/24/08
to
On 23 Juni, 18:35, "var...@gmail.com" <var...@gmail.com> wrote:
> Over the weekend, Damien Neil and I figured out the underlying bug
> behind a number of weird issues with a lot of stories.
> - Atul

Great work, both of you!

Good to see many issues being resolved.

/Fredrik