Jump to content

Save game feature question


Recommended Posts

So i want to implement a simple save and load feature in my game. After reading some threads i think something like this is sufficient.


localStorage.setItem('myObject', JSON.stringify(myObject));


But after seeing this about localstorage: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage#localStorage


Important: This guide is out-of-date. For up-to-date information on Web Storage, you should visit the Web Storage landing page for reference, and ourUsing the Web Storage API guide for a walkthrough.


And i see that store.js also using, i think, this way of saving objects...


Well my question is how do i save and load an object the best way and that it is still usable after a while (not deprecated)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...