Time keeps running when game is on stand-by
-
Oh, well after writing this, I had the idea of the workaround, so I think this is not much of an issue, but maybe good to know.
Because when coming back from stand-by, all notes in my program were played at the same time!😵🤬
loop clear() print(time()) update() repeat
For reproducing the behaviour:
- run the program
- go back to the Switch Home menu with the home-button on the Joy-con
- wait 20 seconds
- Go back to FUZE4
-> it will show > 20 seconds, but I would expect it to just continue the up-counting of seconds where it had stopped before.
As a workaround I will try to check if a note should have been played longer than 2 seconds before and skip it.
-
It's with the date i thinks if it is 10 am you turn off your swicth, turn on it is 11 am
deduction 1 hour has passed, the time () function works as I think -
Does deltaTime() accumulate while in the Home screen?
If not, you could have a global time variable that you increment using deltaTime().
Or, you could check for a difference between time() and the previous call to time() (prevTime?) and check if it's greater than a threshold, and handle accordingly. -
@EvanTropFun That means it saves the start date-time of the program and time() always returns the current date-time difference. The help says: "Get the current system tick count". So, its the current system tick count, since the program has started. I would say, the concept of having the real-running time measured would be more convenient. Example: you have a game time and "pause" your game by leaving to the Switch Menu and getting back later.
-
@Slydog Thank you for your suggestions, I think the threshold workaround, is what I mentioned, if I understand you right. The
deltaTime()
I would have to investigate further. -
Thank you for the report!
-
For me it's not a bug it is even rather practical for some game
-
@EvanTropFun If you are referring to the scenario for games measuring time that has passed since the last run, we could use https://fuzearena.com/help/view/clock to get the real clock.