Game stops when window minimized or tab changed in HTML5 build

Pretty much what the title says. I’m making an idle sort of game and I want the game operations to be run in the background. I have solved the problem for the timers by using the system time and variables rather than timers. However, some of the operations still need to happen in the background when the window is minimized or browser tab is changed, as right now everything stops until the window is reopened.

Does anyone know of a workaround?

There’s not really a workaround sadly - the browser decides when to render or not to render a frame ultimately.
Though, by using TimeDelta (the time elapsed since the last rendered frame) in all your calculations, you can account for the time difference between different frames and this shouldn’t be a problem then.

1 Like

Okay, thanks for the tip. I was using TimeDelta a bit already but I’ll see what I can do with it to make it seem to the user that it is running in the background