i'm using an unsigned int that rolls over after 4294967295. X3 works it out to..
msecs /sec /min /hr /day
4294967295/1000/60/60/24 = 49.71027 days.
i'm never going to see that happen in any of my games, i'm sure of it. but.. what if? one thought i just had was about the granularity. if instead of cranking the time passed by 10msec, how about i just crank it by 1 and multiply the resulting yeild by 10 when i want to use it? that means i can use it 10x longer.. (assume average 365.25day years)
msecs /sec /min /hr /day /yr
42949672950/1000/60/60/24/365.25 = 1.360993 years.
i'd say that was a fine solution, but in a worst-case scenario, i think that i could keep another unsigned int that stored the number of days that passed and knock the timer back 24 hours every time it rolled over. i don't even think i'd need to use an unsigned for that.. i'm actually going to go build that right now.
[edit: yup it works great, it can go to the maximum of an unsigned long in days before i have to worry about timer overruns. hmm how many years is that... calc says ~11,759,000 years [grin] if i were to use an unsigned int, i'd get ~179.425 years out of it. that'd be damn good enough for me.]
How long is anyone gonna realistically play your game anyway?