Danwood's Forum Posts

  • --force_high_performance_gpu seems to work, anybody can confirm this?

    Ashley should this be included as one of the checkbox for exporting?

  • Is there an arg i can use when exporting my game with WV2 to force it using the discrete GPU? I noticed it won't on my laptop, and I need to manually force my gpu to be used for the WV2 executable in the Edge installation folder, i don't want to induce my steam players to do the same.

    With NW.js i just named the game exe "run_game.exe" and it did use the NVIDIA GPU, but that doesn't seem to work for WV2... any hints?

  • Filed a bug report

  • As title, is it just me?

  • There is a known issue with WebGPU that updating textures seems significantly slower than WebGL. In Construct, changing Text objects and a few other things require updating a texture, so these cases may be slower than WebGL for the time being. I filed an issue about it back in June but it hasn't been sorted out yet. As WebGPU is still pretty new I think there may be a few early issues like this to be sorted out, but I think it's likely it will end up as fast or faster than WebGL in the long run.

    Gotcha. I was suspecting it depended on chromium, hopefully they'll fix that soon enough. I'll stick to WebGL for now, although i've set up everything to transition to WebGPU (updating effects).

  • I have a function that updates UI texts, and an event that triggers that function every tick during specific conditions: in WebGL it runs at 60fps, in WebGPU runs at around 10fps. If i disable the functions, runs again at 60fps.

    WebGPU is hella slow at rendering text objects.

  • It's a great concept, the kind of game that facinates me. Trust me, this is going to be a lot of work since it's a complex game with many interconnected systems, it will take time and brain power! I know that because I spent 10 years developing an ecology survival sim called DinoSystem...

  • as title - there's the new browser action "set window position", but i can't find the right X/Y coordinates to move it at the user's desktop center.

  • Also game load causes issues

  • Yep it does prevent worker mode. Now a way to have it and keep worker mode would be the best of both worlds!

  • > Doesn't this unfortunately prevent the game from running in Worker Mode? Which means that you'll lose performance/smoothness by doing it.

    Hmm yeah I think that's the case. You can also edit the exported index.html though like so, which should keep the worker mode enabled I think.

    But I there should be an in-engine way to handle this. A "prevent default" plugin or something, because it's one of those topics that comes up over and over again.

    BTW, this code should disable all keyboard inputs, iirc including alt+F4, F12 and such.

    > document.addEventListener('keydown', function(event) {
    	event.preventDefault();
    	});

    You sir saved my life!

    Will adding this to main.js script prevent worker mode?

  • In addition, there are more browser commands that are messing with my exported game: aside the F keys, when i hold alt and than move with WASD, my character gets stuck and there's a window alert sound.

  • Put this into the runOnStartup function in main.js

    > document.addEventListener('keydown', function(event) {
    		if (event.key === 'F5') {
    		event.preventDefault();
    		}
    	});

    I tried to open the main.js file with notepad++ and it's a wall of text, how can i show the code as in your screenshot?

  • Oooh interesting, I utilise F keys in my project, but haven't tested it yet. Does it get overridden if you have an "on f5 pressed" event present? I'm guessing not, but wanted to check.

    It doesn't unfortunatly

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there a way to prevent WebView2 to prompt page refresh with F5, and other commands as well with F7 etc?