Hello! Who can set an example as to use WebStorage, for saving levels? Or can eat other method as it to make?
Develop games in your browser. Powerful, performant & highly capable.
It's difficult to save an entire level to WebStorage - I'd suggest just saving the level number they're reached, or stage, checkpoint, etc.
Ashley, It's only difficult or it's impossible? I mean it because I'll probably make a game that need to save entire levels, like if you play minecraft and save your game, exactly.
I'd say he meant difficult. You have to explicitly specify all the info you want to save.
Here is one idea:
http://dl.dropbox.com/u/5426011/examples13/save_load.capx
I use the dictionary object to store the named values for each object. I then insert dictionary.AsJSON into the array for each object. The array now is a snapshot of what I want to save. It is then trivial to save to webstorage with the action:
webstorage: set local key "game_save" to Array.AsJSON