How do I make a highscore without webstorage?

Get help using Construct 2

Post » Sun Apr 27, 2014 6:54 pm

Hello!
This is the first time i couldnt figure something out by myself, which is why I depend on your help. I want to publish my first android game soon. I want to use CocoonJS but it doesnt support WebStorage. I just want to save a simple highscore and when the game is started it loads the highscore.

I hope you have any idea how to solve this problem. Thank you :)
B
2
Posts: 6
Reputation: 162

Post » Sun Apr 27, 2014 7:29 pm

CocoonJS does support WebStorage.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,684

Post » Sun Apr 27, 2014 7:39 pm

Is there still any way to make a highscore without webstorage? I am almost done with my game and this is the only part I can't figure out. At the end of the game I'd like to show the highscore. Thank You.
B
5
Posts: 12
Reputation: 249

Post » Sun Apr 27, 2014 8:24 pm

In chrome the save game works well but when I test the game with the Cocoonjs launcher it shows the message (Alert, Javascript error. SyntaxError:Unexpected token ILLEGAL Webstorage_common.js,line ( col undefined). It doesnt seem to work at all. Do you have any idea what the problem is?
B
2
Posts: 6
Reputation: 162

Post » Sun Apr 27, 2014 8:54 pm

I used the clay.io plugin for my games, it supports leaderboards and achievements. But I don't know if it works with Cocoon JS.
B
54
S
16
G
6
Posts: 719
Reputation: 9,207

Post » Sun Apr 27, 2014 8:58 pm

Message: avion is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
It seems it doesnt work with CocoonJS ->
B
2
Posts: 6
Reputation: 162

Post » Mon Apr 28, 2014 8:34 am

Does anyone know if its even possible to make a highscore with CocoonJS? There has to be a way to save/load data on mobile phone. Are there any other ways to do it? What about NodeWebkit or Array Load/Save.
B
2
Posts: 6
Reputation: 162

Post » Mon Apr 28, 2014 9:39 am

Cocoon definitely does support WebStorage, so it's probably something to do with your implementation. I'm using WS for persistent stats in a game I'm currently working on and even with the current, rather buggy beta release, it's behaving perfectly.

Otherwise, you can set up your own online score table with PHP and MySQL by following ArcadeEd's excellent tutorial. Obviously this requires a data connection. You should probably follow that tutorial even if you have an offline score system, as it deals with working with arrays.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Mon Apr 28, 2014 10:07 am

Ok thank you, it is good to know that it is possible to use Webstorage. I will try to find out why it isnt working for me.
B
2
Posts: 6
Reputation: 162


Return to How do I....?

Who is online

Users browsing this forum: rayolf and 11 guests