Save and Load Quetion

LucalryLucalry Member Posts: 21
edited February 2012 in Working with GS (Mac)
Hi All,

I want to ask about save and load work.
let say I have Scene 1, 2, 3, 4, 5
1. is home
2. gameplay
3. store
4. in App
5. gameover

So in that case I have 2 actors need to be save and load (let say Gems and Highscore with custom fonts)

1. Where I put save & load att for gems ? Which one behaviours I use ? Constrains att or change att ?
2. Same as point 1 but now its actor highscore, but of course highscore cant buy anything on scene 3 (store)

Thanks anyway,


L

Comments

  • POMPOM Member Posts: 2,599
    When the player picks up a gem , in your gem actor add :
    Change "game.gems" to "game.gems"+1
    Then save "game.gems" - - - Key : totalgems

    for high score its most common to save it when the level is over , in the "game over" or "game complete" scene
    Change "game.high score" TO "game.Current session score"
    Then save "game.Current session score" - - - Key : highscore

    Now for loading them , in your initial scene , when the game starts put the load behaviors in one of the actors and load those attribute ..

    Cheers
    Photobucket Roy
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

  • LucalryLucalry Member Posts: 21
    @POM

    okey I got it, but in scene store, let say I wanna buy some item after the game..
    like if I have 10 gems and buy pistol for 5 gems, so I Change.game.gems.. to game.gems-5 is that right ?
    sould i put save attr after that ? or load att before that ? Because, after game over, I put "store button" then change scene into store, no to initial scene..

    Thanks,

    L
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Those should be game level attributes not scene so no matter the scene you can access and modify the data. Load the data at the start of your game and save the data when appropriate.
  • POMPOM Member Posts: 2,599
    Put save behavior after EVERY change you make to the coins !
    Put load behavior only in the initial scene of your game ..

    Photobucket Roy
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    @roy what the hell is that a dog cat? Lol
  • POMPOM Member Posts: 2,599
    edited February 2012
    Thats Azoo the squirrel! from my game Spin The Nut
    :D

    Photobucket Roy
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Ah I like him!
Sign In or Register to comment.