I’m trying to make a game similar to the recent XCOM remakes, and I want to recreate the time mechanics in those games’ overworld maps. If you haven’t played those games, basically I want to:
- Get the real-world time at the moment the player starts a new game.
- Automatically advance that starting time forwards by a certain amount at the start of the game (for example, moving the time 10 years ahead of the game’s start).
- Have that time advance at the same rate as real-time (1 in-game second to 1 real second), while also having the option of fast-forwarding or freezing the time at need.
- Have the game trigger functions based on certain criteria (at the end of each month, for example).
Basically, I want to store the real-world date and time as a variable at the start of the game, then spend the rest of the game altering and checking that variable arbitrarily. How could I go about doing this?