Vorple for Glulx preview now available

The long wait is over! Vorple has been completely rewritten and is now compatible with Glulx instead of Z-machine. That means that it’s finally feasible to write Vorple stories with Inform 7 without having to worry about Z-machine limitations.

To those who are new to Vorple, it’s a set of Inform extensions and a custom web interpreter that lets you issue JavaScript commands from the story to the web browser. The extensions use this to expand Inform’s capabilities by making it possible to add external features like popup notifications and to modify the interpreter layout and output, for example with font styles and colors.

There are a lot of new features and extensions and existing extensions have been greatly expanded. Here are all the included extensions in addition to the core Vorple extension:

  • Command Prompt Control — manipulating the player’s command, the prompt, and the command history
  • Element Manipulation — low-level tools for modifying the interpreter layout
  • Hyperlinks — clickable links that can trigger parser commands, web links or JavaScript code
  • Modal Windows — popup windows to display information
  • Multimedia — pictures, audio and playlists
  • Notifications — small information windows that appear and disappear automatically
  • Screen Effects — font styles, colors, text alignment, headers, lists
  • Tooltips — tips that appear on demand or when placing the mouse cursor over something

Many existing features have been redone or renamed, so existing Vorple projects are likely to need some adjustment to get working with the new version. The long changelog can be read here.

What does it mean that it’s a preview? There are still some known issues and missing features that should be in the “final” version. Here’s the relevant part of the documentation:

So the system works, but there’s still work to be done. If you have a “serious” project in mind, Vorple is stable enough to use. The Inform phrases are unlikely to change much between now and the full release.

To get started, download Vorple and read the documentation. Each extension has its own documentation included with the extension. There’s a demo which is still rather ascetic — one of the things that are on the to-do list for the full release.

The purpose of this preview release is to get some more people to try the system. If you do try it and find bugs, it’d be great if you could report them — either to GitHub (links are at the end of the quote above) or here, private messages work too. I would also be interested to know if the documentation and installation instructions needs improving, especially since it needs some setup to get going.

Hugo Labrande is working on the Inform 6 version which is almost ready, but didn’t quite make it for today. If you’re interested in the I6 version, either trying it out or contributing, you can contact Hugo directly (forum user mulehollandaise.)

If you happen to be near London in about a month, I’ll be talking about Vorple via Skype at the Oxford and London IF group’s IF Tool Innovation meeting on May 31st.

Excellent work, congratulations!

Sweet. :slight_smile:

Wonderful–congratulations and thanks for the years of work!

Fantastic! :smiley:

I tried to use Vorple with 6L38 (because languages other than English don’t work with 6M, and I write in French) and I had to make a few modification to the core extension to make it work. The only drawback is that you cannot include external files because of this bug, so you have to add sounds, images, CSS and Javascript by hand in the generated folder (and add a line in play.html in the case of CSS and JS).

Below are the changes I made, in case of.

[rant=Changes to Vorple.i7x]Change “Last rule for” and “First rule for” into “Last for” and “First for” (without the word “rule”) and change

if [some variable] is: -- [some text]: […] -- [some text]: […] [and so on]by the long form version "if … else if … else if …[/rant]
I also found some bugs in the examples. I’ll send them soon.

Thanks again for the excellent work!

This is very exciting! I know a lot of people want the functionality that Vorple provides in bigger games, and the interpreter is really cool!

Cool. Got “Vorple Feature Demo” working on my system. I manually downloaded the material assets off the demo URL.

By the way, why is it impossible to play offline to a Vorple game whithout a local server? It was not the case with the previous version, and it makes more difficult to distribute an IF made with Vorple.

Very good question! When viewing local files, browsers disable some features for security reasons. Other interpreters and web-only systems like Parchment, Twine or Texture work from the file system because they use a fixed set of features that are known to not be restricted. Vorple games on the other hand can potentially use any feature so they may or may not work when run as a local file, depending on what they do. This was a problem with the previous version too. Even worse, the set of restricted features is different for each browser so the author might use Firefox to develop and it would work fine, but people who download the game might not get it working with Chrome.

So the latest version requires a local server, which guarantees that the browser’s security restrictions don’t cause extra problems for the author or the players. A big part of that decision is also the fact that Emscripten (the software that compiles the interpreter from C to JavaScript) generates code that automatically requires a server, and changing it would be a lot of work.

For distributing games as a download, Electron is a relatively easy way to turn the game into an executable file (the same software that Lectrote uses). I might later write a tutorial on how to do that.

Thanks for the explanation! And Electron indeed looks like the way to go. I’m definitely waiting for the tutorial! (even if I’ll try to manage myself in the meantime.)

I look forward to this tutorial as well - in general, I’d love to learn how to make Inform’s playable website into a contained app. Fluid will do this with the push of a button on OSX, but the developer isn’t keen that people distribute what they make with it.

I’m confused by this. Wouldn’t you use Quixe instead of the Emscripten generated code? What am I missing?

I notice that this uses Git interpreter and CheapGlk - github.com/vorple/Git/commit/bc … abeebbc75b

Is the Git interpreter modified to tell Vorple that a file is closed (to call vorple.fileClosed function)? Are there other mods to Git?

That is also a very good question! Vorple replaces Glk almost completely, except for printing plain text, reading input and, for compatibility with existing code, bold and italic text formatting. Git with CheapGlk provides exactly that with no changes needed to Git and only minimal hooks in CheapGlk. Quixe+GlkOte on the other hand is a (nearly) full implementation of Glulx/Glk so I would have to rip out most of the unnecessary stuff and maintain a fork. With Git I can use the main repository directly with no extra work or maintenance required.

Another reason is that HugoJS uses the same setup (C interpreter as the engine) and shares the same interpreter interface (called Haven) which means that any updates to the interface automatically apply to both interpreters.

And finally, on some browsers Git is 2-3 times faster than Quixe. That means that performance won’t be a bottleneck for any Counterfeit Monkey-sized project that does expensive calculations (compared to offline interpreters). A big project like that could distribute the game in an executable that uses Firefox to run it and it would be almost as fast as with a native Git interpreter.

The only downside is that the engine’s filesize is 1.6 Mb compared to Quixe’s ~0.5 Mb, and even that isn’t that bad unless you’re on a very slow mobile connection. And of course that it can’t run directly from the filesystem.

That sounds great!

By the way: what about Inform6 support?

Thanks in advance :wink:.

Hi Sothoth! The I6 libs are essentially done, I just need to test them all, but it shouldnt take too long (core seems to work nicely). I’m hoping to have that done by next weekend. I’ll probably be the maintainer for these, so don’t hesitate to get in touch :slight_smile:

Superb! Thank you very much, mulehollandaise :slight_smile:. I’m interested on it very much.

The preview version of the Inform 6 librairies for Vorple 3 is now available on Github!

Every feature from the I7 libs has been ported, and every single example has been adapted. The names of the functions are mostly the same, so a lot of things should be backwards-compatible with the previous version, but expect to need to adapt some things. There are a couple of small bugs (for instance a sometimes incoherent number of new lines printed), which I logged on the repository’s tracker. Please play around with it and let me know if you encounter any other problems!

Keep in mind that Vorple 3 is only compatible with Glulx (whereas the previous version was only Z-Machine compatible). If you really want to keep it Z-Machine, the old version of the librairies is still available on my Bitbucket.

Happy Vorpling!