local storage

0 favourites
  • 9 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • Hello everyone, I am facing some issues. When I finished developing my game and all the functionalities were working fine. However, after publishing it on Google Play and downloading the game on a mobile device, the local storage functionality is missing. The problem is that I cannot store data and cannot keep track of the high score.

  • Did you test it on a local apk before you published it? Is it working there?

  • You may be using Local Storage events incorrectly. I've seen this many times, when the same events that work on computer don't work on mobile, because mobile devices are slower and it takes slightly longer to process LS requests.

    Check out some tutorials on how to use Local Storage.

  • Try Construct 3

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

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

    Show the event sheet where you save and load.

    You are doing something wrong, local storage on android works fine.

  • Thank you all for answering my question

    Lionz.i was tried.there were not working.

    Dop2000. Can you provide me with some accurate tutorials, please?

    igortyhon.

  • The way you save high score may be the problem. If the event on your screenshot is top-level event, it will be executed many times per second. If at the same time you switch to another layout or restart the layout, it will try to read from and write to Local Storage at the same time. And this may be the reason why it doesn't work.

    Ideally you should only read the score once at the start of the game. For example in loader layout. And save the score also only once at the end of the level.

  • I understand what you mean. Can you please guide me on how to implement it? I have no idea at all.

  • There are plenty of tutorials including the official example:

    editor.construct.net

    Try adding "Trigger once" to the event where you save high score to LS. This may fix your issue.

  • Hi.

    Where you're uploading you're doing fine.

    Where you save you have a problem, you do it too often.

    You need to optimize your saving, it's best to do it by trigger. For example in the event when your player touched a coin and you gave him points.

    If it's not clear, you can make it even simpler. Do this regularly every few seconds. That way the data will have time to save and performance won't suffer.

    I showed in the screenshot.

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