kloucek
05-29-2008, 06:57 PM
I didn't know whether to post here or on mobile forum, but since the question is probably as noob as I am i choose here :)
I'm working on a simple tamagotchi-like game fo flash-lite 2.0 (school project). The goal is that the player gets some amount of points to spend every day. If he doesn't login one day, the points do not come and the poor pet get some minuses to its happiness attribute. If he logs on everyday the points of course accumulate.
I have some hard time figuring out how to deal with the timestamps. I know it should look somehow like :
some_day.timestamp - other_day.timestamp = days
if days >1 do actions
the problem starts, when monts change (1-30 = days). So the question is:
is there an easy way to manage those timestamps, or do i have to code exceptions for every month transition (which shouldn't be that difficult, but the longer the code gets the easier i get frustrated ;) )?
Hope i made myself understood, and thanks for help.
I'm working on a simple tamagotchi-like game fo flash-lite 2.0 (school project). The goal is that the player gets some amount of points to spend every day. If he doesn't login one day, the points do not come and the poor pet get some minuses to its happiness attribute. If he logs on everyday the points of course accumulate.
I have some hard time figuring out how to deal with the timestamps. I know it should look somehow like :
some_day.timestamp - other_day.timestamp = days
if days >1 do actions
the problem starts, when monts change (1-30 = days). So the question is:
is there an easy way to manage those timestamps, or do i have to code exceptions for every month transition (which shouldn't be that difficult, but the longer the code gets the easier i get frustrated ;) )?
Hope i made myself understood, and thanks for help.