Danwood's Forum Posts

  • Since NW is going to be phased out, I'm exploring a possible temporary solution for sticking with WebView2 and allow usage of discrete GPU.

    I'm using the Fixed WV2 export, patching msedgewebview2.exe with the NVPatch. It works (as expected) but the antivirus doesn't like it.

    I'm out of ideas...

  • Ashley

    I tried the patcher, it doesn't work for WV2 (but does for NW), i suspect the exe that should be patched is not the exported game's exe, but msedgewebview2.exe in program files/microsoft. That's probably why the changes in r417 don't work either.

  • The patcher doesn't work for WV2, i suspect the exe that should be patch is not the exported game's exe, but msedgewebview2.exe in program files/microsoft

  • In that post, I mentioned an update in r417 that may help, but nobody has responded to that yet - it'd be interesting to know if it made a difference for anyone.

    WV2 export still doesn't use the discrete GPU, unless i export with --force_high_performance_gpu arg, which, as i mentioned in the post, seems to add an odd janking/stuttering, which is hard to notice but i can guarantee is there for me.

    The only way to fully and properly use the GPU on WV2 for me is to mess with the Nvidia settings and set the WV2 exe (the one in programs/microsoft, not the exported one) to "use full power".

    Still like that after 417.

    On NW.js i can just rename the exe to "run_game", now i can try the tool dop2000 post mentions, which is probably even better.. i'll report back.

  • For my game, DinoSystem, I've previously used a workaround to use the discrete GPU of players without forcing them to mess with the NVidia/ATI control panels - i exported the game with NW.js and named the exe "run_game.exe", which in the Nvidia settings is tagged by default with discrete GPU usage.

    I've always wanted to switch to WebView2, since Ashley has plans to fully support C3's own exported and discard NW, which seems a great idea.

    The opportunity to do that arised when i've discovered that adding "--force_high_performance_gpu" to the game's args when exporting makes use to the GPU regardless of the default card settings. So i switched to WebView2.

    But i recently discovered that the game, when exported, runs at 55-56 FPS - it uses the discrete GPU, but looks like it's not fully using it, and there's some subtle jankiness instea dof running butter smooth like preview. I tried to reduce the game's graphics, map size, entities number, nothing worked. Game runs at butter-smooth 60 fps in C3 preview, but 55-56 fps with subtle lag in exported.

    I then enabled discrete GPU usage for WV2 exe in programs/microsoft folder, and... it fixed it.

    So i'm back with NW.js, since i can just keep the "run_game" exe name and use the discete GPU of the user (again, i dont want to ask Steam users to mess with their card settings to play my game..)

    Is there anything else i could do? Are there any fixes, aside --force_high_performance_gpu which doesn't fully solve it, but actually creates a new. more subtle problem? I don't want to stick with NW.js, but seems like i have no choice now.

  • It's not clear to me whether you mean you want to list files in your project, or with a picker - you can use a file picker to pick a file directly, or you can use a folder picker to select a folder and then use the 'List contents' action to list all the files in that folder.

    It's also not clear to me what you mean by opening the image - perhaps you mean opening in the default associated app, in which case you would use the 'Shell open' action, or show the image in your project, in which case you'd need to read binary data from the chosen file.

    Note that if you want to do something like access a folder within the user's Documents folder, you need to use the special picker tag "<documents>", and that only works in desktop exports (Windows/macOS/Linux), and the same goes for the 'Shell open' action.

    I want to pick a file directly - In NW it shows directly the windows folder, but with WV2 the process is more complex and i didn't get it, what i did is:

    -> (pressing button) show open file picker

    picker tag: "<documents>" & "GameName\" & var1

    other settings default

    This shows the a file picker, but it doesn't actually open the folder i specified, it just remembers it (if i navigate to it) the next time the picker is shown.

    Then i should use the "On picker x complete" and "shell open", but i'm totally lost with that..

    Sorry if my question may be silly, I appreciate you taking some time to answer me!

  • Since that's the subject, I'd use some directions... i need to:

    1) open a specific folder to pick a file for opening -> "Documents/GameName/" & var1 (the name of a folder created for the specific game you're playing)

    2) open one of the files listed (it's an image)

    I've tried following the manual, but i can't get to grasp it, NW was so straightforward!

  • What i want to do is simple:

    1) open a specific folder (to select a file) -> "Documents/Myfolder/" & var1 (the name of a folder created for the specific game you're playing)

    2) select one of the files listed, which opens (it's an image)

    I've tried following the manual, but i can't get to grasp it..

  • If in fullscreen, when i alt-tab and return back, keyboard isn't responsive until i click somewhere. To fix this, i used Focus browser action triggering on the "On resumed" system condition, which works only with the editor proprieties setting "Pause on unfocus", but that doesn't work in the exported game.

    Is there another way to fix that?

    Focus doesn't even work in fullscreen apparently

  • Right-click on the Fonts folder in the project bar and import a font of your choosing. WOFF seems to be the preferred type, but True Type (ttf) will work as well.

    My project uses Bahnschrift and Font Awesome 6.

    You will have to rewire all text objects by selecting the imported font.

    Now when you export, C3 should include the font in the package.

    Thank you!!!

  • I exported my game in WebView2, using one of the default fonts (Arial Rounded MT, bold) for the main menu.

    My friend sent me a screenshot, and the font is different!

    Is there a way to make sure every user shows the same font?

  • > Tell players they'll need to say goodbye to their previous saves. Keep the old version in another branch, so if they want, they can continue their old games.

    I don't think this qualifies as a solution.

    If you find one, I'll make a statue of you xD

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As title, something wild is going on i'm unable to reliably reproduce (and as soon as i manage, i'll file a report).

    In my game, when i add or remove any instance from the project (including arrays, FileSystem etc), and load a previous save (using the built-in save/load system), there are some glitches, they appear totally random, like things that miss collisions, or invisible. Sometimes, the save loads with a black screen, which is often "fixed" by just shuffling the instances in my project's folders! THis started a few versions ago, i can't pinpoint which one exactly.

    I don't know what's going on... anyone alse having this? Maybe it happens only after a certain project size?

  • I wonder if it's possible to switch from NWJS to WebView2 in an already published Steam game?

    I'm guessing the folder and file structure will be different. Will this cause any issues? Will the game be able to access Local Storage data from NWjs version?

    Tell players they'll need to say goodbye to their previous saves. Keep the old version in another branch, so if they want, they can continue their old games.

  • It looks like this was previously discussed here.

    If the command-line switch works, you can use it - but it's a workaround, and usually we try to avoid making workarounds built-in, as it ends up getting messy in the long run. Construct already asks for the high-performance GPU (respecting the GPU preference in Project Properties, which defaults to high performance), but at the moment the Chromium browser engine ignores that. In an ideal world Chromium would support that and everything would run on the high-performance GPU by default without having to do anything. This issue looks like the most recent time it's been filed with Google, so I added a comment there - more votes on that issue might help.

    Thank you for the clarification, I've upvoted the issue, fingers crossed...