Saving Game~Help Please!

EthanZarovEthanZarov Member Posts: 156
edited November -1 in Working with GS (Mac)
Hey,
I am creating a game similar to games like Tiny Tower, Tap Pet Hotel, Tap Zoo, etc., and as you know, they all involve waiting an amount of time for you to stock items/collect coins to earn your self money. So, my large question is- Does anybody know how to save your game so that when you come back it will know how long you have been away, and give you the coins after the time has elapsed? THx!

Comments

  • SkyMapleSkyMaple Member Posts: 817
    As far as I know, there is no way to tell how long you have been away from the game for. Gamesalad cannot tell when you close the app so you can't record the old time and compare it to the new.
  • FallacyStudiosFallacyStudios Member Posts: 970
    Ya I've built a game close to that from scratch in android. You need to save the current time (not sure entirely how gamesalad does it) but you will need to save the whole date in a number than compare whether your new date is greater than the old by the amount needed.

    For example if you saved an earlier date and called it oldDate then you would just have it check whether oldDate-newDate > 4.

    It depends on whether you want it checking for a whole new day (or an amount of days) or whether you want it checking per hour. etc.
  • EthanZarovEthanZarov Member Posts: 156
    thx for all the info!
Sign In or Register to comment.