How do I Save Off and Protect Game Data

Get help using Construct 2

Post » Sat Jun 20, 2015 4:48 pm

My apologies if this post seems repetitive from a previous post, but I do not feel it is written clearly how one saves off game data and keeps it protected. I have Local Storage working great in a game I am developing. It maintains progress for multiple aspects of the game in addition keeping high scores for different game modes within the game. The problem is that if I clean out my history, which is a good thing to do from time to time, it wipes out all this information. I would think this sort of behavior would upset many players. I have never played Candy Crush, but I understand it has many levels. How would a player feel if they were just trying to tidy up things by clearing history only to find out they wiped out hours of play of their favorite game? So with regards to this topic...

- What good is Local Storage if it can be wiped out so easily? Is there a better way to protect it?

- Is there another solution that protects the data more? I am hoping for something clean where a file is read when the game is loaded similar to Local Storage, but that is only deleted if done so intentionally by the player either directly or by removing the game.

- Does Local Storage work on mobile games? By mobile I am not referring to browser-based games. I have not learned how to export for mobile yet, but I have read up on Cocoon JS and XDK. It is this type of game I am referring to. And if you can use Local Storage within these games, can the data be wiped out easily by the user the same way it can within a browser?

- If developing a game for the App Store, should all this be done with Game Center? (And the same with Android and its counterparts) Do we have access to all these features with a plug-in?

Again, I am sorry if I am a bit repetitive with my posts, but it surprises me this topic is not addressed more completely somewhere or perhaps I just cannot find it? Any help is much appreciated.

Thank you!
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Sun Jun 21, 2015 4:05 pm

You could set up a system to save a load the whole project to a JSON which you could then download, and load into the game later. The saveStateJson expression is usable in the onSaveComplete event. Save that as text, then use a Browser to download the JSON as a file that can later be loaded in with a FileChooser (Plugin), and the loadSaveFromJSON action.
B
7
S
2
Posts: 38
Reputation: 553

Post » Sun Jun 21, 2015 4:46 pm

My bad I misread your post and thought you were developing for PC/MAC not mobile. Sorry for the inconvenience :c
B
7
S
2
Posts: 38
Reputation: 553

Post » Sun Jun 21, 2015 5:02 pm

Question 1

- local storage is only removed when removing all offline data of your browser and only in browser based games. Clearing your cache will keep the data.
People who play games online should be aware that clearing all data will remove ALL data..

Question 2

- You could always use an online MySQL database and send the info to it through Ajax.


Question 3 is answered in the manual:

Non-browser export options like NW.js, Cordova or Windows Store apps are not affected by the user clearing any amount of data from any browser, they also use separate storage.

Question 4

- What would you need game center for? If you need it use it, if not not..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jun 22, 2015 5:57 pm

@VeneficBlade I hope to deploy everywhere so thank you.

@LittleStain Sorry that my question was not worded properly. My question regarding GameCenter was if you were planning to deploy to the App Store, does Game Center have built-in capabilities to save off a player's progress, coin count, etc... I appreciate your other responses. Thank you.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383


Return to How do I....?

Who is online

Users browsing this forum: luvleggs and 43 guests