Saving Data

0 favourites
  • 15 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hello,

    I am trying to create an IOS (Eventually Android) App with construct and planning on Compiling it with cocoonJS.

    Can I use the built in WebStorage Object to Save and retrieve data ? Will this still work after compiling with CocoonJS. Also what is the difference between running in 'Webview" and 'Canvas 2D/WEBGL' when using the CocoonJS launcher.

    Sorry for these probably simple questions but I just starting to learn this software and the concepts.

    Thanks

  • Has anyone saved any data using construct in a an ios game and can describe how to do it ?

  • Has anyone saved any data using construct in a an ios game and can describe how to do it ?

    Actually I'm making a game for iOS, and the webstorage is working when I try the game on wi-fi...my doubt is when you remove the cache from the iphone if the savegame still stay on the phone... but one user said to me is working when you publish the application... maybe the app will make a special folder with the cache of the app...

    and how... you can see the manual of construct2: https://www.scirra.com/manual/120/webstorage

  • How did you get the webstorage to work ? When I compile the game in html5 onto my webserver and run it using mobile safari on iphone 5 the webstorage is not working

  • How did you get the webstorage to work ? When I compile the game in html5 onto my webserver and run it using mobile safari on iphone 5 the webstorage is not working

    I never try to test my app on safari... the best way is to export in cocoonJS and make an application...

    I made this example for you, try and let me know if is working

  • Ok, that would be by next Question

    I have tried cocoon JS and I am just super confused as I am new to all this. I am a Developer but completely new to the game thing.

    When opening Cocoon JS on Iphone it allows me to select a URL which I am pointing to my webserver and the game runs in full screen when I select webview mode. When I am trying to run using Canvas 2D /WEBGL I am getting a black screen. I do not really know what the difference here is.

    How do you make an App and run it with CocoonJS ?

    I will try your example know. Thank you for that.

  • Ok, that would be by next Question

    I have tried cocoon JS and I am just super confused as I am new to all this. I am a Developer but completely new to the game thing.

    When opening Cocoon JS on Iphone it allows me to select a URL which I am pointing to my webserver and the game runs in full screen when I select webview mode. When I am trying to run using Canvas 2D /WEBGL I am getting a black screen. I do not really know what the difference here is.

    How do you make an App and run it with CocoonJS ?

    I will try your example know. Thank you for that.

    I'm not new to make game, but I'm new to export in cocoonJS ... when you finish your game, just upload on the website of ludei and register on apple developer... it's better if you get a premium account of cocoonJS...

    when you click on canvas 2D/webGL, you need to wait some seconds (depends how is big the game) and check if your antivirus block the iphone when it try to open the game... you should look on the debug if you have some problem...

    I had a problem with my firewall when I tried the application

  • Cool your example works fine, just implemented it into my game. I previously had something in there with if value exists which obviously didn't work right

  • Well, I guess I was to quick. it works fine on my PC's browser. On my iphone it's showing "NaN"

    Any idea whats the reason behind that ?

  • Well, I guess I was to quick. it works fine on my PC's browser. On my iphone it's showing "NaN"

    Any idea whats the reason behind that ?

    is "Nan" because on start layout I declare the variable with no value, if you click reset and try to add or sub the value will work fine

  • I am sorry but I don't get it.

    On Start Layout I am Setting my global variable number to WebStorage.LocalValue("number")

    Also I am setting my textbox.text to number

    To Save I am setting my local key to number to number using the webstorage object.

    When I run it's showing NAN. I can't figure out why yours works and mine doesn't though I belive I am doing the exact same thing.......frustrating

  • Any idea what would cause the NAN value ?

  • Any idea what would cause the NAN value ?

    NaN is when you try to load some variable (a number) and on variable isn't a number...

    it's easy to fix it

    post your capx for sure

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually I got it working now. Not seeing anything I have done different though. Deleted everything and started over and it worked.

    So am I understanding this right that when this is compiled with Cocoon this webstorage will be converted in some local ios storage ?

  • Do you have sounds working on your ios device as well. My sounds work on the PC browser. And for a minute it worked as well on my ios device but after deleting safaris cookies the sounds stopped working. Do you have an idea what would cause that ?

    Thank you for all your help

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