what is the Right way to pause the game?

0 favourites
  • 4 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • currently, I'm using a timescale. set it up to 0 to pause.

    It is working but I have one annoying issue with it

    when switching tabs in browser and returning to the game, it is unpausing automatically, and it is not good, because you see the pause menu, and the game should be paused. even worse when you are showing ads and pause the game for it, but the game starts to play while the ad is showing

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • when switching tabs in browser and returning to the game, it is unpausing automatically

    That seems a little odd. What events do you use to pause/unpause? Can you share a screenshot? I just tried with a very basic setup and it doesn't happen for me.

    Worst case you can probably work around it with on suspended/resumed conditions but there's possibly some error in your events.

    construct.net/en/make-games/manuals/construct-3/system-reference/system-conditions

  • > when switching tabs in browser and returning to the game, it is unpausing automatically

    That seems a little odd. What events do you use to pause/unpause? Can you share a screenshot? I just tried with a very basic setup and it doesn't happen for me.

    Worst case you can probably work around it with on suspended/resumed conditions but there's possibly some error in your events.

    https://www.construct.net/en/make-games/manuals/construct-3/system-reference/system-conditions#internalH1Link10

    I'm not doing anything unusual

    i.postimg.cc/wB9njx8T/Screenshot-2023-12-03-092424.png

    but there is an additional setting that causes this issue "Pause on unfocus"

    As I understand this behavior is using a timescale as well and setting the timescale to 1 after the page is in focus again

    It is a bug, as for me, because the game should track the timescale on unfocus and set it up to the previous state when will be in focus again.

    but yes, we can use focus/unfocus to resolve it

  • but there is an additional setting that causes this issue "Pause on unfocus"

    Oh, I never use this feature because it seems mostly pointless to me other than testing on suspend/resume triggers. This arguably could be considered a bug, but I tried to replicate it and it's not happening for me.

    "Pause on unfocus" only works in preview btw., at least according to the tooltip. The game always pauses on unfocus on export.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)