Disable auto pause?

0 favourites
  • 13 posts
From the Asset Store
Auto-Chess Arena
$1.50 USD
90% off
game inspired by auto chess , with soulslike combat
  • Is there a way to disable the auto pause functionality when the game loses focus (e.g. when the user goes to another tab in the browser)?

    Sometimes it would be nice to allow the user to browse the web (collect information, for instance) or do other stuff while the game is running - and be able to have a timer ticking all the time.

    I know it's possible to compare 'real time' using wallclocktime, but I find it tedious to implement (or change) all the timers and counters using this.

  • It's not really possible. Modern browsers like Firefox and Chrome effectively pause hidden tabs anyway, or reduce them to one frame per second (which is such a low framerate the runtime will switch itself in to paused mode anyway). This is important to ensure hidden tabs are not draining CPU or wasting battery life on mobile devices. Also many users desire automatic pausing because they don't want the game to carry on while they can't see it.

  • Ok, I understand. Thank you for the answer!

  • then how do other games not pause ? in a real-time multiplayer game the pausing messes up the logic and even times out the connection. in games with multiplayer sockets need to not pause. castlot doesn't pause, evony doesn't pause, Farmville doesn't pause. so why must construct pause ?

  • Cookie Clicker style games need to not pause when losing focus... there has to be a way to make this happen.

  • I'm pretty sure those games use the "suspended/resumed" action to reconnect/refresh the info in the game like the time and all...

    Sadly like I said in another psot those actions don't work in iOS brwoser-based games, I tested them, worked in IE and Firefox but not in iOS (Safari)... : (

  • I'd also like to disable this somehow. Working on an incremental game (cookie clicker style) and need to figure this out.

    The desktop workaround is to keep the tab in a separate window or browser since it still activates for tabs when disabled, however this is not viable for mobile and I'd like this functionality (continuing background process) to be available for all/most platforms.

  • maybe the wallclocktime could work for some games, I don't know, I didn't tested it.

    wallclocktime:

    The number of seconds since the game started, not taking in to account the time scale (i.e. the real-world time).

  • Sorry to be bumping but this is still a problem. I'm working on a clicker style game as a prototype too.

  • Visual917 What exactly is the problem? Use Browser "On Suspended" and "On Resumed" events, and wallclocktime expression to track the time the game was inactive.

  • Visual917 What exactly is the problem? Use Browser "On Suspended" and "On Resumed" events, and wallclocktime expression to track the time the game was inactive.

    What if I don't want the game to pause at all? Oh and, sorry. I wasn't able to login.

  • If your game did not pause at all, it would continue to waste battery and system resources, resulting in alienated users, poor reviews, and then eventually the browser or OS would kill it anyway to save the user. So it's a pretty good thing that it does pause automatically.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If your game did not pause at all, it would continue to waste battery and system resources, resulting in alienated users, poor reviews, and then eventually the browser or OS would kill it anyway to save the user. So it's a pretty good thing that it does pause automatically.

    Thank you for your answer. You're right. We need more updates for Construct 2 :P Thank you a lot for the software.

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