How does Squiffy save your game?

I'm using squiffy for my school project and I want to know how does squiffy keep track of your game.
just for documentation purposes only.


Squiffy uses JSON and Javascript's localStorage function.

The latter causes serious problems on iPhones, iPads and Macs when they are in private browsing mode, resulting in game load failure. On all my games I include a little bit of code that checks whether the browser has access to localStorage and, if not, asks the user to disable it.


Oh, the private browsing you mean like the Incognito Mode in Chrome?

does squiffy also save your points? like the one inside @set score = 5

and can I have the code you insert for localStorage checking?

Thanks..


Yes, Squiffy attributes are saved between sessions.

In terms of the code that I detect private browsing on Apple products you can use:

<script>
try { localStorage.test = 2; } catch (e) {
alert("my error message");
}
</script>

This will need to be inserted in your HTML template. Basically it attempts to write to localStorage and if it fails it shows the error message.

I have flagged with the new Squiffy developer as it or something similar should probably be included as standard.


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums