Demo of Parchment with new GlkOte implementation

I started this month working on a GlkOte alternative implementation called AsyncGlk. Some code is borrowed from Zarf’s original GlkOte, but I’ve reorganised it and changed to TypeScript. At the moment it’s only a rewrite of GlkOte, but I plan to work on GlkApi in the future, which will allow Parchment to finally move its file system to IndexedDB, as well as connecting to Dropbox/Google Drive etc.

Aside: this is my first proper TypeScript project, and I have to change my perspective on it. I said recently that TypeScript didn’t count as having proper algebraic types as you have to manually handle tagged unions. And that is true, but it’s nowhere near as un-ergonomic as I thought it would be. Actually most of the time the code feels clean, potentially even cleaner than Rust sometimes :wink: (I really dislike if let.)

So I think it’s largely feature complete now, though no doubt it will have bugs. It is already better on mobiles than the original GlkOte. If anyone is able to do any testing it will be greatly appreciated. You can find the demo here:

https://curiousdannii.github.io/parchment-testing/

The Inform 7 template has not been changed to use the new GlkOte library, but I will do that in the future.

But I do have something else to show you: single file Parchment! This is a Parchment packaged into a single HTML file, which includes interpreters for Glulx, Hugo, TADS, and Z-Code, and should work offline even from a local drive (file: URL).

https://github.com/curiousdannii/parchment-testing/raw/gh-pages/dist/single-file/parchment-single-file.zip

A huge thanks to @dfabulich for giving lots of feedback and testing help!

12 Likes

Woo, fantastic.

3 Likes

I really like the single file version. This makes the process to bundle games pretty straightforward if you’re not using Inform 7 but e.g. Inform 6 or any of the other mentioned systems. I do have a script that relies on @zarf’s ifsitegen.py but it’s currently a Windows based script and since the BuildTools package I am maintaining is Linux based, I would definitely switch to this new effort.

I don’t get it running on Windows though either. Not sure if my problem is the same you face but when I try to open a local file, I get this:

Cheers!

2 Likes
  1. Single file mode has been fixed (by embedding a single font file; the browser can synthesise the rest, and it’s only 220KB)
  2. Fixed Counterfeit Monkey and other games which open a collapsed graphics window

TBH, single file mode isn’t ideal for that situation as it includes lots of interpreters you won’t use. You could strip them out of the HTML I guess, but the Parchment for Inform 7 package is probably better suited. ifsitegen.py isn’t a Windows script (I’m not even sure Zarf has a Windows device!) and it should work fine in Linux.

2 Likes

Thanks for the fix, which is much appreciated. I’ll give it a go later :slight_smile:

And sorry for being not precise enough with my statement. I am maintaining the Puddle BuildTools, a collection of interpreters, utilities and scripts that allows transforming Inform 6 sources to ready to use distributions, mostly disk images for the home computers of the late 80s and early 90s. Currently 25 classic systems are supported (a few more in the works) + modern PC. I am working from a WSL2 environment, which integrates a full featured Linux distribution in your Windows System. I can invoke Windows applications through Bash scripts or fire up Linux applications from within Windows. I try to keep things as much as I can on the Linux side, which makes the whole build system work for someone with a regular Linux distribution as well. @mulehollandaise for example, who used the system for the development of Tristam Island.

Anyway. I know of course that ifsitegen.py is a Python utility, so in theory it works well for any host that has a Python interpreter. Practically it requires an existing Inform 7 installation and it looks for it on the standard path, defined by your host system. The Debian system I have set up for WSL2 does not have a desktop environment installed. There is no need for the burden of a desktop environment when all you need is a console to pursue your IF development endeavors. To make ifsitegen.py work under Linux, one needs to install Inform 7 for Linux, which is Gnome based so if I want to install a package which I am actually never going to use, I would also install a full-featured desktop environment which I am not going to use either. That’s quite some overkill only for the purpose of bundling a platform independent interpreter with your game’s modern PC variant. Instead I went for the lesser evil and installed Inform 7 on my Windows host and from my Linux I use a Bash script to fire Python under Windows to bundle my game, using the Windows installation of Inform 7 then for ifsitgen.py as a basis.

This works for me. But it won’t work for someone on a real Linux. But the real problem I have with this is that I only use Inform 6 and in turn I don’t use Inform 7. Still I need to install it to make use of ifsitegen.py. Yes, I could do everything by hand but I am a friend of automating as it saves time and makes things very convenient, especially when you are rolling out a new release for 26 systems, there is no way anything in that process can be manual.

In an ideal world, I’d love to wipe Inform 7 and bundle the z-file together with a single file interpreter, which essentially is what single file Parchment is. I agree it that there are terps in it which you won’t need, still it would a whole universe of overkill less than the solution that I currently have at hand.

Sorry for the detailed explanation but I hope this makes my statement being understood better. I just look at this from a very different angle, under a different light.

You should be able to use the Inform 7 Linux CLI package with ifsitegen.py. You shouldn’t even need to install it, and you could probably identify which files are needed and just bundle them into Puddle. I think it only needs the Templates folder (but nested within a few other levels of folders). (Or you could hack the python script to just directly access the bundled Templates folder and not go searching for it.)

3 Likes

I just tried it, and I can confirm that all you need is the relevant intepreter and website template directories in some_directory/Internal/Templates and the following will work:

ifsitegen.py -a some_directory output.ulx

No other part of the I7 toolchain needs to be locally available for this.

2 Likes

I’ve finally brought the Quixe version up to date, and have also now fixed the Parchment for Inform 7 template:

https://github.com/curiousdannii/parchment-testing/raw/gh-pages/dist/inform7/parchment-for-inform7.zip

Unless anyone reports some bugs I’ll be merging this into the master branch very shortly.

Edit: And this is merged into master and is live on iplayif.com!

1 Like