How to access Web Storage from another engine?

Discussion and feedback on Construct 2

Post » Mon Dec 15, 2014 5:49 pm

Hello, I was promoting Construct 2 to some colleagues from my university when someone came up with the following question:

"Let's say I published a game on the App Store using Construct 2 as a prototype and then I want to migrate it in a future update to Unity, how could I keep the scores of the players? There is a way to access the Web Storage using Unity? "

And I'm here to pass forward this question because I'm not sure what could be done in this case.

@Ashley , what can be done? Anyone?


Thanks!
B
12
S
3
G
1
Posts: 188
Reputation: 1,377

Post » Mon Dec 15, 2014 7:10 pm

Wouldn't it make more sense just to read the saved data then re-save as json or some other method?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,413
Reputation: 59,510

Post » Mon Dec 15, 2014 7:38 pm

Check yourself, make a demo with a local storage keypair.
In Chrome open developer tools, look for the local storage under resources.
As far a other platforms go, it depends on the conversion.
Kind of what Ashley is getting at with the latest blog post:
https://www.scirra.com/blog
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276

Post » Mon Dec 15, 2014 10:44 pm

Well considering the situation, what would be the most viable way to save the score, so that you could access it by another engine?
Json is a solution? What else?

Thanks @zenox98 and @newt !
B
12
S
3
G
1
Posts: 188
Reputation: 1,377

Post » Mon Dec 15, 2014 11:27 pm

It sounds like a pretty exotic question - I don't know many people who would re-write the entire game compatibly in a different engine later on, since that's double the amount of work (why not make two games?) Still, the easiest solution is to store everything on a server backend and have both versions communicate with that. In the browser you could possibly share local storage, but if you're switching from a hybrid to a native app, I don't think there's any way to preserve locally saved data.
Scirra Founder
B
397
S
236
G
88
Posts: 24,408
Reputation: 194,506


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests