ID:956655
 

Poll: Which Method would you prefer?

Method 1 42% (3)
Method 2 57% (4)

Login to vote.

Below are two time management methods

Time Passage Method One (Real Year: 15.2 Years)
1 Hour = 1 day
7 hours = 1 week
30 hours = 1 month
90 hours = 3 months
150 hours = 6 months
210 hours = 9 months
240 Hours = 12 months (10 DAYS = 1 YEAR)
30 DAYS or 720 hours = 3 Years
60 Days or 1440 hours = 6 years
90 Days or 2160 hours = 9 years
100 Days or 2400 hours = 10 years


Second Method (Real Year: 52 years)
1 hour =1day
7 hours = 1 week
24 hours = 1 month
168 hours = 1 year (1 week)


Now the first one is confusing on paper, simpler to code.

Second one simple on paper, and I'm a bit shaky on how to code it.

So voting, and thoughts please?
var/seconds=0
var/minutes=0
var/hours=0
var/days=0
var/weeks=0//months would be a little more difficult to manage, varying in days in each.
var/years=0
while(TRUE)
sleep(10)
seconds++
if(seconds==60){ minutes++; seconds=0; }
if(minutes==60){ hours++; minutes=0; }
if(hours==24){ days++; hours=0; }
if(days==365){ years++; days=0; }


This is real-time, but the same method is usable in any form of keeping track of time.
aye, I would just do 30 days automatically for each month.
In response to Komuroto
30*12=360, five days short. You'd have to find a way to off-set that.

But you can put triggers into the time-loop I just presented an example of in order to keep track of the 1 hour = 1 day.
so you're clearly for method two then?
In response to Komuroto
I would prefer to see it with months, easier to manage and all. But it's just something you have to offset.
First Method...
explain why?
You're not considering how some months have a day more than others, as well as February (and thus leap years). It's not possible to make an accurate date system as easily as this.

I'd say just making each year 360 days would be easier.
It probably is also worth noting, there's no major reason your game needs to stick to our real world notion of time. Plenty of games make a mechanic out of having X days in a moon, or month, etc.
I've done a realistic time system that just speeds it up. I kept a list of each month and associated each month with the days in it. I also included an exception for Leap Year to see if February needs 29 days. It worked perfectly fine, except I could easily make one minute real-time equal one hour in-game.