About Games with NWJS

0 favourites
  • 12 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • I’m looking for tips and tricks for publishing NWJS-exported games on Steam.

    For example, I’ve noticed that sometimes, after closing the game, the NWJS application continues running in the taskbar, preventing the game from being reopened until it fully closes. It's inconsistent—it doesn't happen every time, and I’m not sure what triggers it.

    Previously, this issue occurred almost every other time I tried to start my game. However, in the latest game I published on Steam, it no longer happens. Could this be due to the newer NWJS version or the Steam .DLL files I added? It’s a bit puzzling, haha.

    I’d really appreciate advice from those with more experience publishing Steam games with NWJS. I believe Construct 3 currently only supports NWJS for desktop, but if you know of better methods or have any insights, I’d love to hear them. Your input is valuable to me!

    I wish you a great day!

  • If you can, use the Windows WebView2 export option (and coming soon, the Linux CEF export option) instead of NW.js - long term, we want to phase out NW.js and move to our own exporters, as they're a lot simpler, easier to maintain, and don't tend to have these weird issues that can crop up with NW.js.

  • If you can, use the Windows WebView2 export option (and coming soon, the Linux CEF export option) instead of NW.js - long term, we want to phase out NW.js and move to our own exporters, as they're a lot simpler, easier to maintain, and don't tend to have these weird issues that can crop up with NW.js.

    Thanks!,

    The DLL files that need to be placed in the .package and other Steam things, can you do all this without problems using WebView2?

  • If you can, use the Windows WebView2 export option (and coming soon, the Linux CEF export option) instead of NW.js - long term, we want to phase out NW.js and move to our own exporters, as they're a lot simpler, easier to maintain, and don't tend to have these weird issues that can crop up with NW.js.

    Wow, now that I saw your profile, I'm happy to know that you guys plan to improve this export part for Desktop, I'm looking forward to it, congratulations for creating the best Engine ever!!

  • If you can, use the Windows WebView2 export option (and coming soon, the Linux CEF export option) instead of NW.js - long term, we want to phase out NW.js and move to our own exporters, as they're a lot simpler, easier to maintain, and don't tend to have these weird issues that can crop up with NW.js.

    I would like to add an improvement suggestion to your product.. the part of saving the game is a bit complicated, I'm using Array and LocalStorage for this, but the location of where it is saved is a bit confusing, it would be great if in the new way of exporting, you could create, edit and read some JSON without problems, and then when you needed to locate the Save file, you would only need to point to the JSON, without much mystery.

  • 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?

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • > 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

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

    I think the only serious problem is how to handle Local Storage specifically. Local Storage data goes in to a database somewhere in the app data folder. I don't think there's any good documentation on how it works - despite the fact both use the Chromium browser engine, I wouldn't be surprised if there were weird issues that come up with pointing WebView2 at an NW.js app data folder.

    On the other hand, using files for storage will work with either kind of exporter. So if your project writes storage as files to some known folder that both NW.js and the File System plugin can access, then both can read/write safely to the same files.

    If you have an existing project deployed using Local Storage though, this is a tricky migration to pull off. You'd probably have to go through three versions:

    • Version A: existing NW.js export using Local Storage
    • Version B: an updated NW.js export that uses files instead, and automatically copies any existing Local Storage to files for backwards compatibility
    • Version C: a WebView2 export that only uses files and does not attempt to use Local Storage

    This is tricky to set up so definitely test anything like this carefully and thoroughly. However with this approach so long as everyone updates A -> B -> C, it should continue working without anyone noticing anything. One particularly difficult problem though is that even long after version C is out, anyone updating directly from A -> C will lose their save data. With software updates it is very difficult to guarantee exactly 100% of people have updated - usually it approaches but does not meet 100%, going 99%, 99.9%, 99.99% etc. and a few people end up left out for whatever reason. One way to mitigate this is to move to version B as soon as possible, but I doubt that will completely solve the problem - you'll still have a few people who lose their data. Another way to mitigate that is to have explicit "export your data" and "import your data" options in the user interface, so you can document this and provide manual instructions for anyone left behind, ideally with instructions on how to roll back to version A if they need to.

    We've gone through such migrations with Construct a few times over the years and they can be a challenge. My advice: approach with a great deal of caution and do it slowly over time.

    The other option is: just stick to NW.js. It's a lot easier as it means not having to do anything different! I think we will continue to support it until the next LTS release, which should mean at least LTS support until the end of 2026. Even after that, if anyone had major published projects that desperately needed some change, we'd still do it if at all possible - I appreciate there's lots of long-term projects out there still using NW.js and we don't want anyone to be left stuck with problems out of support.

  • Ashley Thanks for the detailed answer! We are of course staying on NWjs for now, but it's good to have a backup option.

  • I thank everyone who commented, I am using NW.JS on Steam, the solution to the problem of continuing to run was to replace "Close Browser" to "browser execute javascript: "process.exit(1);"" and the saving in the Cloud is pointing to "User Data\Default\IndexedDB"

    I believe this will solve my headaches with NW.JS

    Ashley But I confess that I am excited about the idea of ​​Construct's own exporter. I wish you success in this plan, and I would like to ask for your attention on this new tool to be able to save and load JSON easily, and that it can be sent directly to Steam without the need to add .dlls and other tasks that we need to do with NW.JS

    Thanks

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