web worker is not working correctly

0 favourites
  • 6 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I started making a game the day r388-2 was released. everything was fine, today I noticed my game's fps dropped. I started to check what's wrong, and it turned out that now the game does not use web worker and runs in DOM, while the previous build of my game, automatically also defines web worker. All project settings are the same, the only difference is that in the zip file of the old game there is a file webworker.js and in the new version of this file is not.

    P.S. Yeah, that sounds like a bug. I have 2 games, with the same settings, both projects have web worker: auto. The first game works with webworker and creates webworker.js file, but the second project does not create webworker.js file

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi.

    Checked versions r379 and r388-2 in auto mode the file "workermain.js" is created.

    Have you tried putting "Yes" in the worker settings.

  • The worker mode "auto" means Construct decides automatically, and we sometimes tweak the way Construct decides to work around things like known issues. You can change the setting in Project Properties to either "yes" or "no" to indicate a specific setting, but you then might run in to some kind of problem that "auto" mode was trying to avoid.

  • Ashley And is it possible to know what is a problem for a web worker? In my case web worker increases FPS by 15%. That's a lot. But at the same time I don't want to take a risk and turn it on forcibly

    I found the problem: I had a start of layout event: globalThis["onGameLoaded"](); and if this event is removed the web worker will work.

    I checked, and any js code disables the web worker

  • igortyhonHi, it works for me too for some projects. Ashley wrote that web worker detects this automatically

  • But at the same time I don't want to take a risk and turn it on forcibly

    If it used to be on, then changing the setting to force it to be on just means it's doing the same thing it was before.

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