Retaining data after exiting game and few more questions

karuzokaruzo Member Posts: 35
edited August 2012 in Working with GS (Mac)
Hello,
Relatively newbie here.

I hope to start developing more aggressively with GS for iPhone. I have few questions as follows:
1. I would like to be able to show best score in main menu. I'm sure I can figure out how to do that. What I want to know is after exiting the game into Home screen and relaunch the game, how do I make sure that number does not get reset?
2. Can GS let you have more than one Game Center leaderboard in one game?
3. I'm planning on doing a tutorial level. What I want to do is that for the first time playing the tutorial level will kick in, and only once. This is probably easy to figure out with a variable like in question #2 above, just concern is that variable will reset next time game is launched (hope this made sense).

I hope soon to finalize a list of additional features, and will come up with more questions probably.

Thanks,

Doron


Comments

  • hotMagichotMagic Member, PRO Posts: 266
    1. I would like to be able to show best score in main menu. I'm sure I can figure out how to do that. What I want to know is after exiting the game into Home screen and relaunch the game, how do I make sure that number does not get reset?
    Make a table for your saved scores (most efficient) and every time you get a new high score, put it in the respective cell in the table and SAVE the table. When you reload, that score will be there.

    2. Can GS let you have more than one Game Center leaderboard in one game?
    You can have multiple leaderboards. That's more of an iTunes connect question.

    3. I'm planning on doing a tutorial level. What I want to do is that for the first time playing the tutorial level will kick in, and only once. This is probably easy to figure out with a variable like in question #2 above, just concern is that variable will reset next time game is launched (hope this made sense).

    Right, same as above. In your saved stuff table, just make a flag for Tutorial, and when you do the tutorial once, change it to false, and save the table. Obviously, check the flag when you change scenes to say "if Tutorial=true, then go to tutorial level. If tutorial=false, go to level 1"
  • karuzokaruzo Member Posts: 35
    @hotMagic - thanks for the answers.

    Tables is one of the items I have not looked into yet.
    Regarding the leaderboard - I'm familiar with all aspet regarding itunes connect. Just didn't know if GS limits you for one leaderboard per game or something like that.
    After posting my questions I can across "Save Attribute" which seems simpler to use instead of tables (?).

    Thanks,
    Doron
Sign In or Register to comment.