Best method for saving states

0 favourites
  • 5 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hiya

    I have serious intentions to publish a game on IOS and Android.

    Before I go down that route I need to clarify some things regarding storage.

    Is WebStorage OK to use on both platforms? I see plenty of info about it working for cocoonJS but what about appMobi (which I believe you have to use for IOS)?

    I need to save "level progress" and "purchased upgrades", quite small settings. But I want confidence they'll be saved and not randomly lost somehow.

  • This is something I am currently trying to do too. So far I am having success with using Clay.io to store data remotely, and then using that data to store locally at the same time via webstorage, so a player can play offline and all working in CocoonJS. It's still early days but I am pushing all my data into an array that I send to Clay.io as json.

    I would recommend CocoonJS just because it's better performance atm and Clay.io because it has an awesome plugin and features.

    One thing to note if you use Clay.io you need to manually include some files in the exported zip for CocoonJS Every Time (their case sensitive too) :

    ?webview (folder)

       ?api.js

       ?webview.html

    ?CocoonJS.js

    ?CocoonJS_App.js

    ?CocoonJS_App_ForCocoonJS.js

    ?CocoonJS_App_ForWebView.js

    You can get those files from the clay plugin directory in C2 (once you've installed it of course).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hmmm.. I really don't want to use remote storage. It's offline play.

    I realise "purchased upgrades" might sound like I meant micro transactions, I didn't mean that, just in-game upgrades like getting a new plant in plants vs zombies.

  • Well webstorage then, its simple enough to use. If the users clears they're data though its all lost (i.e. Browser Delete Cache).

  • Right fair enough, just checking.

    I take it one must use cocoon for both android and IOS in that case?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)