Game Development Community

Time of Day questions

by Scottie Sirius · in Torque 3D Professional · 07/14/2011 (6:42 pm) · 5 replies

Do the Day Scale - Night Scale settings do anything? I can't really get much to happen with them. I'd like my night to be fairly short in comparison to the day. A couple of hours each side of midnight CST would be good enough.

Is there an easy way to tie the time to the time on the server? It would be super nice if they synched right up when you have several levels all on a couple of servers and have to stop and start one of them periodically.

#1
07/16/2011 (11:03 am)
if you assume that the sun moves, you know the position at any time, then practices can do what you want.

+ day/night fog, sky, moon
+ long of day, night in 100%

in any programming language time is measured in tics

60000t = 1 sec, thereafter, the time is measured regularly

example you can use a trick
day Long in 24h base = 20000
sun elevation metrics is degrees
if sun elevation > 180 then day Long = 1000
if sun elevation < 10 then day Long = 20000

day is 20 times greater than the night.

in final the day/nigh scale working under conditions, game restart or day night system refresh.
#2
07/26/2011 (5:08 pm)
No clue what he just said...lol and I read it 3 times.
Can anyone clarify some? The length of the day depends on the suns elevation?
I thought 86400 seconds was a 24 hour day.
#3
07/27/2011 (3:33 am)
Unless the system has changed since i last toyed with it, the scaling is a bit of an oddity and difficult to work around

To test your settings you should probably set your day length to something like 30 or 60 seconds, this time will change depending on your dayscale and nightscale settings.

if you have
Daylength 60
Dayscale 1
Nightscale 2

your actual daylength will be 45 seconds, 30 seconds of day, 15 seconds of night.

So really you need to work out your day to night ratio, then get harry potter to create your numbers for you.
#4
07/27/2011 (12:12 pm)
If you set daylength to 60, why will it be 45 seconds long?
#5
07/27/2011 (1:52 pm)
because that is how the designers designed it, personally i think its broken, i think it should be altered so that the only parameters you can change are the the full day time, and the percentage of that day that is daylight.

I seem to remember starting a thread about it quite some time ago but nobody cared, and I didnt at that time know enough about torque to fix it, I probably still dont, but I guess I can try.