Game Development Community

Date Script

by Matt Huston · in Torque Game Engine · 01/21/2006 (1:03 pm) · 1 replies

I tried looking through the resources but maybe am searching under the wrong explanation.

I am looking to implement something similar to Sim City or Civilization probably had. A game time. I remember in Sim City you'd start in January 1, 1900. I would like the date to count to 30 (maybe 1 day every second) and then switch to the next month. I'd just use 30 days for every month to avoid confusion of having 28 days in February, etc. :)

Has anyone ever implemented something like this?

#1
02/10/2006 (12:17 pm)
The game runs in ticks (roughly a tick every 30 ms if I remember correctly), so all you need to do is to relate game-ticks to your chosen timescale and periodically update your game clock.
I think there is a resource exposing a Tickable interface which should give you a good understanding of how Torque ticks work. Search for Tickable.