What options are there towards saving gamedata?

Get help using Construct 2

Post » Tue Sep 06, 2016 9:23 am

Included capx if you want to mess with it
I implemented savedata in my Zelda SDK using the native save/load, with naming slots, separate saves, etc. An issue, as a cavet of the native save/load: It creates a snapshot of "slotx" so using a variable to ensure a save slot exists before-hand is moot.

My research indicates my best option is using dictionary+webstorage and storing 3 dictionary keys each for data. Is this the right away to go about it? I have researched webstorage and dictionary a little but I only have a small hunch of how to. My hunch is better with saving said keys but not on how to actually reload them.

Like:
"slot1rupees"
"slot2rupees"
"slot3rupees"
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Tue Sep 06, 2016 10:03 am

Check the How do I FAQ :

[*]Local Storage
  • How do I do High Scores with Local Storage - LINK
  • Another example how to do high scores with Local Storage - LINK


Those are examples of how to use the local storage, and it will show how to use it to save and load values.
The value you save will likely be the .asJson content of your dictionary object.
So when you load from the local storage (get or checking if item exists and it does) you can then Dictionary.Load LocalStorage.ItemValue
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,313
Reputation: 71,094

Post » Tue Sep 06, 2016 10:05 am

Kyatric wrote:Check the How do I FAQ :

[*]Local Storage
  • How do I do High Scores with Local Storage - LINK
  • Another example how to do high scores with Local Storage - LINK


Those are examples of how to use the local storage, and it will show how to use it to save and load values.
The value you save will likely be the .asJson content of your dictionary object.
So when you load from the local storage (get or checking if item exists and it does) you can then Dictionary.Load LocalStorage.ItemValue

Thank you, you are fantastic!
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests