Preview of Vorple for Parchment

February 27th, 2012

Before we go any further, here it is: Vorple using Parchment to run a Z-machine story file created with Inform 7.

Preview of Vorple for Parchment

The preview is a recreation of the proof of concept from almost a year ago with only minor adjustments. The proof of concept used a custom two-word parser, but the preview runs on an actual interpreter with a proper library.

The system uses a JavaScript eval() stream from Dannii Willis’s Z-machine Standard 1.2 draft, along with some custom additions that allow the story output HTML tags. This lets the story file instruct Vorple how to display user interface elements and other features.

Interpreter enhancements

I’ve been able to include the feature I’ve wished for ever since I started playing IF: in the scrollback the previous turns are faded out so that the current turn stands out better. This makes it easier to see where to continue reading and less scanning with your eyes. A related feature is the addition of a smooth scroll animation to the bottom of the scrollback instead of an abrupt jump.

The big new thing is scrollback folding. If you enter an invalid command, the response is shown in a different style and hidden the next turn. The idea here is to keep the scrollback clean of noise so that only story-relevant content remains. Similarly any meta commands are displayed as notifications and not shown in the scrollback at all.

Note that this is mainly a tech demo and the behavior of these features will be later adjusted to fit.

Multimedia features

In theory any feature from the Vorple library can be added to the story. The preview uses mainly images and tooltips, but there’s no reason it couldn’t play sounds or create UI buttons.

Some of the features are created using plain JavaScript. A custom Vorple module has been made for the alarm clock. Some meta commands (ABOUT, CREDITS, TIPS) are put in a jQuery UI modal dialog which is not yet a part of the Vorple library.

Backwards compatibility

The interpreter will be fully backwards compatible with other story files (Z-machine only at the moment). Try for example Stephen Granade’s Fragile Shells. You get the same layout, current turn highlighting and smoother scrolling, although of course other features that require support from the story file aren’t available. (The status line is hidden and there are some glitches, most notably lockups if you try the in-game menus or when any time single-character input is required, but that’s all temporary.)

Not only that, but the Vorple-enhanced story files degrade gracefully to text-only versions. If you download the zblorb file and try it with an offline interpreter or with a non-Vorple installation of Parchment, you’ll get a text-only version of the same game (although not a very exciting one).

The story file can provide alternative content to multimedia features, showing text instead of images. Entire sections can be added or removed depending on the interpreter’s capabilities. In the non-Vorple version there’s a short explanation in the intro text that’s not in the Vorple version and so on.

The Future

As you can see from the preview, there are various smaller and larger issues that need to be ironed out. Internally things are bound to change radically as the related standards are still in a state of flux.

Most likely there will be one Undum-only release before a Parchment-compatible one, which will include the toolset for making stories with Inform 7.


§ 4 Responses to Preview of Vorple for Parchment"

  • Dannii says:

    If you intend to keep using stream 6 we’ll need to spec it too. How about @gestalt selector $31?

    Fading previous responses is a nice effect. I might add that into the default Parchment. Parchment used to have scrolling to the newest response but I removed it a while ago. I’m not opposed to adding it back in. It might be easier once the windows are changed so that they only scroll within themselves, rather than the status window floating over the top of the other.

    The notifications is nice, as are the dialogue boxes. Parchment will be getting its own dialogue boxes (I don’t want to use jQuery UI), so Vorple could use it. Thinking ahead to the Glk JS system, do you think it would be good to standardise notifications and dialogues, so that they will use the interpreters default system? Well I think that’s a good idea.

    The image alternate content should still be used even if images are supported – it should be put as the image’s alt attribute.

    Very exciting in general though!

    How have you found ZVM and StructIO for hacking?

    • Juhana says:

      Thanks Dannii, StructIO/ZVM has been a pleasure to work with and has saved a lot of time since the functionality is mostly already there.

      As long as the Parchment dialogues/notifications allow HTML content and not just text, I’m always up to standardizing. For stream 6 I’d like to wait for the CSS GLK specification which will need to do the same and see how it handles the issue. The Z-machine implementation should be at least functionally as much the same as the Glulx implementation.

      The image alt attribute suggestion sounds good, I’ll put that in.

      • Dannii says:

        If you publish the modified ZVM for other people to use, even if only as a demo, we need to at least say that stream 6 is reserved for Vorple. Considering that the storyfile has been published I think we should now. It’s unlikely to ever cause problems, but it’s best to reserve it, so that no one will try to use stream 6 for something else.

        Once the Glk JS stuff is finalised I wouldn’t worry about maintaining the Z-Machine system anymore, but that would be your choice to make.

        • Juhana says:

          Ok, reserving the stream for future use is ok, but the current solution is such a hack that it shouldn’t be standardized :)