Saving reader progress without the Save Dialog

Hi, I’m new to Inform development, so apologies if my question pegs me as a hopeless newbie :slight_smile:

I’m collaborating on a work of IF that will be presented in a public place in a sort of “kiosk” mode. There will be passerbys interaction with the work of IF and I’d like to give them a simple way of saving their progress and picking up where they left off.

Is there a way to save off a reader’s progress without presenting the reader with a save dialog? What I’d like to do is automatically save the game when the reader quits (or saves) and let them recover the game via a user name or unique id number.

You may want to take a look at the Alternative Permadeath extension. (Nominally mine, but almost all code comes from Erik Temple. It is not yet officially released, but I put a temporary version online for your use.) It doesn’t quite do what you want, but it does show you how to save a game without presenting a save dialog.

Thanks, Victor! That looks very useful!

Note that the code in that extension will get you only so far–you will also need a way to dynamically name the file, I think. Some code for doing that can be found here:

https://intfiction.org/t/help-me-modify-the-script-command-for-science/1237/1

This example applies to script files, but should be modifiable to work with saved game files.

–Erik

If your kiosk is running Parchment, then the save action just updates the current URL with an encoded save state. Reloading (or bookmarking, or pasting) the URL will restore the save game.

Thanks for the code suggestions… I’ve been playing around with Alternative Permadeath and the dynamic file naming code and they are doing the trick.

I did run into a file loading sensitivity that I would love to get advice regarding. It appears that successfully loading a saved game requires the game to not have changed at all. The slightest change to the game code (such as adding a space in quoted text) seems to be enough to make a glkdata file unloadable.

Does that sound correct? If so, is there any way around it?

Yes.

Not that I know of, unfortunately.