NWJS - Fully removed on r450?

Not favoritedFavorited Favorited 1 favourites
  • 9 posts
From the Asset Store
you can add, remove and reorder list items and many more
  • EDIT: Rewrote to be more concise, despite being a wall of text still.

    Is NWJS "fully" removed on r450?

    If I save a project that has the NWJS plugin, then upgrade to r450, then preview, I see error along the lines of:

    runtime.js:1 Uncaught (in promise) TypeError: this._runtime.IsNWjs is not a function

    I presumed that NWJS was deprecated, so that you can still use your project with NWJS if you had the plugin added, but most stuff is "hidden away", so no exports and no adding the plugin. But judging by this, I take it that NWJS is removed from the core of C3 in whatever way C3 used to detect NWJS? This would mean all past projects with NWJS plugin cannot be run on r450 until it is removed?

    I also presumed that we could still choose to use NWJS, but no support provided from Scirra, so we would be on our own to export via HTML5 and mash it together with NWJS if we wish, or if a new NWJS version broke the deprecated NWJS plugin, then Scirra won't support this.

    If it is intended that existing projects with NWJS plugin must remove the plugin entirely to use their project:

    This feels rough, my choice to use NWJS has backfired and stalled me. I abruptly need to remove NWJS plugin, which is deeply ingrained into my project. Maybe there were warnings (or maybe it is unintentional that projects are erroring), but oh mann I was eager to try the new Text improvements in r450 (which deeply affect my project when I unexpectedly encountered this when migrating my project to WebGPU-only effects. I had worked around it for a month or two, with poor results, but didn't want to pester Scirra, and assumed it was a Chrome bug, but then got excited to see the update).

    Repeating what is known - WebView2 is not quite there yet. Very close but not equal to NWJS. Steam Overlay (fallback not ideal), supress the "fullscreen/Mouse pointer lock" popups. WebView2 feels more restrictive whereas NWJS feels more adaptable. I liked how C3 integrated fixed builds for NWJS, but WebView2 we must follow a guide externally. An advanced user may enjoy other aspects of NWJS, such as using Node Modules for further enhancement of their game (e.g. enabling Toast notifications on desktop).

    NWJS's Steam Overlay relies on an experimental Chrome flag, a risk that some players cannot play or get crashes. Personally? No hesitation, I'd enable that flag, it's important for my case. I'd rather my game behave like a standard game and not split into many processes, I want Steam Overlay/Achievement popups, I want OBS to behave as it does with any other game that is a single-process (Yes you can still record a window, but, if there's a choice to make it consistent with how OBS detects other games, I'd choose that). I don't care for any performance/stability reasons to avoid that flag, it is an optional flag that we can choose to use, it works fine for most, but if it didn't, you can offer a 2nd build on Steam with the flag disabled. All doable with NWJS, but WebView2 prevents all of this, there is no choice, and that sucks bad.

    I feel distrust towards WebView2 and slight distrust on following the Scirra path of EXE solution (again, only if this NWJS plugin issue was intentional and expects us to remove the plugin to preview our projects). Had I used Electron years ago, I wouldn't be suddenly panicked about what to do to update to the next beta. I'm thinking "what if" since this is now occurring: What if Scirra decide WebView2 is not the path to go with, due to slow rate of Microsoft response to WebView2 bugs/requests (such as the slow response to the "fullscreen" popups), or if Microsoft/Valve both say "No" to resolving the Steam Overlay issue and C3 cannot ever have Steam Overlay unless changing EXE solution - Some plausible situation like this happens, then Scirra move on to the next EXE solution, repeat this loop of killing projects until they remove the old plugin, etc. Such a time-sink for us trying to work on our games (and I empathise with the headache this causes Scirra to deal with). Where I mention distrust to Scirra's EXE solution, this means that I currently seek to find a way to continue using NWJS and am opposed to moving to WebView2, at least as of now. Still love practically every other decision Scirra makes, I am not going anywhere.

    Another point of distrust to WebView2, was what we saw with WebView2 being cross-platform - a promise then a rejection, so it's not far-fetched to distrust the future of WebView2.

    I also struggle to find "real-world" examples of WebView2 games on Steam, I think I encountered one months ago, but it's so rare to find, whereas NWJS has indeed had success out there with big named titles from RPG Maker and such. I can't peek at reviews to gauge what players experiences are like with WebView2, I can't Google info about it, it's way too new/experimental.

    I think I've missed the point of why NWJS is no longer viable. It had been for years, since C2 days. I recall FileSize being the downside, but surly I am mistaken - FileSize matters for browser-based games, but rarely for Steam games.

    I want to crack on and work on my game, but I'm rewriting stuff to fit in with SDKV1, WebGPU, and now WebView2. I'm happy to, and really try to recognise Scirra's goal and follow the philosophy. SDKV1 feels necessary, WebGPU provides a tangible benefit, but WebView2 is a downgrade as of now.

    LTS will support NWJS still and have build server and presumably NWJS gets new versions added and bugs that arise will be fixed for LTS, the workload for Scirra still happens for the duration of LTS to support NWJS but the primary version of C3 won't benefit from this work.

    I could use LTS version, it's a great addition, but what awful timing for my case with the WebGPU Text improvements, it's vital I can utilise that, especially after all the months of effort of mangling my project to not use WebGL effects.

    Last lesser point, it feels antithetical for WebView2 to rely on C++ addons. I don't believe there's many addons for over a year, besides one companion addon? I imagine it's more difficult than the typical addon to create, and may have less chance of attracting community members with the skillset to make these. I'd have thought encouragement of Node.JS would be the path to promote - More JS shenanigans to mess with and unlock more power for desktop builds (not to mention the huge repo of nwjs modules that exist now).

    The community has aided me to understand that, you can still use NWJS, just do it as JS event blocks. This is viable, but must I really have to re-interpret every NWJS action (as I made essentially full-use of NWJS plugin) into a JS event block/function, and figure out the more complex ones like loading into a Binary Data object (which again, heavily used in my case). Whyyy when it was working so fine just one version ago. :(

    My apologies for the reactionary post. I fear the workload of having to move to FileSystem plugin, which may not be a simple swap-n-replace since NWJS was sync and FileSystem is async - And it feels like work that will just result in a downgraded end result when it comes to exporting.

  • Yes, in summary, NW.js is fully removed in r450+. We marked it deprecated in r421 back in January, and support for NW.js will continue in the r449 LTS releases until the end of 2026, so that's an approximately two year time span over which it will have been phased out.

    This also came up on Reddit and I explained in much more detail why we've done this in this comment. I won't repeat what I wrote there here, so do go and read that for the background on this.

    Broadly speaking it is time to move everyone over to our own desktop export options. The maintenance work is a key consideration as we are a small company with limited resources, and maintaining two options for desktop exports is a significant drain on resources, particularly given how tricky NW.js is to maintain and customize.

    runtime.js:1 Uncaught (in promise) TypeError: this._runtime.IsNWjs is not a function

    Oops, that shouldn't happen - fixed that for the next beta.

    I also presumed that we could still choose to use NWJS, but no support provided from Scirra

    If you are happy with that, you will still be able to use NW.js in the r449 LTS releases indefinitely, even past their official support period. We have never taken down old releases. Every past release we've ever made is still available on the releases page and it'll stay that way.

    What if Scirra decide WebView2 is not the path to go with

    I am well aware how difficult these transitions can be, and I can assure you we absolutely plan to stick with WebView2 (and our other desktop export options) permanently, and would only change technology again in extraordinary circumstances. In particular with Windows WebView2 and macOS WKWebView we are using the webview built in to the system, which is a key thing we want to avoid having to ship an entire browser engine with exported projects. No other technology can offer that other than the system built-in option.

    I'd have thought encouragement of Node.JS would be the path to promote

    It was different in the past, but at this point, the entire node.js component of NW.js is basically redundant. It provides a large API surface, but geared towards server-side development. It does not do things like out-of-the-box support for integrating the Steamworks SDK, and in fact it makes that a lot harder, as all your C++ integration has to go through the node.js layer, which also has some really awful compatibility issues (at least in NW.js). Our new wrapper extension model basically means you can write C++ code that directly interacts with JavaScript via a simple messaging system, which makes it much easier to integrate custom native code.

    I do apologize for the inconvenience of these technology switches, but in the long term they are absolutely necessary. I know they are painful and these are not decisions we take lightly. As I mentioned in the r450 release notes, Construct 3 has been around for about 8 years now, and we need to think about where we'll be in another 8 years and longer. These kinds of decisions are difficult but important to ultimately ensure Construct is still a great product that keeps improving and remains competitive.

  • Thank you for your understanding reply!

    We marked it deprecated in r421 back in January

    ...oops, I missed that. Not an abrupt suprise after all. I seemed to have confused with the various community chatter where some of it is "What if X gets removed, prepare!" and some is "X will be getting removed, prepare!". As with r450, indeed a lot was going on at once.

    This also came up on Reddit and I explained in much more detail why we've done this in this comment. I won't repeat what I wrote there here, so do go and read that for the background on this.

    Thank you, and I fully read both reddit posts. I suppose a number of points are echoed in what I had written originally, like the experimental flag thats not recommended - It's just a shame we can't "choose" to risk it for a possible outcome we desire. I wonder about "--in-process-gpu" - Isn't it a Chrome flag, so should work in any Chrome engine, or is it that WebView2 is just built different for that one specific case? If there were a way for WebView2 to have this flag, and devs can choose to run the risk, then, that'd be a major incentive imo

    Broadly speaking it is time to move everyone over to our own desktop export options. The maintenance work is a key consideration as we are a small company with limited resources, and maintaining two options for desktop exports is a significant drain on resources, particularly given how tricky NW.js is to maintain and customize.

    Completely understandable - One query: LTS is supporting NWJS for another year or so, does this mean build server gets new NWJS versions, Steam plugin gets new SDK update still, and any bugs to C3's NWJS plugin introduced from a new NWJS version would be looked at? Or is LTS frozen in time with no added NWJS build versions, no fixes if C3 reacts buggy to a newer NWJS version? If the former (which I'm thinking is not the case lol), wouldn't it be good to keep NWJS until the LTS version has finished, since workload remains the same and is just excluding the fixes added to LTS from main C3?

    Oops, that shouldn't happen - fixed that for the next beta.

    ... I gotta quit with walls of text, I apologise. This was the main crux - I presumed too much from this error, I thought it was a strict "yep we have ripped it out, you gotta remove NWJS plugin if you want your projects to remain alive", which was painful, as mentioned with the desire to test my project with r450 but unable to. Roll on Tuesday!!

    I am well aware how difficult these transitions can be, and I can assure you we absolutely plan to stick with WebView2 (and our other desktop export options) permanently, and would only change technology again in extraordinary circumstances.

    I hear your commitment and it is reassuring. Your community cheered loud in that Steam thread for you (inc myself and I argued with someone being unhelpful there, too bad it was more of a public-facing forum and not the dev area which is restricted), we do believe in you.

    I do hold opinion that bundling the browser engine is preferable. I have nightmares back in C2 where Audio broke in all exports in latest browsers, and Scirra fixed this, but everyone had to re-export their projects. I like the possibly-ill-perceived stability of a bundled browser (its why I mention Fixed version of WebView2 being desirable within C3, rather than a separate guide to build it), where at least things like that old C2 Audio issue won't strike (but I am also aware a simple windows update can have a similar affect. Can't win really. I suppose if had to choose, I'd go the "blame windows update" path, as it feels like it's more likely to have affected other games due to a win update).

    It was different in the past, but at this point, the entire node.js component of NW.js is basically redundant. It provides a large API surface, but geared towards server-side development.

    I find this interesting and will take it as a warning. I have explored node modules and found various useful things that help with communication to the desktop, to other apps, etc - Though I am relying on existing npm modules whom have done the work of coding this and prob used C++ and such - and maybe most are indeed Server-related usage, and I only found the odds and ends that do light communication with desktop.

    Our new wrapper extension model basically means you can write C++ code that directly interacts with JavaScript via a simple messaging system, which makes it much easier to integrate custom native code.

    I really hate to ask, but I'd love to see a guide/blogpost on writing a C++ addon for WebView2, even if you're not explaining the C++ fundamentals, but just the process. Inb4 you already done this and I missed this, like I missed the year-long warning of NWJS deprecation. FWIW I read all blog posts, even some chapters of your latest Typescript entries, when I'm a noob at JS and not even planning to touch TypeScript, and yet I pick up a number of things that I then learn and find useful.

    I do apologize for the inconvenience of these technology switches, but in the long term they are absolutely necessary. I know they are painful and these are not decisions we take lightly. As I mentioned in the r450 release notes, Construct 3 has been around for about 8 years now, and we need to think about where we'll be in another 8 years and longer. These kinds of decisions are difficult but important to ultimately ensure Construct is still a great product that keeps improving and remains competitive.

    It's ok, it is less painful after learning that preview error is a mistake, I again apologise for being so reactionary. I was a week late to checking the update out due to stupid life issues, then see I can't begin to preview at all, and just thought here we gooooo another fork in the road, nobody else reported it it seems, so it must be fact that we gotta nuke any projects we wish to upgrade beyond r449

    I feel I will pursue NWJS still. I keep an eye on literally everything that goes on and I drift to things that unlock further functionality or are more optimal, so I will turncoat as soon as I find WebView2 appealing, even if it's due to some other new features that make file handling/management/listing/creation easier (these are things I had been exploring with NWJS, accessing further "List Item" parameters for subfolders or "list only specific extensions".

  • Ashley can you add an option in the export window for WV2: to bundle the browser with it, so the game is self contained? Like normal native games do. NWJS was able to do that. Thanks

  • I wonder about "--in-process-gpu" - Isn't it a Chrome flag, so should work in any Chrome engine

    It is a Chromium flag but the process model of WebView2 is different, and even with the flag it still uses a separate process for web content.

    LTS is supporting NWJS for another year or so, does this mean build server gets new NWJS versions, Steam plugin gets new SDK update still, and any bugs to C3's NWJS plugin introduced from a new NWJS version would be looked at?

    I'm planning to just update versions approximately quarterly through the LTS support period. So NW.js will continue to update to the latest Chromium version and the Greenworks plugin will be updated accordingly. However there won't be any new features, and with bug fixes it depends - if it's easy to fix it we will, but if it's something like a tricky NW.js regression that they don't fix for a long time, there might not be much we can do. That's part of the reason we want to move away from NW.js too - if we kept supporting it that's still a risk.

    I do hold opinion that bundling the browser engine is preferable.

    In practice I don't think this is necessary any more. Web and Android exports are Construct's most popular export options and have both been using auto-updating browser engines for many years, and I can't recall any Chrome update that broke things since the time with the Audio plugin that you mentioned, which if I recall correctly, was over 10 years ago. We've had the Windows WebView2 export option since 2021 and I don't believe auto-updating the browser engine has ever been responsible for a breakage with it.

    Things have also changed. I do remember the issue with the Audio object, but it was party because we started using the Web Audio API when it was brand new (circa 2012 IIRC). They decided to make a breaking change to the API that was not backwards compatibile. However back then browsers implemented new features with a vendor prefix that was meant to signal "non-standard and subject to change", but in practice ended up being backwards compatibility liabilities anyway. So browsers changed how they publish new APIs to avoid this problem. Chrome now uses an origin trial model where new APIs are only enabled for websites that opt in. They use feedback to adapt the API and later when it's ready for full release they publish it in its final form without any vendor prefix, and they know they are obliged to provide permanent backwards compatibility. So that specific type of problem is both much rarer now because the way new APIs are developed is better, and also because most of the web APIs Construct uses have been around for many years by now, and so are not subject to change.

    These days I think the risk that something like a Chrome update breaks your project is about the same as the risk that Windows Update or a graphics driver update breaks your project. If you publish software you have to maintain it and watch out for such things anyway, and if they happen, usually there is some way to fix it and you publish a patch. In particular I would say buggy graphics drivers are a far bigger problem than browser updates - I see them (or things that look like them) pretty regularly - and that's all part of the system stack that affects all software. It's not like all other software in the world outside of browsers always works brilliantly.

    And if you disagree and want to bundle the browser engine anyway (also to respond to alastair) then the WebView2 export option does support fixed distribution mode (which is documented in the WebView2 export guide) - you just have to set it up manually.

    I have explored node modules and found various useful things that help with communication to the desktop, to other apps, etc

    I'd point out npm can still be a useful source of libraries that can work in the browser. It's specifically the node.js runtime that I meant was effectively redundant for our purposes.

    I really hate to ask, but I'd love to see a guide/blogpost on writing a C++ addon for WebView2

    All I'd say is copy and paste the wrapper extension sample plugin from the addon SDK and tweak it. It shows how to call the MessageBox Win32 API from JavaScript, and it's the same thing to call other APIs. The Steamworks and Epic Games plugins are on GitHub and show more complex examples. The Addon SDK documentation also has a guide on wrapper extensions.

  • My question was more about having an option within Construct's export window. Like how it worked before r450.

    Anything else feels like a regression.

    I think NWJS should still be available as an option in the next Stable, even if it's in the depracated category. No point removing it yet.

    At least until such a time that parity is achieved with other export options.

  • support for NW.js will continue in the r449 LTS releases until the end of 2026, so that's an approximately two year time span over which it will have been phased out.

    Ashley, can you confirm if LTS r449 will include support for r449.2?

    Thanks

  • Will this LTS also recieve all bug fixes that occur?

    Like the fixes to the animation editor that appened in r450.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My question was more about having an option within Construct's export window.

    As I described I genuinely don't think this is necessary any more, and many people saw it as a significant downside. However we haven't made it impossible - if you still want to do that you can do it manually, which I think is a reasonable compromise.

    can you confirm if LTS r449 will include support for r449.2?

    LTS releases pick up from where the last stable patch left off - for example the LTS release r397.3 was continuing on from stable release r397.2. And to be clear, all LTS r449.x releases will still include NW.js support.

    Will this LTS also recieve all bug fixes that occur?

    Our policy for LTS patches is described in our guide on release channels, which I think is pretty much in line with industry norms. You can see how this worked out in practice with past LTS releases.

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