Mobile and PC: how do I manage saved games?

Get help using Construct 2

Post » Tue Jan 15, 2013 9:29 am

Hi again, everyone.

As I move through the development of my first game, I'm faced with challenges at every turn. Good challenges, and I can usually work through them, but one thing has been bothering me: saving the player's progress.

My thinking is that I'll create an array that saves the player's current level, total money, unlocked vehicles, upgrades and so on. That's easy enough, but when they quit the game, that info is lost. I've had a look at webstorage and that seems to be a good way to record information, but I'm worried about the cookie clearing issue.

I'm developing for iOS and Android (CocoonJS), and PC exe (node-webkit)

So, my questions: What's the best way to permanently save information on both of these platforms? Is there an internal function that can do this on all platforms?

Thanks!
B
56
S
15
G
10
Posts: 910
Reputation: 11,952

Post » Tue Jan 15, 2013 7:39 pm


The Dropbox Plugin by Septeven gives u exactly the permanent saving u seek.
Only downside is the player needs to be "online".
But even when going ofline for a day would mean the player could save his/her progress as local webstorage.
Then when internet pops up again, upload the complete webstorage "as json" to a dropbox .txt file.
Then when the cookies are erased: have the player download his savegame from dropbox.
Bam!

In my "Universe App" i have a login & upload/download via webstorage combined with dropbox.
Its awesome, realy easy!
And now my app users can erase all the cookies they want, and never really loose the data.
Unless ofcourse i erase the dropbox entirely.

But also that is to be backupped.
Kind regards.
Savvy001
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Wed Jan 16, 2013 7:59 am

Thanks @Savvy001, that's very interesting. I'm not too keen on forcing the player to be online, to be honest, but if it comes down to it then I may have to.

On a related note, I've done some basic testing with apps made in node-webkit and CocoonJS, and they seem to have some permanence when it comes to storing data. I'm not sure exactly how these wrappers deal with webstorage but they seem to store the data locally, outside of the scope of the system's web browser.

How long that data will stick around for is still an uncertainty, however.
B
56
S
15
G
10
Posts: 910
Reputation: 11,952


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, abdalghani, imothep85, Marxally, Virpoja and 27 guests