How do I stop the players score being lost?!

Get help using Construct 2

Post » Wed Jun 25, 2014 7:12 am

Hi everyone,

so I have a mobile game which (no surprises) uses webstorage to save the users score.

Problem: When I update the app via Google Playstore (or Apple App Store) the users score is lost!

Am I missing something simple here or is this a limitation of web storage?!

Thanks for any help at all - this is a major headache for me!
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Wed Jun 25, 2014 2:35 pm

I guess the Webstorage is always reset when you reinstall (or update) the app. I can't think of a way of avoiding it without using an external saving method, like posting it to a DB and having a variable that makes you update the Webstorage with the DB values on the first run.

Obviously, this method would not work for you since I believe you're using Webstorage to avoid setting up an external highscore system...
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Wed Jun 25, 2014 4:39 pm

Pretty much exactly. It's strange though - someone must have a solution for this?

When I'm reading through the documentation on saving the wording seems to suggest this shouldn't actually be an issue - does anyone know if I would be better swapping from webstorage to using the 'save' system?

p.s thanks for checking this out @brunopalermo
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Wed Jun 25, 2014 5:09 pm

"Usually you'll be able to change your project and old games will still load just fine. " - Versioning

@Ashley Sorry for dragging you in here; but I would be hugely appreciative if you could clarify this for me! Does the above mean the 'save' feature will survive the mobile update process? Is it better to use that instead of webstorage?

Thank you :)
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Wed Jun 25, 2014 6:57 pm

It shouldn't clear, no. Which exporter are you using specifically?
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143

Post » Wed Jun 25, 2014 7:03 pm

I'm using CocoonJs.

I've tested it and the issue appears across all of their compiler versions 2.0.1, 2.0.0 and 1.4.7: compiling for the Google PlayStore.

The app has no problems saving or re-loading the data normally. But when I push a new update through the store it doesn't re-load the users scores.

(Thank you so much for looking at this topic its a major headache for me).
B
13
S
6
Posts: 130
Reputation: 1,553


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests