Webstorage (Save Game)

  • I know it will save your data, but HOW? What were the expressions like 'Save "Wfile" from Wood' or something like that? An did that have to do with instance variables?

    <img src="smileys/smiley5.gif" border="0" align="middle" />

  • I know it will save your data, but HOW? What were the expressions like 'Save "Wfile" from Wood' or something like that? An did that have to do with instance variables?

    <img src="smileys/smiley5.gif" border="0" align="middle" />

    It just storage some variables where you can read from webstorage, so, when you load the file, it will load that variables and show the game after that statement, but you'll need to make your game all following this philosophy.

    Example: I'm doing a RPG, where the player get lvl 3 and 3200XP, also a sword with ID number of 3, he is on the map 3, unlocked map 2 and 1 and a shortcut number 13.

    Webstorage it and restore it, all the thing on the game will check their variables, consolidating only the checked variables, so, your player will come up, after loading, with the maps 1, 2, 3 and the shortcut 13 opened, also, a sword number 3, 3200XP, and level 3, hes last position can be done making a new variable, telling the game the player position map, so on.

    This is an awesome way of making RPGs and simpler games.

  • Hello I'm new here and do not know English very well!

    well, I did the tutorial and was very good (very good), but when I click load of NaN in place of total coins, how can I solve this?

    Thank you!

    Ps.: Brazilian;-)

  • Is this part of C2 ? can we use this method for commercial games?

  • I have a doubt with this.

    I�m making a RPG game with larges arrays to Player info, Inventory, Objects info, etc. If I need save all the whole information with WebStorage, I need save data by data on separated keys?

    I�m download the .Capx example and I modify that to use arrays:

    Example with array

    If that works on this way, is a really boring and hard work.

    Is some other way to save this type of data?

  • I have a doubt with this.

    I?m making a RPG game with larges arrays to Player info, Inventory, Objects info, etc. If I need save all the whole information with WebStorage, I need save data by data on separated keys?

    I?m download the .Capx example and I modify that to use arrays:

    Example with array

    If that works on this way, is a really boring and hard work.

    Is some other way to save this type of data?

    To save an entire array to webstorage, use this simple method:

    http://www.scirra.com/forum/saving-and-loading-an-array-to-webstorage-capx_topic50970_post353466.html#353466

    http://www.scirra.com/forum/copy-an-entire-array_topic53153_post332888.html#332888

  • Xavier Thank you SO MUCH!!! <img src="smileys/smiley31.gif" border="0" align="middle" />

    I serached a lot of times, but I can?t find that Thread.

    So useful and... so simple! I?m really impressed <img src="smileys/smiley3.gif" border="0" align="middle" />

  • I got the following error while opening project

    <img src="http://h.dropcanvas.com/igjg9/Untitled%20picture.png" border="0" />

  • tonycrew

    I got the following error while opening the project

    <img src="http://h.dropcanvas.com/igjg9/Untitled%20picture.png" border="0" />

  • I have been pushing everything to the dictionary so that I can use them as global variables then I just save the whole dictionary to webstorage. Is there any reason I should not do that and should use local variables instead?

  • This saved my day.

    Thank you!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I read these post and think, wow to I have a lot to learn.

    Thank you all for the information.

  • Wow, i was looking for this post. and Thanx

  • can't wait to go home and try it!

  • can't wait to go home and try it!

    Worked quite well; unique save to each and every variable, then load all of them seperately.

    Thank you.

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