0 Favourites

[TEMP. BROKEN] The Big NW.js Roundup - Tips & Tricks

  • Good Job TheRealDannyyy;

    Global.gc (); only unload the audio from memory?

    Thanks and Global.gc (); is actually the same as pressing the bin icon in the browser console.

    Basically everything that's in the queue (mostly audio) will be unloaded instantly.

    It's a very powerful feature which unfortunately doesn't get enough attention from NW.js users.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • With NW.js is there a way to check for parameters. For example "nw.exe console-on" where a param can enable a console.

  • With NW.js is there a way to check for parameters. For example "nw.exe console-on" where a param can enable a console.

    I asked Armaldio for help regarding this and he managed to figure out the code and gave me THIS example.

    It's fairly simple to use and makes it possible to check for a specific command line argument to enable something like a "devconsole" in your games.

    (Great feature for Steam by the way, which makes it possible to define "launch options" in the properties menu. Feels just like enabling the ingame console for

    Half Life in the old days. )

  • TheRealDannyyy

    Thanks, that helps a lot.

    • <Added> How To: Fetch & Make Use Of Command-line Arguments
    • <Other> Cleaned up the topic and simplified stuff (no walls-of-text anymore)

    Cheers!

  • Thanks for this amazing thread TheRealDannyyy ! Here's a new tip - adding "--in-process-gpu" to the package.json allows your game to be streamed in OBS, using the "game capture" option. However, the recording will freeze if the user changes the window size in runtime, so be warned.

    Without it, if you try to capture your game it will only show a black screen.

  • Thanks for this amazing thread TheRealDannyyy ! Here's a new tip - adding "--in-process-gpu" to the package.json allows your game to be streamed in OBS, using the "game capture" option. However, the recording will freeze if the user changes the window size in runtime, so be warned.

    Without it, if you try to capture your game it will only show a black screen.

    Thanks for the feedback!

    I've actually planned to create another topic dedicated to recording issues with NWjs.

    No release date for it yet but it would basically be a huge list containing information about:

    • The best game recording software for NWjs
    • Possible workarounds for recording software that has issues with NWjs
    • Template that can be shared to inform users (e.g. in Steam Discussions)
  • I was wondering if any one is having a similar problem I'm having with NWJS v0.29.0 in which Effects are no longer working and using the fallback. NWJS v0.28.0 works fine though. Running C2 r250. (Could that be it?)

    EDIT: Just to add some images illustrating the problem.

    This is the base image.

    There's a green background (TiledBackground) that goes over this with an Effect: Multiply. In v0.28.0 Chromium 64, it works as expected, and this is how it looks:

    In v0.28.0 Chromium 65 it looks like this:

    Also other effects don't seem to work as well. They simply don't show up.

    I'm not knowledgeable enough to know if this is related to Chromium itself -- I tried looking for instances of rendering errors using WebGL effects, etc but couldn't find anything relevant -- so I'm not sure where the 'bug' lies. Any hints? Thanks!

    [EDIT]

    I've upgraded to C2 r255, but no, that doesn't seem to change anything.

  • I was wondering if any one is having a similar problem I'm having with NWJS v0.29.0 in which Effects are no longer working and using the fallback. NWJS v0.28.0 works fine though. Running C2 r250. (Could that be it?)

    EDIT: Just to add some images illustrating the problem.

    This is the base image.

    <img>

    There's a green background (TiledBackground) that goes over this with an Effect: Multiply. In v0.28.0 Chromium 64, it works as expected, and this is how it looks:

    <img>

    In v0.28.0 Chromium 65 it looks like this:

    <img>

    Also other effects don't seem to work as well. They simply don't show up.

    I'm not knowledgeable enough to know if this is related to Chromium itself -- I tried looking for instances of rendering errors using WebGL effects, etc but couldn't find anything relevant -- so I'm not sure where the 'bug' lies. Any hints? Thanks!

    [EDIT]

    I've upgraded to C2 r255, but no, that doesn't seem to change anything.

    That is a known issue and effects are not working because WebGL isn't running as it's supposed to. This has already been fixed in all versions after NWjs v0.29.0 but I guess Ashley is waiting for a main release (v0.30.0) before uploading the most recent working version. Currently the only options we have is to use versions before v0.29.0 or manually install the subversion from HERE.

  • TheRealDannyyy, many thanks for your info. Helpful as always.

  • Can anyone tell me which NWjs version is the most stable and functional to use at this time?

    I'm still using 0.24.0, every time I'm thinking of upgrading I'm seeing posts about things that got broken, I don't have any issues with 0.24.0, but I do want to keep it as up-to-date as possible.

    Should I even upgrade or wait for 0.30.0 to come around?

  • Can anyone tell me which NWjs version is the most stable and functional to use at this time?

    I'm still using 0.24.0, every time I'm thinking of upgrading I'm seeing posts about things that got broken, I don't have any issues with 0.24.0, but I do want to keep it as up-to-date as possible.

    Should I even upgrade or wait for 0.30.0 to come around?

    By default I would always go with the most recent version, in this case v0.30.0, however currently it would be v0.28.0 judging based on bugfixes.

    I'd just wait for v0.30.0 because that's going to be a good release with some beefy new features (spoiler: experimental gamepad rumble support).

  • Thanks, I'll wait.

  • It should now be possible to use v0.29.0 without any issues if you have Construct 2 R256.

    Please note that this beta update will wipe your package.json files clean, so I'd recommend doing a backup of those 3 files.

  • TheRealDannyyy I noticed that when I use v0.29.0 and C2 R256 adding this arg

    --disable-software-rasterizer

    Causes rendering problems and the steam overlay is not loading, I actually don't remember why I added this arg, it was from something I probably read here before, but I can't locate any reference to it in your original post.

    Do I need this for something?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
91 7,680
zenox98's avatar
zenox98
Unread hot topic
164 38,115
totoe's avatar
totoe
Unread hot topic
98 7,598
norum82's avatar
norum82