Save a Highscore Locally-Mobile

  • Is there a way to save a highscore locally on an android phone so when you reopen the application your highscore for a level is still there? 100 different levels so 100 different highscores, can i save to some external document or something? or is there something built in to construct that i have not seen yet. Thank you in advance.

  • The webstorage object should handle all this for you.

    Search the forum, you should find informations on how to use it.

  • Thank you i will look more into websorage, just was not sure how it would work with android. Thanks again for your help!

  • I did read if they clear the Cache it will delete the saved scores via webstorage? is this true, if so would there be a better and safer way to save the highscores?

  • Save it through AJAX on a server.

    A topic

    A tutorial

    The answer to many questions

  • I've been over the whole FAQ forum a few times and it is well done and very very helpful, it has answered alot of my questions but with ajax the mobile device would have to have a connection to the internet at all times for that high score system to work unless im mistaken which i could be, and some devices that might run this game could be wifi only, i was just wondering if there was a simple way to save locally that was somewhat secure, i dont really want someone to clear cache and lose all their high scores and i really did not want to host them on a server. but if i have no choice i will go with the webstorage option, thanks for your help :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So far, for strictly local save it is just the webstorage object.

    I'm not sure if a cache clear affects the webstorage saved values. They are supposed to be in a specific spot of the browser. I don't really know much about it.

    Anyway, JS is limited in such a way it is not supposed to give you access to the hard drive, so it is unlikely to have another way of storing local datas then the webstorage.

  • Thank you Kyatric, from everything ive read you really know your stuff and i appreciate you taking hte time to explain this ") ill use the web storage option, should work fine if the cache clear does effect it then oh well people need to be careful.

  • What about native apps through phonegap? Are you saying that saving any data while offline will never be a possibility?

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