[request] Test if save exist condition

Discussion and feedback on Construct 2

Post » Mon Jan 05, 2015 4:25 pm

Hello @Ashley
I have a problem with my game which use the savegames, when i save the game, i post some data into the webstorage like save name, and that save is exist, it works fine everywhere, except apple's WKWebView, i guess you know that it has some troubles with a webstorage, like clearing it randomly or when user goes out of memory, so when it clears, save stays, but data from webstorage that tells that save exist is gone, so users can't load their savegames anymore.
So i thought, if it's not very hard for you, you can just add a condition to a System's Save & Load section? Something like "Test if savegame exist"? It's gonna be a lot better than this webstorage tricks. As i understand, it's an Apple's WKWebView bug, something about cookies and local storage, nobody knows when it'll be fixed, so you are my last hope.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Mon Jan 05, 2015 6:14 pm

If it's an Apple bug then hopefully Apple will fix it.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Mon Jan 05, 2015 6:30 pm

Ashley wrote:If it's an Apple bug then hopefully Apple will fix it.

The problem is not only in the bug, i just thought it's a lot easier to put a condition to test for saves existing, than to create a check system based on webstorage. As for bug, yeah, but it will take months, it looks like they don't really care about their WKWebView, so maybe in worst case they wait before next major iOS release (9?) before fixing tons of bugs in it, who knows.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Mon Jan 05, 2015 6:47 pm

FYI none of our official export options support WKWebView right now, in particular because it has bugs that prevent Cordova supporting it, so it sounds like you're using an unsupported export process anyway?
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Mon Jan 05, 2015 6:49 pm

to be honest, even without the Wkwebview bug itself, a condition to test if a save exists, and an action to delete a save are still something people can expect to find by themselves rather than having to build it with the webstorage (some people say it is not hard, true, but it is just troublesome and feels like a feature incomplete, the same way being unable to reset persistents objects was).
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Mon Jan 05, 2015 7:20 pm

Ashley wrote:FYI none of our official export options support WKWebView right now, in particular because it has bugs that prevent Cordova supporting it, so it sounds like you're using an unsupported export process anyway?

Waaait, i'm using wkwebview based ludei's webview+ in r192 description you said it's supported.
CocoonJS Webview/Webview+ is Ludei's Cordova-compatible build system.

Even if it's unsupported, i'm not talking about a bug, i'm talking about a missing features.

Aphrodite wrote:a condition to test if a save exists, and an action to delete a save are still something people can expect to find by themselves rather than having to build it with the webstorage (some people say it is not hard, true, but it is just troublesome and feels like a feature incomplete, the same way being unable to reset persistents objects was).

Yes ! That's what i wanted to say, using webstorage just looks like overkill.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Sun Jan 11, 2015 1:08 pm

@Ashley

Aphrodite wrote:to be honest, even without the Wkwebview bug itself, a condition to test if a save exists, and an action to delete a save are still something people can expect to find by themselves rather than having to build it with the webstorage (some people say it is not hard, true, but it is just troublesome and feels like a feature incomplete, the same way being unable to reset persistents objects was).


I could use exactly that feature in the game I'm working on at the moment (save exist and delete save). I think it would match the current high abstrations level of Construct 2, and I imagine that a lot of small game hobbyists could use it too.
B
26
S
9
G
2
Posts: 78
Reputation: 2,524

Post » Sun Jan 11, 2015 9:19 pm

Attached is a simple example of webstorage use , for basic save/load/clear operation - in case some people revisit this thread looking for something like this...

Cheers,
thegrind

save_webstorage.capx
You do not have the required permissions to view the files attached to this post.
B
26
S
9
G
2
Posts: 78
Reputation: 2,524


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 18 guests