I increase a variable every second. When i minimize the game, it stops. That is already known. But this is a big problem for all games with a progress for build a house, produce goods, etc. How can I find out if a player comes back into the game after a few minutes minimized to load the Storage, without restarting it?
Hello, I’m not really sure but maybe “always” condition can help you. I’m also very interested in this topic, because I wanna make an idle game that works like this.
As far as I know this will always be true, electron doesn’t process the renderer when not in focus. I’m not personally aware of a way to avoid that.
You could maybe use the Date expression to track the timestamp of when something started compared to the current timestamp, and use that instead of a timer?