How do I clear and/or load localstorage

0 favourites
  • 1 posts
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • I use NW.js and i have this problem but also every other browser has the problem

    I have 4 global var for localstorage and when i preview in debug, localstorage says "loading" for 2-3min

    After it loads the 4 variables, they also say "loading" for another 2-3min until they show their values.

    I have put a button in my game to press and remove the keys and then clear localstorage.

    Well, ive pressed it....it took 15min to remove 1 of 4 keys! I didnt wait to see how long it would take for the others!

    This is a huge problem for me since my game is almost ready and because of that i cant publish it.

    The 4 global variables are just numbers (score,level,upgrade 1,upgrade 2) that i want them to be kept in the game after reboot but i also want the player to be able to clear all that and start fresh if he wants.

    Any ideas or alternatives?

    UPDATE I have updated NW.js to latest version and its working fine (for now).

    I have not tested any other browsers but im ok for now and i can go on and finish my game...

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)