The Big NW.js Roundup - News & Tips

From the Asset Store
Jump over the small square and avoid hitting it as long as you can!
  • I noticed this post was 3 YEARS OLD... HAs anything been done to make it easier to get a game on STEAM (Steamworks) or are all theses "workarounds" still applicable?

    This has been updated continously in the past 3 years, so the workarounds are legit.

  • I found an issue about the NWjs zoom pinch (togglable with ctrl+mouse wheel) that can't be disabled in viewport, which can be very inconvenient if used by accident by an unexperimented player and can ruin the game display, as well as making ctrl+mousewheel impossible to use in the events;

    (I am using the latest version of NWjs for C2)

    Also I tried to add the "js-flags" property to the package to use the "--disable-pinch" flag following the example of this topic, but I get this error message :

    Any idea of what could be the cause? Thanks in advance ~

    Edit : I tried to put the flag and export the game but it still doesn't work

    Edit 2 : Found another bug, it seems to concern HTML elements only, I'm using a slider bar and a list in my project, and this is how it looks before and after export :

    My project is 1980x1080, tested with both Letterbox scale modes, resizable windows enabled and disabled, it happens everytime after export;

    (just tested with a previous version to be sure, the problem happens only in the latest one)

  • The zooming issue and many more have been fixed in NW.js v0.43.4, I guess we'll get an official update next month when v0.44.0 is out.

    Please test the form issue again next month or upload something for me to reproduce. Screenshots aren't really useful and delay testing on my end.

  • Tomycase One thing that came into my mind since you also reported the zoom issue. NWjs should save the zoom level after closing, did you make sure to reset it back to 100%? (Form size issue.)

  • You're talking about the issue I had with HTML elements right? That would explain the problem then, thanks

  • Hi I'm commenting on here by request (on the Discord) about my issues with disabling the escape key for desktop builds using the Construct 3 NW.sj exporter, and also making manual builds using my own "NORMAL" NW.js downloads (all testing being done in NW.js version 0.41.1 Windowsx64). The problem is that NW.js documentation states that it does not set the escape key to be the default for exiting fullscreen, but when I build a game and have events set it to fullscreen it does cancel fullscreen when hitting the escape key. Some people want this for different reasons, but I don't I want my game to behave like hundreds of other native desktop games where escape pauses the game and brings up the menu screen (think Minecraft style). There will be options (right now I have the "F" key) to toggle fullscreen and it works great. And I am at the point where I am able to override the command by making a bool and setting the fullscreen after bool checking. So if I hit the ESC key, there's a flash and then it immediately goes back to fullscreen. But the escape key is being "locked up" in this default process somehow and I can't find anywhere where the ESC key is being set by C3 or any of the scripts.

    I have found a couple of references that talk about the"The Event interface's preventDefault() method" from this site

    https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault

    and I found the statement about the NW.js NOT setting this by default at this site: http://docs.nwjs.io/en/latest/For%20Users/FAQ/#how-to-leave-fullscreen-mode-with-esc-key

    which specifically stated that this is NOT the default behavior of the APK.

    I'm actually learning a lot by all of this research and was super happy to find this thread from the guys over on the Discord. Thanks for inviting me to post about this here, in the hopes that once it is figured out, then it might help other folks in the future.

    If you require any other information just let me know and I'm happy to share any I can if it helps. Cheers!

  • CuL8R This issue has been worked around in the next NWjs release. It's going to be in NWjs v0.43.7 or v0.44.0 depending on how things go. I won't include it in the roundup, since it's Construct 3 specific but everyone who needs a workaround right now, can use the actions based on my example.

    (Ashley thanks for the additional help!)

  • CuL8R This issue has been worked around in the next NWjs release. It's going to be in NWjs v0.43.7 or v0.44.0 depending on how things go. I won't include it in the roundup, since it's Construct 3 specific but everyone who needs a workaround right now, can use the actions based on my example.

    (Ashley thanks for the additional help!)

    I'd like to say thank you very much for all the help you gave me, and the workaround works flawlessly. I'll be happy to see what they come up in for the NW.js fix. Cheers and have a great day!

  • Hello everyone,

    This topic really helped me ensure my game is going to be Steam-ready. Thanks a lot! :D

    Only two small problems remain. Maybe we can clear them out and I'll be good T_T.

    1/ I managed to change all the icons EXCEPT the one of the top left corner once the game is launched on Steam.

    I've used ResHack to change the .exe icons and I've changed all the Icons in the dedicated folder in the Project.

    The icon in the taskbar is Ok, it's really just the top left one. Any idea how I could replace it?

    2/ I get weird artifacts when steam popups leave the screen in the black bars on the side of the game (if I have resized the window so that there are black bars). They leave a "trail".

    See here :

    I'm using Greenworks 0.33.3-r2 associated with NW.js 0.33.3 and Steamworks SDK: 1.42. This is the recommended package as far as I know.

    Just in case I added --enable-features=nw2 to the "chromium-args" following the workaround "Steam Overlay Displaying Window Content" but it didn't change anything.

    Thanks in advance for helping me polish my game as much as possible <3

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1/ I managed to change all the icons EXCEPT the one of the top left corner once the game is launched on Steam.

    Probably caused by the old version of NWjs that you're using. Please update to a newer one. Read below for more info on how to get Greenworks working with newer versions.

    2/ I get weird artifacts when steam popups leave the screen in the black bars on the side of the game (if I have resized the window so that there are black bars). They leave a "trail".

    You are using Greenworks 0.33.3-r2. This is an ancient version of NWjs that you probably stay at because of the outdated Greenworks addon support. You can get up-to-date prebuilds, which make it possible to keep using the addon with newer versions of NWjs.

    (You can also check out: How To: Workaround Steam Overlay Issues With Letterbox Scaling)

  • Thank you as always TheRealDannyyy

    You rock.

    I was a little bit wary to change NW.js by fear of breaking anything, but I've tried the prebuilds in order to export with NW.js 0.44.0. Apparently everything is fine regarding the game itself, I don't see any problem. If a side effect is the game is a little bit more efficient then great! :)

    Regarding the Icon problem : it is solved! It takes a little time to load. At first it is super pixelated but then a second later it gets clean. It's better than before though. This happened to anyone else?

    Regarding the "trail" problem: it is still there.

    I didn't think to look at the particular workaround you're refering to, somehow I thought it was for Letterbox Integer Scale... But the plugin is aimed at construct 2 and I don't find it on the C3 plugin page :/

    (I realize we're in the C2 section of the forum but this topic seemed general enough)

    How would you go to try an equivalent workaround on C3 ?

    Thanks again for a much appreciated help.

  • Regarding the "trail" problem: it is still there.

    I didn't think to look at the particular workaround you're refering to, somehow I thought it was for Letterbox Integer Scale... But the plugin is aimed at construct 2 and I don't find it on the C3 plugin page :/

    (I realize we're in the C2 section of the forum but this topic seemed general enough)

    How would you go to try an equivalent workaround on C3 ?

    Thanks again for a much appreciated help.

    It's for any kind of letterbox. The trail issue is actually caused by Construct itself. The engine basically doesn't refresh the letterbox around the game canvas and since Steam requires a constantly refreshing canvas (including letterbox), it leaves trails behind.

    You could try and report it as a bug since it's caused by Construct but I already did in the past and it got denied because that's how it's supposed to work.

    Sorry no clue how C3 handles the letterbox stuff with the new runtime and such. I'll see what I can do.

  • Sam Dimanche I've looked into the window bar icon and it's probably a regression, reported here.

    About the Steam Overlay trail issue. I made a "pluginless" example that you can download and test on your end. (IMPORTANT: This will not function in Construct 3 worker mode!)

  • Thank you so much for doing the reporting! Does it mean if I revert back to an older nw.js (say 0.43.1) it would "solve" the icon problem?

    I tried your pluginless workaround. First, thanks for cobbling it together! I didn't know when to trigger this event since the steam popups do not trigger the "On Overlay Activated" condition, so I went ahead and let it run every tick for now. Unfortunately I didn't see any change regarding the trail that stayed as usual :/

    (I am not in worker mode btw, and I tested on a real Steam build)

  • Thank you so much for doing the reporting! Does it mean if I revert back to an older nw.js (say 0.43.1) it would "solve" the icon problem?

    You have to test it yourself, no clue.

    I tried your pluginless workaround. First, thanks for cobbling it together! I didn't know when to trigger this event since the steam popups do not trigger the "On Overlay Activated" condition, so I went ahead and let it run every tick for now. Unfortunately I didn't see any change regarding the trail that stayed as usual :/

    Do not run it every tick, it will kill performance. Check out "How To: Workaround Steam Overlay Not Refreshing" if nothing else is working. It's fine on my end so it's safe to assume the problem is from something on yours.

    Heads up, if you decide to stay on older versions, I won't be able to help you. Older versions might have issues like this that have already been fixed.

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