I'm new here.

I signed up today and have a question. How do I save my progress in any of the games I play? To clarify, some of the games I looked at had the option to save but others did not. I'm assuming the ones with no save option do not allow saves??


Quest games usually have a save option. Squiffy games automatically save to your browser unless you click "restart." Other systems may only allow saving after you download.


I don't think Squiffy allows you to continue. I think once you quit, you're done. You will see the screen you were last looking at if you restart the game from scratch but the links don't seem to work.


You will see the screen you were last looking at if you restart the game from scratch but the links don't seem to work.

If Squiffy doesn't continue on a saved game, there may be something wrong with the game's javascript. Squiffy attributes and the screen contents are saved every time the player visits a new page; but JS variables and functions aren't.


I'll have to experiment with this. I'd always assumed you were DOA if you left a game. Still, I do a lot of JS and run the code through the functions one just to get them enabled in the engine so it figures that's what kills it.

I'm planning (if I ever get it that far) to use the script you developed to save off Squiffy variables. My game will not be able to be finished in a single session (unless you die).


I'll have to experiment with this. I'd always assumed you were DOA if you left a game. Still, I do a lot of JS and run the code through the functions one just to get them enabled in the engine so it figures that's what kills it.

When you open a game which you already have a save for, it will look in a couple of special attributes. One of these contains all the text from last time. Another, _transition, contains a string which is evaled to get a function which is then called.

So setting the attribute _transition to a string like squiffy.story.sections['name of section'].js will cause that section's JS to be run as soon as a saved game is loaded. You can use this to restore any JS functions and variables from a previous save.
However, the transition attribute is clobbered by squiffy.story.go, so to make use of it you would need to override the save function with one that resets _transition, and also saves any JS variables that you want to preserve in a saved game.

Off the top of my head, I believe I normally use something like this:

[[first section]]:
    // This JS section will now run both  when starting a new game
    //    *and* when resuming a saved game
    //    so put any custom JS functions here

    // modifying the save function:
    squiffy.story.save = function () {
        // This is what the default save function does, to save the text on screen:
        squiffy.set('_output', squiffy.ui.output.html());
        // This is added to make this JS run again when reloading:
        squiffy.set('_transition', "squiffy.story.sections['first section'].js");

        // If you want to preserve JS variables in a saved game,
        //    put the code to save them in Squiffy attributes here
    };

    // We can test for the existence of _transition to check if the game has already saved
    if (squiffy.get('_transition')) {
        // If you have saved any JS variables into Squiffy attributes
        //    code to load them back into JS variables goes here
    } else {
        // Code that you only want to run the first time goes here
        // stuff like setting up JS variables, popups asking the player for their name, or whatever
    }

This looks interesting. I'll have to play with it. I have a lot of JS Functions but nothing saved as a JS variable so I should be fine there.


I'm using the online version of quest and every time I try to create a game, I see this:
Sorry an error occurred while processing your request.

Can anyone help me?


I'm using the online version of quest and every time I try to create a game, I see this:
Sorry an error occurred while processing your request.

You need to be on the secure version of the site.

Go to your browser's address bar, and add https:// to the beginning of the address (replacing http:// if it's there). This means that other people sharing your wifi can't intercept what you're looking at, as well as allowing you to create new games.

The page to create a new Quest game should be https://textadventures.co.uk/create/new


THANK YOU SO MUCH! I'm no expert at this website, so thank you!
It worked! I spent like 1 hour searching online, and yet still didn't have any luck, so THANK YOU.


Log in to post a reply.

Support

Forums