Keeping Track of Real Time Question

EricTippettEricTippett Member Posts: 45
edited July 2012 in Working with GS (Mac)
Hey Everyone,

I was wondering if there was any way to keep track of real time in GameSalad while not playing. So like in farmville, things grow and happen while you arent playing and somehow the game knows the real world time and calculates it into the game.

Is there any way to do that or anything like that in GameSalad?

Best Answers

  • tenrdrmertenrdrmer Posts: 9,934
    Accepted Answer
    No not really. You can save the last time the person played and then the next time they load you can do stuff based on how long it has been but you cannot make the app continue to function behind the scenes. The reason farmville works like that is your data is running on their servers. The app just accesses the info.
  • tenrdrmertenrdrmer Posts: 9,934
    Accepted Answer
    Its all about the math man.

    you have a save attribute behavior so you would need to save that every so often and then use the load attribute behavior to load the value the next time they play and do the math to see how long its been.

Answers

  • EricTippettEricTippett Member Posts: 45
    Ah ok, so I could still get the same effect for a 1 player game if I could see how long its been. It would just update when the play again.
    So how would you save the last time the person played and then see how long its been when they logged in?
  • EricTippettEricTippett Member Posts: 45
    Oh, yeah I just meant how do you see how long its been?
    Is there a way to get the time of the ipad clock or something?
    Once they save and turn off the game, then timers wouldn't work because the game is off. Then when they turn it on and load, how would the game know what has passed?
  • Asobu_GamesAsobu_Games PRO Posts: 261
    I have a related question. I have just added this type of real time tracking in my game. I use an autosave every 1 minute to track and save the current time/date. Then if the player quits the game, when they play again it will load the previous saved time and compare to the current device time. Stats are adjusted using some pretty complicated rules based on time passed.

    My issue is this: I assume that if the player stops playing WITHOUT quitting (ie sleep mode/multitasking) then it will essentially pause the game so the stats wont change and there will be no way to load the saved time and adjust stats. As far as I know there is no rule for when someone hits the home button, or when they return from sleep mode.

    Has anyone overcome this issue, or have any ideas for solving it?
  • PhiliePhilie PRO Posts: 240
    @Asobu_Games - Did you check out the rule hibernate? Its what you should look into, as its when a device goes into sleep mode.
Sign In or Register to comment.