Pandora’s Clock

So I recently was working in my prototype playground in Gamemaker and I’m making a system to get how many seconds have passed while the program was not running.  So far I’ve got a system saving the time on a regular basis, so I can know approximately what time the app was last run and then compare it to the new time when the app is opened again, so then convert minutes, hours, days, months, etc to seconds and then apply it as needed to my long time alarms.  Seems pretty straightforward right?  Well then I asked a programmer friend if there was a simple logic step I was missing to account for random things like month/year change or … time zones.

He sent me this video to watch: Link here

I was actually successful in getting a basic system up and running, but it definitely won’t account for time zones or daylight savings, in those cases my timer will just stay at 0.  I’m also still trying to account for the potential to cheat by simply changing the time on your device forward to allow for timers to finish, and then changing it back to keep playing the game.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>