[Irrelevant?] Complications Regarding Saving a File From a TADS 3 Game in Parchment

So I’m not having problems right now, but I would like to know if anyone knows of some common issues and solutions. I have a part in the beginning of my game that will check for HTML TADS capabilities in the current interpreter, and give a disclaimer that some stuff might be missing, even if the game is still completely playable.

In particular, I use a settings file to allow the player to enter in their preferences once, and have those preferences re-applied, each time the game starts up again in the future, which allows them to skip the “please enter in your settings” stage next time. This file is also used to track what notices have already appeared before, and gives the option to skip in the future, similar to a “do not show this message again” button in visual games.

If the web-based interpreter has issues saving and loaded this preferences file (due to browser constraints), then I would like to also tell the player about some of the common problems and solutions, so they can at least use their preferences file, even if the other features are not supported by the interpreter.

Thank you for the help!

In the meantime, I’m gonna do a search on the forum, and see if I find anything, and probably also link it here.

I’ve only managed to find this, so far:

From the landscape of posts I was scrolling, it seems Parchments is very airtight about how files are saved and loaded, and very few complications seem to come up! A lot of modern web browsers seem to be a lot less finicky, too.

Further stuff on web storage APIs: the short answer is “it’s complicated” but off the top of my head:

  • In general you get about 5MB per “origin” (basically domain name).
  • Some people (including me, and especially some users here, I feel like) have their browsers set to clear cookies etc. when they close their browser. Which will clear even the supposedly persistent storage. But you have to explicitly set that, so usually those people are aware of it and you don’t have to worry about them.
  • Some browsers (cough Safari) clear persistent data if you haven’t been to that domain for a week. So if people are playing only occasionally, they may lose their save.
  • The localStorage API is tied to the third-party cookies setting, generally: which some people also have turned off, and IIRC some browsers recommend that as a security/privacy thing (questionable how much it helps, but…). So on sites like itch, where the actual games are on a CDN (a separate storage farm wherever) you’ll get that “no local storage adapters found” error from Twine/SugarCube.
  • And finally, this may be standardized better now (?) but there used to be browsers (Opera? Opera mobile?) which would silently let you “store” data even after you ran out of space, and just dump it, instead of throwing an error. So you’d have to test by storing it and then reading it back to see if it “actually” stored. Or maybe they’d store it and then just lose in when you closed the window/tab? I kind of think this is better now.

So on the browser side it’s a bit of a mess. I don’t know much about Parchment but I have the impression it does pretty well. There was some talk recently about the transcript function not being hooked up (sometimes?) to anywhere that you could actually save it to a file on your computer.

In web dev it is possible to make a download button that dumps the storage, and an upload button that lets people load stuff from a file, and I wish more tools would do that… it’s really not that hard…

Dunno if any of that’s helpful at all, but I’m procrastinating about a thing, so there you go. :slight_smile:

3 Likes