Mobile performance and worker mode

Not favoritedFavorited Favorited 0 favourites
  • 7 posts
From the Asset Store
a ready made template of Mobile Advert, Google Play and Mobile IAP Plugin,
  • I recently noticed an oddity regarding the worker mode setting and mobile performance.

    Worker on: Game runs at 120fps as it should

    Worker off: Game now runs at 60fps

    It doesn't even seem to be a hard-cap either as it sometimes spikes to 70fps. In unlimited mode the game runs at ~900fps regardless of worker mode setting.

    Is there a reason why it wouldn't run at vsync speed just because it's not in a worker? Is that a bug or some android/chrome/mobile nonsense?

    I used platformInfo tickspersecond to measure.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Without knowing more I'd speculate that the browser might have a framerate cap to save battery (or possibly for compatibility reasons), but it only takes effect in DOM mode. In both DOM and worker mode, when v-synced, Construct uses the same browser API to schedule frames (requestAnimationFrame) so it seems unlikely Construct is responsible for the difference.

  • Yeah I thought something like that might be it. A brief test showed that the issue does not appear in samsung internet. So it has to be something chrome-specific.

    If you want to check it out and add it to your infinite todo list I'll send you all the info you need.

  • Well I found the culprit after some digging. It's this flag in chrome.

  • Thought it might be that - it's probably some experiment they're running to save battery. DOM mode runs in the main thread, but worker mode doesn't, so it seems like that would be exempt. (I'm not sure that really makes sense - presumably they want to throttle all updates to 60 FPS, so I guess it's a minor Chrome bug, but I don't think it matters too much.)

  • They better not throttle to 60fps and make me angry. I have a 120hz screen and I want 120hz, at the very least when it comes to playing games. Also I thought my game runs terrible on mobile for some reason because I expected to hit 120fps as per usual but because it uses scripts the worker mode defaulted to "no". That's an easy fix but it took me a hot minute to figure out why it was happening in the first place. There should probably be some kind of opt-in from chromes side for games to get the full framerate or something...

  • It looks like this Chromium issue is relevant, so maybe post some feedback there.

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