Re: Time System & Day & Night
- Posted by c.k.lester <euphoric at ckl??ter.com> Aug 14, 2007
- 497 views
Andy wrote: > > I wanna make a time system. That has seconds, minutes and hours. It would > count > to 60 seconds and then start counting minutes, once it 60 minutes the hour > would > count one, bascilly it would be like real-life time system. Also I need to > know > how to make it change from day to night and back again. I hope that clear's > thing's up. A time system will work differently based on what type of game you'll be creating. If you are making a turn-based RPG, then obviously time will advance at the interval you set for each turn, whether it's 10 minutes each turn or 1 hour. You will just need to determine at what time you want your sun to rise and set. For a real-time simulation, time will run without interruption, but it doesn't have to mean 1 sec of game time equals 1 sec of game time. You could easily have time advanced at 1.5 times normal. You'll also want to advance time when (if) a character requires sleep. For a RTS, you will use a threaded timer. Displaying "day" and "night" is a whole 'nother question with a whole set of its own variables.