Save to File and Load from File feature

Issue #64 new
created an issue

Hi there!

First off, I LOVE the Harlowe story format. It's really helped bridge that serious code obstacle that stops me as a writer producing highly effective interactive fiction games.

In fact, I'm currently using Harlowe to finish off a dead game project I was part of, where the team just fell apart. As the writer for said project, I had a game script of 400k words just lying around, and since I'm not a coder, it was just sitting there gathering dust. Harlowe is letting me produce an actual game from this script, so thank you so much.

That said, there's one big potential obstacle I can see if I do complete this game. As I understand it (and I could be wrong), Harlowe has the ability to save, but it's stored in the cache related to that specific site. So if you were to play the same game in a different location, the save wouldn't carry over. Or if you downloaded the HTML and you'd been playing it on a website, it also wouldn't carry. Also, if you deleted your cache, you'd lose your savegame.

If this was a short game, it'd be no problem. But since it's a very long game that would involve multiple playthroughs, it's a real stickler. I think Sugarcube has this functionality, but to be honest, Harlowe is so user-friendly I'd be highly loathe to switch story formats.

I guess my question is this: is my understanding of the Harlowe save mechanics correct, and if so, are there any plans to expand Harlowe's save ability to allow saving and loading to a file?

Comments (2)

  1. kai beasley

    the current harlowe save mechanics save to the computer of the user, so no, you cannot currently leave a game and play it somewhere else. this would be a cool thing, though.
    (save-to-cloud:) would save the game and produce a pin number, say #123456, and
    (load-from-cloud: #123456) would load that save.
    if it used a decimal system, this would allow for 1,000,000 unique save pins. that should be enough, but maybe just to be safe, making a hexadecimal system (ex: #A34F1B) would allow for 16,777,216 different pins.

  2. greyelf

    To be a little more accurate, Harlowe saves to your web-browser's Local Storage cache which mean you need to use the same web-browser on the same machine.

    Like any HTML file you access using a web-browser, if the story HTML file is hosted remotely then the web-browser will associate the saves with the URL's domain and if the HTML file is being accessed locally on the user's machine then it is associated with the filename.

    Saving to a local file is relatively straight forward, saving to a remove server is more complex because it would need to be running a service which understands a previously agreed upon common protocol the web-browser supports (or can be extended to support). That service may also need to understand about user accounts if you want player's saves to be stored individually, this in turn means the story HTML file would need to support some form of unique identification and login. (either automatically or manually)

  3. Log in to comment