I understand all the variable settings to make a virtual pet type app, but I'm stuck on how to have the app check the users local clock/time to compare the amount of time since the last usage. I need this function to not only make the variables like hunger and happiness more realistic but to also allow a "lifespan" type counter.
I also have no idea how to save on exit.. I imagine I can make a "on browser close>save game" sort of thing happen but I haven't gotten there yet.
thank you!