Game.time vs Device clock for random spawning event? Help much appreciated inside

ChobbifaceChobbiface PRO Posts: 491
edited February 2012 in Working with GS (Mac)
Hey guys, the best way I can think of to describe this is like a 'tamagotchi' poop. You know even when you've closed the app, you come back to some random poops that have spawned in the meantime. So we're talking random spawning events between minutes to hours.

What's the best approach for this?
1) Using a normal timer? e.g. every random 1-86000 secs spawn poop? But then, this will only run when the app is open I presume. Not the best way I'm guessing.

2)Using game.time - I know how to get game.time to display, but can't figure out how I'd incorporate game.time into a random spawning event? Not much meaningful documentation on this I could find. And I'm guessing again game.time only runs when the app is open.

3)Using device clock - I was thinking this would be most appropriate, since it's independent of app being closed or open. But anyone have an idea how I would go about implementing this?

Thanks in advance GS'ers :)

Comments

  • ChobbifaceChobbiface PRO Posts: 491
    I don't normally bump into things
  • T8TRG8TRT8TRG8TR Member Posts: 120
    I've never done something like that but I would assume the device clock would be best. Beyond that I'm not really sure what exactly you want. I know @P-O-M made it so the player receives coins once a day so in one of his games so I'm sure it's possible.

    I know that's not much help but consider it a free bump ;)
Sign In or Register to comment.