Question about loading save game

0 favourites
  • 9 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • When I have it setup to load the save game on game start, and I have a separate screen for the load save game, will it stay on that screen for as long as it takes to get the data? Or do I need to create a delay to allow it time to load the save game data. There isn't much that it's loading so I wouldn't imagine it would take much time, just loading saved variables.

  • You should use "System On Load Complete" event or "System On Load Failed" to switch to another layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should use "System On Load Complete" event or "System On Load Failed" to switch to another layout.

    Thank you

  • You should use "System On Load Complete" event or "System On Load Failed" to switch to another layout.

    I couldn't find the option to PM in the new forums setup

    another questions, I am currently using system > save game. I will be uploading to kongregate so I don't want the player to loose all save game if browsing history and cache is deleted. I know I would have to switch my saving to local storage, but it can be a pain doing all the set, get events. Will the dictionary take care of that? I have no idea how to use the dictionary but from what I gather the data can be stored in the dictionary so then would I just have to load the dictionary on start of game and it would load the data?

    I've looked at a few threads/tutorials that talk about dictionary and just find it confusing, is there an easier way other than dictionary?

  • Dictionaries are actually very simple, much easier to understand than arrays.

    They are like variables, only more flexible. Just add keys and values, for example:

    Key="Coins", value="35"

    Key="Weapon", value="small_sword"

    etc.

    .

    Then save to local storage Dictionary.AsJSON

    To load: Dictionary load from JSON (LocalStorage.LastData)

    .

    I made this demo for some other post:

    dropbox.com/s/1cz1k5x3teikbv5/DictionaryLocalStorage.capx

  • Dictionaries are actually very simple, much easier to understand than arrays.

    They are like variables, only more flexible. Just add keys and values, for example:

    Key="Coins", value="35"

    Key="Weapon", value="small_sword"

    etc.

    .

    Then save to local storage Dictionary.AsJSON

    To load: Dictionary load from JSON (LocalStorage.LastData)

    .

    I made this demo for some other post:

    https://www.dropbox.com/s/1cz1k5x3teikbv5/DictionaryLocalStorage.capx?dl=0

    So setting the key is like setting the item in local storage can you set the value to a variable instead of a set number or word? I will have to look up some tutorials on dictionaries and learn more

    so I would do say for player gold

    set key "playerGold" to value playerGold?

    I think I am just making it seem more difficult than what it really is lol, I'll have to play around with it and see what I can make it do

  • Yes, of course you can set the value to some variable.

    Dictionaries are perfect for use together with local storage, because you can easily save and load a lot of information at once.

    If you are saving each variable separately in LocalStorage, you need a million of events to save and retrieve each item. If you are saving a dictionary, you only need a couple of events.

    .

    I also suggest keeping dictionaries not just to store data in local storage, but actually using them in your game. For example, you can have a dictionary GameSettings, with keys like "MusicVolume", "SoundVolume", "Difficulty" etc.

    You don't need to create variables with the same data, just use the dictionary, for example:

    Audio set volume to GameSettings.Get("MusicVolume")

  • Yes, of course you can set the value to some variable.

    Dictionaries are perfect for use together with local storage, because you can easily save and load a lot of information at once.

    If you are saving each variable separately in LocalStorage, you need a million of events to save and retrieve each item. If you are saving a dictionary, you only need a couple of events.

    .

    I also suggest keeping dictionaries not just to store data in local storage, but actually using them in your game. For example, you can have a dictionary GameSettings, with keys like "MusicVolume", "SoundVolume", "Difficulty" etc.

    You don't need to create variables with the same data, just use the dictionary, for example:

    Audio set volume to GameSettings.Get("MusicVolume")

    Awesome thank you. You always seem to be the only one that answers my questions or issues, i feel bad that it's always you but thank you so much for being so active on the forums and helping out, it's appreciated more than you know

  • Hey, no problem! I happen to have some free time and I enjoy helping people on this forum, by doing this I feel like I'm learning a lot of new things myself and getting better at game development.

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