-1

I am making an HTML5 game with Construct 2 and face one little problem: once I switch tab I get my game paused(suspended)

I have cleared the default engine suspension by calling "cr_setSuspended = function() {}" and now I don't receive messages about it in the log, but the game pauses anyway.

Maybe there is some browser stuff that suspends it automatically and I can prevent it? Please help me to find a solution

Modemi4
  • 47
  • 9
  • Browsers take power-saving measures when tabs are backgrounded. Animation frames and setInterval calls are severely throttled by design and it's rude to circumvent this (if it's even possible). I guess this all comes down to whether timing in your app is "frame" based or clock-time based. – spender Dec 03 '20 at 12:44
  • Thanks, there are some clock-based events I need to be running on the background. I will try to get rid of them – Modemi4 Dec 03 '20 at 13:51

1 Answers1

-1

If I avoid all the timers, "wait" and "every x seconds" events and use triggers only everything works fine, even for Photon multiplayer

Modemi4
  • 47
  • 9