Question about the new "Local Storage" plugin

  • Toddler

    sqiddster

    Aphrodite

    I had made a "cache" plugin of local storage. Does it look better?

  • You know it's bad when an "upgrade" is so awesome, users need to make plugins to *fix* it.

    Thank you for your effort rexrainbow.

  • Toddler

    You are welcome.

    My team member also needs it, he does not like the async - reading, either.

  • I currently use Webstorage as a replacement for variables all over the place, and very often set its values every tick.

    Even minecraft waits 120 ticks before writing to disk... why would you need to write values to disk every tick? Doesn't Airscape use check points? Or are you trying to save the exact position when the user quits or crashes? Not sure I understand the benefit to replace variables.. does it free up memory or something? that constant fileI/O must create a huge performance drain...

  • I realized today that there is nothing wrong with the way the new storage is.

    Just use Dictionary for your data. When you want to save long term use the new LocalStorage. When loading use a splash screen and when it's loaded from local storage into dictionary your all good. Honestly this is how I do saving loading in Java/C++/Unity anyways.

  • jobel it's because I'm use them to actually replace variables that I need to be saved. Some of these values, e.g. total time played in milliseconds, are set every tick.

    I guess I should change everything over to global variables, but weirdly enough I've never seen any performance problems. Apart from the GPU side of things, the game seems to perform quite well on a lot of machines.

    Again, '2012 me' would have implemented it a very different way if he knew any better. But due to a lack of best practices documentation, he really didn't know what to do. 2012 me didn't even know what file I/O was!

  • I realized today that there is nothing wrong with the way the new storage is.

    Just use Dictionary for your data. When you want to save long term use the new LocalStorage. When loading use a splash screen and when it's loaded from local storage into dictionary your all good. Honestly this is how I do saving loading in Java/C++/Unity anyways.

    Couldn't agree more with this

  • I'm sorry if this has been discussed or noted somewhere before, but when is the online plugin reference entry for this new LocalStorage coming? I know it's pretty similar to WebStorage, but some actions, events and expressions still confuse me.

    For example how exactly to handle the "On all key names loaded" event, since this appears useful to me.

  • khenkel

    Download r202, then you will find it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • khenkel

    Download r202, then you will find it.

    I followed your cryptic guide, but still wasn't able to find the corresponding reference entry. (besides I also downloaded it yesterday)

    All available "Help" links lead me to the scirra.com main page. (the local manual has no LocalStorage either)

  • khenkel The manual is only updated for stable releases.

  • khenkel, beta releases don't have documentation. The reference docs will only be added when plugin goes to stable. The reasoning is that this plugin is in beta, and can change a zillion times over before stable, and by the looks of things some changes are coming.

  • ramones DUTOIT

    Thanks for the info! This makes sense

  • rexrainbow your cache plugin seems even more confusing compared to simply load the values from the storage when needed, save them when needed, and not using them otherwise since.. well, those are saved infos that you only need to load at certain times, caching them is not something I would want as I woukd rather use the original info rather than even trying to call this one, could be useful for somebody though I guess.

  • Aphrodite

    Thanks for comment.

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