Clearing SaveStates isnt possible, and...

0 favourites
  • 2 posts
  • Apparently, using localstorage is a way to get around this,

    Based on what a couple forums have stated:

    " You can use LocalStorage to track which saves are in use, where you can iterate and delete keys. "

    My problem is, Im saving keys for each save slot, checking them, and deleting them, I am NOT clearing memory up on my system by this method, am I?

    In theory all that would be happening is I cleared a key, now that save cannot be used, so in other words,

    That save permanently uses memory unless I found it manually and deleted it.

    The best I could possibly do to make sure a player isn't gradually using more and more memory is by overwriting an existing save state with this method slapped ontop of it.

    It feels like an oversight, the only "risk" I've seen with giving people the ability to delete save states is the idea that you can delete system components with it.

    But this is an ENGINE, and I am a developer of a game utilizing it.

    It would be my job to make sure thats not possible, limiting file input types is already a thing in C2 and C3, furthermore, I can add name comparisons on savestates as a second security measure.

    I saw suggestions of running Javascript instead and people stated it was a " Hacky " method, I don't think so.

    Your using the engine to pass code, hacky would be like changing the engine itself.

    So, I was wondering, how does this whole

    " window.indexedDB.deleteDatabase('_C2SaveStates'); " Thing work anyway?

    Where do I input the specific json and how do I manipulate this line of code to include the target file?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok so:

    " window.indexedDB.deleteDatabase('_C2SaveStates'); "

    Worked flawlessly, I couldn't find any issues with it other than it doesn't discriminate when it comes to which save its deleting,

    so I can't really have multiple saves and the ability to manually delete each.

    I thought perhaps I could delete files with NW.js since it has file manipulation, but uh, I can't find the file path for these so I can't really delete them with this method.

    Any suggestions on how I can find these files? They're saved as .jsons since thats what I set them to, I really wanna use this method because it allows me to make folders and organize my game in a way that looks professional,

    I can even hide my files in their x64 Program folder and work on a launcher for my game.

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