What is a good practise to save data when using nw.js?

0 favourites
  • 4 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • I have updated the nw.js version of a game.

    I am using local storage to save and load data.

    If I noticed correctly, local storage data from the previous nw.js-version is not available anymore. (the game starts up as if it is the first time, after the update)

    Can you confirm that this happens?

    And if so, what save method do you advise if I would want to ever update the game with an even newer version of nw.js?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In nwjs you can write/read files silently. So you can save games to a folder, for example NWjs.UserFolder & "YourAppName\save01.txt"

    If you're currently saving lots of different keys with Local Storage, it would be easier to put these values into an array or a dictionary, and write Array.AsJSON to the save file.

  • Thanks for your reply Dop2000.

    What about if I also export to web? Saving to a folder sounds like a NW.js-characteristic?

  • With web export you can save to local storage or to some cloud storage. You can also save to a file, but players will be shown "Save as" dialogue.

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