Question about implementing "upgrades" and saving progress.

AntiCAntiC Member Posts: 12
edited November -1 in Working with GS (Mac)
Hey guys!

First of all this is my first post on these forums, I decided to get into app developing on game salad as im a graphics designer and this SDK is just awesome for someone like myself to make the art and have the SDK deal with my stupidity in coding :P

Ive started a new project, designed it all, its coming together nicely but im having some problems that im hoping someone can help me with.

1) In this project, there is an option to spend cash earned during stages to buy 'upgrades' (like added guns etc etc) but im noooot too sure how to go about getting that added into the game, for example I have 2 sprites, one is the basic version but you can use cash to unlock an upgraded version which is a seperate sprite/png, now how would I go about having that 'save' the fact that it replaces the basic actor in the game with the upgraded one? Hopefully that makes sense :(

2) Also! In this project I dont intend people finishing the game in 10 minutes and its going to be something that you can pick up and work on, having stages and as mentioned before unlocks and achievements. How exactly do I go about creating a save file for the game so that when someone completes a stage if they exit the game and come back it still shows as complete. Hopefully that makes sense aswell :)

Apologies if there are any spelling mistakes im just about to head off to bed after a whole day and night of working on it so my brains frazzled.

Thanks in advance!

Comments

  • AntiCAntiC Member Posts: 12
    Oh also, this is in regards to iPhone development, just incase anyone is wondering.
  • SandbirdSandbird Member Posts: 69
    Hi AntiC,

    You need to take a look on the Save and Load Attributes behaviors. They save a value on disk (iphone) and then you can Load that attribute back when you want to.
    Example: I play one lvl and i pass it, so i move to lvl 2. You could save an attribute CurrentLevel to 2. So when i close the game and start again later on you can Load this variable and know which levels the user has "unlocked" so you let him continue from there.

    Use integers as a binary on/off switch for multiple settings (e.g., The hero status effects would be a value like, 1101, where the thousands digit represents stun state, hundreds digit is the poison state, etc.).

    All this would be so much better if we had arrays, and tables saved on disk,,,but thats for later on i guess. For now the only way to do this is with the save/load attributes.

    Check this post out:
    http://gamesalad.com/forums/topic.php?id=30832

    and also this one:
  • AntiCAntiC Member Posts: 12
    Awesome! Thanks alot for the very informative reply, I appreciate the effort :)

    Im sure ill have more questions down the line as this gets developed but this was my main concern.

    Thanks again!
Sign In or Register to comment.