How to Update NW.js to Dramatically improve Game Performance!

● ARCHIVED · READ-ONLY
Started by KillerGin 273 posts Page 6 of 14 View original ↗
  1. Just a word of caution to people who do this: upgrading the node version and then downgrading it seems to cause the "Your profile can not be used because it is from a newer version of NW.js." pop-up.

    While this is easy enough to fix if you are testing it on your own, it has been a nightmare trying to fix for all of my playtesters. Several playtesters say the game doesn't even run at all for them now.

    So my suggestion is to figure out your version of node BEFORE you distribute your game in any way. I guess this is why you do playtests though, right?
  2. What would be a downside to just upgrading to the latest 64x version? Why would you be downgrading it?
  3. might have a plugin that isnt getting updated anymore and not compatible with newer version
  4. Hello! I updated nwjs and it seems to run fine but now the game window launches at the top left corner of the screen instead of the center. Anyone know how I can change it back to the center again?
  5. MorsVictrix said:
    What would be a downside to just upgrading to the latest 64x version? Why would you be downgrading it?
    Compatibility.

    For example, if you're releasing on Steam, you need a version of nwjs which is compatible with binaries of Greenworks and the Steamworks API on all your platforms to support Achievements. As a result, I went with nwjs 54.1.
  6. I'm no sure I care so much for the achievements as much as I care for the performance boost. I upgraded to the newest 64x version and I must say the difference is obvious.... but I also updated the pixi.js and now I keep getting ''Deprecation Warning: VoidFilter has been renamed to AlphaFilter, please use PIXI.filters.AlphaFilter'', but other than that everything works fine. Even the plugins all work, except YEP Core only works when the project is deployed, but not when I'm playtesting the game...
  7. After going through this process to upgrade to 49.2 for nw and 4.8.9 for PIXI, I am now getting this whenever I open console while testing.

    1632747570951.png

    Any ideas on how to fix this, I don't have to tell you how important it is to still be able to use the console in-game while testing.

    Happens with all plugins OFF and in RPG Maker MV 1.6.1, if that helps.

    EDIT: Caused by downloading the non-SDK version of NWJS 49.2, redoing the update with the SDK version fixes this.
  8. WCouillard said:
    After going through this process to upgrade to 49.2 for nw and 4.8.9 for PIXI, I am now getting this whenever I open console while testing.

    View attachment 202529

    Any ideas on how to fix this, I don't have to tell you how important it is to still be able to use the console in-game while testing.

    Happens with all plugins OFF and in RPG Maker MV 1.6.1, if that helps.
    Have you made a backup before updating? In my experience that's the only 100% fix of your problem. Maybe some of the more experienced forum members can help you find a sollution, but that's the only one I can come up with. Sorry. :/
  9. So I noticed after upgrading my NW.js that my game no longer starts centered on the screen. Instead, it opens near the top left quadrant of my screen. Any idea why? There must've been a file/setting that got overwritten when the files in the nwjs-win/nwjs-win-test folder got copied over.

    Edit: Nvm, I found the fix back on page 4. I'm running the latest (as of this writing) v0.57.1 and it runs perfectly. No issues to speak of.

    1634637703533.png
  10. Does anyone else have a problem with newer versions of nwjs, that it breaks their game's fullscreen-on-boot?

    On boot in nwjs 54.1/55/57.1, My game goes fullscreen for an instant, then goes back to a window.
  11. @EthanFox Strange, I haven't encountered any such issues w/ v0.57.1 on my end. I can fullscreen just fine. What method are you using to boot in fullscreen?
  12. [EDIT: I transferred my game over to my Desktop instead of my laptop and the popup is gone with the original 0.29 version of nw.js. By messing around with the Package.js, I was able to force a screen resolution my game could support it and not have black borders. In short, DO NOT do this tutorial at all unless you care to have a 5 fps difference. :)]

    I tried to follow the tutorial on changing the nw.js version from version 29 to version 49 (the one compatible with OrangeGreenworks).
    Upon finishing the tutorial, it would make my test game pop up at the standard resolution of RPG Maker but like a weird widescreen with large black rectangles above and below the game screen. (screenshot below is the look for the game, 1080 by 786)
    After deployment, the game would not run at all.
    So, I tried to delete all the files from the engine (because the game itself did not cause the error) and reinstalled RPG Maker MV from Steam.
    Now the following error pops up in playtest and deployment but does not affect gameplay: "Your profile can not be used because it is from a newer version of NW.js. Some features may be unavailable. Please specify a different profile directory or use a newer version of NW.js."
    I tried following the simple fix to eliminate this error, but I do not have the following files in the KADOKAWA folder: Web Data and Web Data-journal.
    Any help is appreciated, thanks!
  13. KillerGin said:
    WARNING:

    This is a step by step guide for MV users to update their NW.JS to dramatically increase the performance of their game.

    (Updating NW.js for Mac may make RPG Maker MV compatible with OSX Catalina and Big Sur! OMG!)

    MZ users can use the ideas presented in this guide to update their NW.js from 44 to 50 if they like, but I'm not sure how much of a performance update this will be. (To update MV from 29 to 50 (or in my case 49.2) is a massive update!) It's actually easier to update MZ since the engine folders are structured much better. Just find the "Resource" folder, and replace the proper NW.js folder with the new downloaded versions and it should work just like that. Of course, I advise making backups, etc. (do NOT rename nw.exe to Game.exe) Have fun!

    I just updated my MZ to NW.js version 50, everything is working great. Deployed and test games run just fine. Do you guys want me to create a MZ section of this guide?

    /////////////////////////////////

    Youtube Video Version!


    /////////////////////////////////

    Upgrading your NW.js is a great way to massively improve your game performance, especially if you are using RPG Maker MV!

    NW.js (previously known as node-webkit) lets you call all Node.js modules directly from DOM and enables a new way of writing applications with all Web technologies. New way of writing native applications using web technologies: HTML5, CSS3, and WebGL. Full support for the features in the browser.

    /////////////////////////////////

    Some Explanation:

    RPG Maker MV comes default with NW.js Version 29.4

    RPG Maker MZ comes default with NW.js Version 44

    So, a great way to GREATLY improve the performance of your MV Game is to upgrade the default NW.js version 29.4 to a higher version.

    You can easily use the same steps I’m going to outline below to get MVs NW.js to virtually any version. You can choose version 50 which is the newest, but I personally chose 49.2 (Higher than MZ) because this is the latest version that all three platforms PC, MAC, and Linux support STEAM integration with Orange Green works. (I’m not covering this in this guide)

    Also please note, there might be some small quirts with the NW.js version you choose. For example, before I upgraded to 49.2 (which works flawlessly) I upgraded to 33.3 which had a small text glitch (text sometimes showed up slowly). Just keep in mind these things may happen (I tried 33.3 because I thought that’s the highest version Orange Green works could use, I was wrong, its 49.2, but I digress).

    /////////////////////////////////

    So to check what version of NW.js you are using, in the editor, when you are testing your game, press f8 (or function f8) to bring up the console.

    Type “process.versions” and press enter to see what version or Nw.js or just “nw” that you are running.

    yFWLLPtjbh2crMGtyn7ujOAfv9ZunmXKIrIrxbHafy0GWfFYby6dxSpmqGjks5gBO0RmbOQwQa8nf6zlAKzdIWBDrYF1VJkCm0FQ-6_J7TTd-aPUfhyiHQCGekhCLrmS5bSdoGIP
    (Example of when you update NW.js to 49.2 like I did!)

    /////////////////////////////////

    So now that you are all caught up with a general idea of how it works and how to check we can get to the final details of how to get this upgraded!

    Keep in mind I will provide the PC and Mac instructions, I do not have a Linux Machine however I feel the process will be very similar to either the PC or Mac version of the update (they differ slightly)

    Here we go!

    /////////////////////////////////

    1) You need to be able to locate RPG Maker MV’s Local files.

    On STEAM, just RIGHT CLICK -> Properties -> Local Files -> Browse

    Else you will have to find the application folder on your PC.

    2) You will see these two folders:

    a) nwjs-win (Windows platform)
    b) nwjs-lnx (Linux platform)
    c) nwjs-osx-unsigned (Mac platform, yes its zipped up, don’t worry about it)

    So if you want to update all 3 versions, you have to keep these folders in mind.
    (This is prob a great time to save a copy of these folders just in case you want to revert back, minus the zipped osx unsigned folder that we never touch)

    3) Most likely since you are using a PC you will also see a “test” version of this folder. This is the folder used when you are testing the game in the editor.

    So a PC user will see

    a) nwjs-win
    b) nwjs-win-test

    4) Now Download the version of NW.js that you want from the internet. This should work https://nwjs.io/downloads/
    If you want an older build (If you want to integrate STEAM functionality with Orange Green Works I recommend 49.2, you can find older versions here: https://dl.nwjs.io/ (Scroll down)

    NG8gT-OTHDGUDf2ADmpmnlmwBfUXiPX4LL1azO9WcXaz-hj4kG8NpQ6H_f5IvX_mqPwecaAlFGfj-L3et4GotfuTn8hfaydTTFzOvdP97lULpjIVBGeLhdIE9A-Yh1_DIFlzIN0a

    Get the SDK versions, minus the “symbol” listings, I would get all the 64 bit versions, so these minus the “win-ia32” version. (Or just the bottom “win-x64” version if you plan to just update the PC version, yes, the deployed and test version of rpg maker)

    5) Now that you have everything you need. Now comes the hard part! But before we get too crazy. I would suggest saving all your work. Make a copy and back it up to the cloud just in case. (even though we are just updating RPG Maker MV itself lol).

    However, do keep in mind, at least for the STEAM version, if you want to revert back to default, you will have to delete these folders (from part 2) and then just revalidate your files on STEAM (or reinstall if not on steam). This way you can go back to NW.js version 29 if you wish very easily.

    /////////////////////////////////

    The Hard Part!!!! (PC/Win Platform)

    1) Unzip the downloaded nw.js files.

    2a) Go to your “nwjs-win-test”, delete everything inside this folder (This is a great time to save copy to revert back to)

    b) Add contents of the “nwjs-sdk-v0.49.2-win-x64” folder (Copy and paste this).

    c) Now rename the “nw.exe” to “Game.exe”.

    Done!

    ///

    3a) Go to your “nwjs-win”, save the “package.json” and “www” folder (Take them out) (This is great time to save copy to revert back to).

    b) Delete everything inside this folder, and replace with the contents of the “nwjs-sdk-v0.49.2-win-x64” folder.

    c) Place the “package.json” and “www” folder back in. Now rename the “nw.exe” to “Game.exe”.

    d) Now delete the “chromedriver” file. (this is just used for the test folder)

    You are DONE!!!! Type “process.versions” into the console and check your awesome new NW.js version!

    The deployed version and the test version that you run in the editor should work beautifully! Enjoy the MUCH improved performance! (I also recommend quickly updating your pixi to 4.8.9, check bottom for directions!)

    /////////////////////////////////

    The Hard Part!!!! (Mac Platform)

    BONUS: Updating NW.js for Mac may make RPG Maker MV compatible with OSX Catalina and Big Sur! OMG!

    You have to keep in mind that to see certain folders on the Mac you have to right click files and select “Show Package Contents” in order to see the contents of a folder. You have to do this with the “RPG Maker MV” folder (Literally right click on "RPG Maker MV" in the folder and click "show package contents".)

    1) Unzip the downloaded nw.js files.

    2a) Go to your “nwjs-osx-test”, delete everything in this folder (You will NEVER touch the “nwjs-osx-unsigned.zip”) (This is a great time to save copy to revert back to)

    b) Add contents of the “nwjs-sdk-v0.49.2-osx-x64” folder (Copy and paste this).

    c) Now rename the “nwjs” to “Game”.

    d) Now delete the “chromedriver” file (this is simply not needed at all!)

    You are DONE!!!! Type “process.versions” into the console and check your awesome new NW.js version! (I also recommend quickly updating your pixi to 4.8.9, updating your pixi to 4.8.9, check bottom for directions!)

    The deployed version and the test version that you run in the editor should work beautifully! Yes there are less steps, you don’t have to do anything to the zipped ‘nwjs-osx-unsigned” folder. Yay Mac!

    UPDATE:

    Someone wrote this, said this helped!

    Okay I've figured out what I missed. In case anyone else gets stuck. Once I exported a Mac build, I needed to do the following:

    Go into the RPG Maker MV app (local files from Steam), just like the initial steps mentioned, and find...

    The "MacOS" folder - > Copy this and replace the MacOS folder in your exported Game.app (the MacOS folder only has "nwjs" inside)

    The "Frameworks" folder - Copy-paste this whole thing into your exported Game.app. (The new nwjs depends on it. It should sit in your Contents folder next to MacOS.)

    That's it! Now it runs famously. :D (This is for 0.49.2 NWJS.)

    /////////////////////////////////

    The Hard Part!!!! (Linux Platform)

    Unfortunately I do not have a Linux machine, so I cannot give a detailed breakdown of how this all works. I would imagine it is very similar to the PC version. If anyone uses a Linux machine and gets this to work, please feel free to let me know so I can update this file, thanks!

    I would imagine the process is very similar, replace the “nwjs-lnx” folder with the contents of the ““nwjs-sdk-v0.49.2-linux-x64” folder, rename the “nw” to “Game”, and delete the “chromedriver” file (this is just used for the test folder).

    /////////////////////////////////

    Known issue 1 with upgrading NW.js

    Now, some people may experience a NW.js profile error.
    (Got the explanation from here: https://steamcommunity.com/app/683760/discussions/1/2595630410189816847/#c2595630410191528351)

    Yes this error is not related to the game actually at all, so it won't impact the game. The issue runs far deeper than this game actually.

    This is due to your NW JS version having been changed at one point and then changed again after that. This is actually on your system and reinstalling/deleting the game won't fix it as the problem persists in your appdata, especially if you play multiple RPG Maker games by multiple people it may cause this if people play around with NW JS files.

    1. To fix this error click your file explorer and type in
    %LOCALAPPDATA%/ (You can also go to users/*your user name*/Appdata/Local to achieve same effect)
    1. Then go into KADOKAWA\RPGMV\User Data\Default
    2. Delete both Web Data and Web Data-journal.

      After this the NW JS gets updated when the game is ran again and the error will disappear.

    //////

    Mac instructions:

    1) Click on desktop -> Go -> hold “alt/option key” -> Library ->Application Support -> Delete the NW folder.

    2) In the “Application Support” find the “Default” folder, delete both “Web Data” and “Web Data-journal”.

    Done!

    /////////////////////////////////

    Known issue 2 with upgrading NW.js

    You will most likely see this (there are ways to suppress these, I didn't bother)

    vyVTe8UtUZC_SZJvdY914O1oeLMeIGptSxjo-FONS8yrBM113aOZ4EPxDAshgVlnMlrTTTAuPljNu1grhJ3EtyHuE8Ot2ODbzunTMhDWaVFiyjt52vmS3lHwsg2kCdXKau87KYz3

    This means virtually nothing for 99% of devs. I know it’s annoying but you can ignore it.

    They are a type of js file that helps you locate error locations in code. It has no impact on the game, it just possibly means the format isn't up to date. This doesn't impact anyone but programmers, and very little.

    /////////////////////////////////

    And that’s it, thank you very much!

    I hope I helped at least a few fellow RPG Maker MV devs out there, this should dramatically improve your games performance.

    /////////////////////////////////

    :: BONUS :: Updating PIXI
    The good news is: Updating Pixi is tons easier.
    There is a Pixi file in your game folder. JS -> Libs-> Pixi.js (Google: "download pixi js")
    Link: https://github.com/pixijs/pixi.js/releases?after=v4.4.5
    (Scroll down and download version 4.8.9)
    Just download and replace the pixi file in your JS -> Libs-> Pixi.js
    DONE!

    /////////////////////////////////

    Second Big Discovery to Dramatically improve RPG Maker Game Performance! (GPU related!)
    Dramatically Improve Game Performance for Devs and Players! (MV and MZ) (second big discovery, GPU related)

    hey there I know this thread is almost 2 years old at this point but I followed the instructions to upgrade to 49.2 and now I am unable to playtest. I am on Mac OS Big Sur and I was having issues with running playtest before so I was hoping this would help. any suggestion would be appreciated, thank you for all the helpful info so far!
  14. I am having a problem. It seems like nwjs-win-test doesn't exsist on my side. I dont really know what to do when i don't really have it ^^; i have windows version and connected to steam
  15. Can someone please explain to me why i'm getting layering issues randomly occuring during play tests? I've been searching for answers all over the place and I'm getting 0 responses.
  16. Okay damn... Either this is what it says when you have the version 29.4, or I have some awful version from 1932...

    1639840081246.png


    1639840059626.png

    Question: Have I for real been running v9.11.1 of Node.js??

    Regardless, I shall perform the update...

    @KillerGin

    Edit:
    Answered my own question:
    1639842962407.png


    Not joking, after the update, I feel like everything is so much smoother. I used to have this lag, where you could tell there was something wrong. It just felt like 20-30 FPS or something and it was jittery. But the actual FPS meters showed 60.
    That issue is now gone.

    And I also had an issue with animation loading that just caused the game to freeze for like 40-70 frames, that is also gone!

    Strongly recommend.
  17. Wow this is amazing! I always thought it was kinda eyebrow-raising/embarrassing whenever my MV game lags in the year of 2022 lol.
    I put trying this off for a while worried that I would accidentally break something but the process actually went smoothly. The playtest window even got a nice makeover with the new nwjs~

    Is the latest compatible version of nwjs with Orange Greenworks still 49.2 or can Greenworks work with newer NWjs versions currently?

    I'm guessing that the latest pixi we can use is 4.8.9 because updating to v5+ would probably cause our game to implode since MV runs on v4 haha
  18. Why is this thing not an official update? The difference is incredible, all this time I was thinking that my PC was gargabe but with this guide I'm getting now constant 60 FPS...
  19. desertbriar said:
    Is the latest compatible version of nwjs with Orange Greenworks still 49.2 or can Greenworks work with newer NWjs versions currently?

    I'm guessing that the latest pixi we can use is 4.8.9 because updating to v5+ would probably cause our game to implode since MV runs on v4 haha
    I really want to know too... By now, I'll update my game to 49.2, just in case. I hope someone can provide information about this.
  20. Hey, can anyone tell me what this means? The game itself seems to run fine, but should I be worried about this?

    1644292257316.png

    I had attempted to update my pixi.js, but reverting it to the previous version fixed this error shown below. It didn't let me open the console, or even reset the game ;w;

    Spoiler
    1644291968380.png

    TIA