Local storage and exported games?

0 favourites
  • 4 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • Hi!

    When testing local storage during development I see it works well. How do I avoid any saved parameters to be carried over to the exported version (exporting for the web)?

    Or does these saved parameters automatically not being copied when exporting?

    Thanks!

    Tagged:

  • You mean the data you saved in Local Storage while developing the game? It won't be exported of course.

    Every browser has its own local storage location, and it's separate for every website domain. Even if you play your exported game in the same browser you used for development, the storage contents will be different.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As said above, persisted data is not part of the game. Imagine software that saves a file on disk, the software can be used on any computer, but the file on your hard drive won't be accessed when running the software on my computer. In the same way, when people play your game the game will use their local storage.

    You can add code to make it possible for people to get rid of the data you’ve added to their local storage, maybe someone wants to restart from the beginning without having values set. Anyways it is possible to open the dev tools and navigate to the application menu to remove the stored data.

    Take a look art local storage at mozillas documentation page developer.mozilla.org/en-US/docs/Web/API/Window/localStorage

  • Thank you both for the detailed explanation.

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