Thanks to the work of @dfabulichiplayif.com now offers a sitegen service, allowing you to upload your storyfile (Adrift 4, Glulx, Hugo, TADS 2/3, Z-Code) and get a tailored single-file version of Parchment. Try it out here:
I’ll be making some additional changes behind the scenes over the coming weeks, but nothing that will be too noticeable, and it is ready to use right now. Single-file Parchment files can be downloaded and played offline, or can be uploaded to itch.io and other services.
This converter will be especially useful for making games playable on Itch.io. If you only upload a Zcode/Glulx story file to Itch, players have to download your file and use an interpreter to play it. If you also upload an HTML file, Itch can include a “Run Game” button, allowing your players to play your game right there in a web browser, or even download the HTML file and play it offline without a separate interpreter.
You don’t even have to upload the file by hand! https://iplayif.com/api/sitegen has a REST API, allowing you to convert IF game files to HTML with a simple HTTP request. For example, you can run this curl command to convert the LostPig.z8 story file to HTML:
You may find curl easier to work with than ifsitegen.py, a Python 3 script that does something similar. ifsitegen.py requires you to install Inform 7, it only works on Zcode and Glulx story files, and it may use an old version of Parchment.
The Parchment HTML Converter at https://iplayif.com/api/sitegen has no dependencies, it supports more files, and it always uses the very latest version of Parchment.
For an Inform 7 game, would the result of this be basically the same as what happens when you “Release along with an interpreter,” or is this something different?
Basically the same, except that all the resources are embedded into one file rather than having an interpreter folder. And it has the advantage that you don’t need to do anything to support images.
Is the main advantage of this that it makes it more user-friendly (for someone who’s not playing online)? Or maybe some places like itch.io only accept a single file?
Does the author have any way to edit the CSS?
Oh–does Parchment usually not support images for online play?
Parchment does, but Inform 7 doesn’t incorporate the images into the Parchment files appropriately, so you need to run an additional script after compiling to make them work.
It is basically essential for the non-Glulx/ZCode terps because they use WASM files, which can’t be loaded from a file: URL. The WASM files get base64 encoded so are 33% bigger, but the increase from encoding disappears once they’re zipped.
And single file is just generally simpler. Much easier to just have a single file to give someone or upload somewhere, than to deal with a folder of files, to make sure they’re in the right place, have the right file types set, etc.
You can edit the HTML to add any CSS you like. With the usual caveats that changing colours is easy and safe, but changing the measurements of anything risks breaking things (I’ve spent a long time carefully calibrating the AsyncGlk CSS.)
This is cool. I’ll definitely check it out. I can produce ulx files but have not yet looked into wrapping it up as something easy to distribute and play without installing additional software. This seems like just the ticket!