0 Favourites

Is there a way to clear the save game data?

  • So im using the standard "Save/Load" from the System actions, and i wanted to implement and option to clear all the save games, is there a way to do this? I didnt find an action to this, shouldnt be one for this? Its pretty common for games to have a way to hard reset it.

  • There is no way to delete a save, the way you could do it is just deleting a reference to a save, like checking a webstorage value that would be related to that save.

    @Ashley the request is still really valid, could a simple "delete existing save (by name)" exist?

  • There is no way to delete a save, the way you could do it is just deleting a reference to a save, like checking a webstorage value that would be related to that save.

    Ashley the request is still really valid, could a simple "delete existing save (by name)" exist?

    you can delete the savegame by "clear cache" of your browser... and this isn't good if you want to make a game online...

    but it depends what do you want to store... save game system will save all, position of the instance, variable, global variable etc...

    for delete a savegame is possible to save a state at the first access like "reset" savestate, and when you want to reset all stats, just click a button, and a "reset" savestate will replace the old gamesave... that should work...

    but I suggest to save a game on some server with a php an AJAX, and if the player want to reset the game, just do this process and replace with the json file on the server... I don't like to store information on the browser... if you are making a game with a lot of level, or something important to continue the game (store coin, jems, position of the sprite...levels..other important stuff..)....and the user clear the cache, just say bye bye to your save...

    but depends of the game... if you are making a game like tetris... and just post your score at the end of the game... no problem

    EDIT: I add a capx

  • Oh man thanks Ribis thats a really good idea, im making and Idle game like Coockie Clicker or Clicker Heroes, so i think the cache will be fine.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Its been a while since I used C2. but I started updating an old game and I found and I couldn't delete save game either (easily anyways..)

    I found a work around if you want to delete the entire save database for the game. Use the Browser object and execute the javascript "window.indexedDB.deleteDatabase('_C2SaveStates');"

    I haven't found an easy way to delete individual keys from the "saves" objectstore.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
763 305,607
asikanddestroy's avatar
asikanddestroy
Unread hot topic
232 177,664
Tetriser's avatar
Tetriser
Unread hot topic
266 15,897
GameeApp's avatar
GameeApp