0 Favourites

How do I clear and/or load 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.

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,137
karshinkoff's avatar
karshinkoff
Unread hot topic
95 7,661
PreacH's avatar
PreacH
Unread hot topic
56 4,731
MPPlantOfficial's avatar
MPPlantOfficial