I assume you are from Poland like me but lets keep it in English, I hope you will understand my poor english :). I am making a strategy/managment game now and I had same questions like you. I came with Idea using Timer. So, I have one Timer that clicks every 0.05 second (lowest recommended by Godot documentation). I have global variable which keep value of 1440.0 which is the number of minutes of full day. I have following speed settings:
- Normal - with every tick of TImer vaule of 2 (minutes) are substracted from 1440 - the day last 36 seconds
- 2x speed - with every tick of TImer vaule of 4 (minutes) are substracted from 1440 - the day last 18 seconds
- 4x speed - with every tick of TImerTimer vaule of 8 (minutes) are substracted from 1440 - the day last 9 seconds
- Pause When 1440 counter reaches 0, I am adding +1 day and resetting the counter.
When 1440 counter reaches 0, I am adding +1 day and resetting the counter.
I have also global variable holding timescale (1, 2 and 4) which are used as multiplayers for all animations, speed variables, shaders and particle emmiting speed.
I wanted this approach as I wanted to separate speed of simulation from speed of GUI which also consist of animated windows/frames, floating labels etc, I also have animated drag and drop elements. I guess changing Engine.time_scale would affect whole game including GUI. Also when I was testing stuff with Engine.time_scale I noticed some stuttering of simulation, animations when time scale was set to 2 or 4.
I don't know if this approach is good one as I am pretty new to GameDev (around 3 years of hobby game making) but it suits my needs so far. Not that much of a code, I have one Singleton that holds variables (day, month, years counters, time of day, continuous timer which keep time passed from start of game) and one Node+script that is controlling time in my game.
I am open to other ideas :)