*** Product released, please see this other thread. ***
This is a little system I have that is 90% finished and just wanted to gauge community interest in. The idea is to provide a structured system for working with in-game dates and times, rather than having to deal on a low level with things like GameTimeSeconds. It’s intended for any game that needs to simulate the passage of time in a persistent world.
Essentially, you first define a calendar system. You can either use the standard Gregorian calendar, or define a custom one with your own time periods - say a numbered Stardate system, or a calendar with named months/days or whatever unique to your game setting.
You can then define dates/times in your calendar through a text shorthand, or by combining exists date/times with durations (also specified in your custom periods).
There is a clock object connected to your calendar, which can be scaled against realtime time progression and also paused/resumed independently of game pause if necessary.
You can register timers on the clock just like the built in UE4 timer events. You just give it the calendar date/time or custom duration when it should trigger, rather than working in realtime seconds. I’ve also extended the timer functionality to allow attaching arbitrary data to a timer event, so if you have some context information at the point you setup the timer, it will be stored with it and passed to the event node so you can access it from the event handler.
Here’s an example of registering a timer to fire on a specific date every year.
Date/time state can easily be transferred between the clock and a save game object. Network replication of clock state is also implemented.
This is just a shot of a demo setup I’m using.
Any thoughts appreciated.