Handling save game failure

0 favourites
  • 6 posts
From the Asset Store
You must shoot down the enemy planes and eliminate them to earn points.
  • From my last game, Project Dimentia Bodhisattva, (http://www.newgrounds.com/portal/view/660664) (the game takes 5-15 hours to complete. Use Chrome on Windows if you wanna play.) I see a few players ran into situations where the game is not saved. I can narrow down the problems as follow:

    1. They don't have enough storage in their browser's setting.

    2. Some of their browser's plugin/setting prevent the game to save.

    These issues could be remedy by setting the right parameters in the browser and/or disable certain plugin, but when I was aware of this, several players were already affected of this issue and they lost their game progress.

    The problem is that On Saved trigger will only be fired if the save is successful. If the save is never successful, the trigger is never fired - and game is never saved. There is no "On Save Failed" trigger, I see.

    So I would like to safeguard this for my next game. My questions:

    1. Is there some sort of way that I can track the saving progress of the save game function before "On Save Completed" trigger?

    2. "On Save Completed" trigger is the only opportunity to get the "saved data" JSON, but if it is never triggered, I can't get the data. Is there an alternative way to get this JSON without saving the game? (Are there other plugins out there that allow you to access this JSON?)

    3. Are there some sort of Javascript codes/plugin/etc. that allow us to check for remaining allowable memory in browser or the like? At least, before the game starts, we should be able to test if the game can save properly or not.

    4. Any plugin/alternative/suggestion/other method for save/load game?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • bump.

    If there are no solutions to save failure yet, perhaps I will need to go for password route. A bigger Flash RPG game such as Phoenotopia also did this as several people lost their saved data on their browser. Password is put into clipboard and player can save it somewhere. Player can then paste the password on the game's continue screen.

    From the look, I believe Phoenotopia simply uses some encryption algorithm to encrypt the whole save data and make that a password.

    But for C2, if the save failed, I will not be able to retrieve the save state json at all... the last resort would be going down and dirty myself...

    Another problem is putting data into clipboard. I see from another thread answered by R0J0hound that only Node Webkit can do clipboard stuff as it is OS-specific thing.

    Are there other things I can do to store data or give data to the player?

  • Ashley, is it possible for the future release to be able to provide SaveStateJSON without acquiring it only from the trigger "on save success"?

  • If I activate in Chrome 'Block sites from setting any data' I get this Error in the Console:

    Uncaught (in promise) Error: No available storage method found.

    at b (http://localhost:8000/LocalStorage_plugin.js:17:9502)

    It seems that with this error, some or all LocalStorage events does'nt work. I tried OnError and 'On Item missing'.

    My workaround is: make a variable like 'isSaved' and set it to 0 and set it to 1 in the event 'On item set'.

    Now you can try on the start of your game to set the variable. If the variable is set to 1 it works, if not it's not possible to save the game at all.

  • We could add a "On save failed" trigger, but it doesn't necessary help. Browsers take privacy very seriously and deliberately make it hard for the page to know what is happening to its data. For example Chrome in incognito mode will say everything saved to disk just fine, then when you close the window, delete it all. That's by design, and they deliberately prevent pages from identifying this mode so that the page can't nag them to have their data saved - it just looks like it worked.

    So even if we added this, you don't know when to show the alternative copy-paste system, because you can't really tell if the data will last permanently or not.

  • We could add a "On save failed" trigger, but it doesn't necessary help. Browsers take privacy very seriously and deliberately make it hard for the page to know what is happening to its data. For example Chrome in incognito mode will say everything saved to disk just fine, then when you close the window, delete it all. That's by design, and they deliberately prevent pages from identifying this mode so that the page can't nag them to have their data saved - it just looks like it worked.

    So even if we added this, you don't know when to show the alternative copy-paste system, because you can't really tell if the data will last permanently or not.

    Hmm, true. Still, it's better than not having anything as a "save failed" response. The manual should note that it won't work reliably when the game is run in private mode.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)