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

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
528
First Language
English
Primarily Uses
N/A
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!)
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,181
Reaction score
15,544
First Language
English
Primarily Uses
RMMV
I would probably change all instructions to delete things, to back them up somewhere safe first - just in case things don't go so smoothly and they need to be put back.

I guess the alternative is to reinstall MV/MZ.
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
528
First Language
English
Primarily Uses
N/A
I would probably change all instructions to delete things, to back them up somewhere safe first - just in case things don't go so smoothly and they need to be put back.

I guess the alternative is to reinstall MV/MZ.


Ill add a reminder to back this up/save folder in case you want to revert back.

UPDATE: Awesome, I added a few reminders. ;0)
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,851
First Language
English
Primarily Uses
RMVXA
Does this improve the Editor's performance, the Game's performance, or both?

And if the game dev updates their NW.js, then packages the game (onto a standalone Windows executable or an HTML version embedded into a webpage), will that include the more recent NW.js in the package and thus automatically improve the speed for the player (who is sent the executable or visits the page), or would the player need to perform this NW.js update on their own end?
 
Last edited:

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
528
First Language
English
Primarily Uses
N/A
Does this improve the Editor's performance, the Game's performance, or both?
And if the game dev updates their NW.js, then packages the game (onto a standalone Windows executable or an HTML version embedded into a webpage), will that include the more recent NW.js in the package and thus automatically improve the speed for the player (who is sent the executable or visits the page), or would the player need to perform this NW.js update on their own end?


This should dramatically improve game performance when you run the game in both the editor and deployed versions of the game (PC, Mac, and Linux). So not the editor.

I am not 100% sure about a browser version since it just spits out the www folder. I guess it all depends on what version of nw.js your comp is set to run. The “Web Data” and “Web Data-journal” may play a role in that.

The whole point of replacing these folders is to replace the old slow MV NW.js version 29 with a much improved version.
 

SigmaSuccour

Dogmatic
Veteran
Joined
Mar 22, 2017
Messages
273
Reaction score
1,099
First Language
Urdu, English
Primarily Uses
RMMV
Thank you so much for this guide Freddie. :LZSooo:
I was wondering if the process is anything different when upgrading the NWJS for a deployed MV project on windows?
(So the project has been deployed already, with an older version of NWJS. And now I just want to upgrade NWJS for it. How would the process be?)

My reasoning: In my games, I go crazy with graphics and effects. And whenever there's a performance issue. I am forced to optimize.
I want to stick to my current NWJS, so I optimize best. And upgrade it after deploying for an overall better performance for the gamer. :LZScheeze:
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,114
Reaction score
5,851
First Language
English
Primarily Uses
RMVXA
This should dramatically improve game performance when you run the game in both the editor and deployed versions of the game (PC, Mac, and Linux). So not the editor.

I am not 100% sure about a browser version since it just spits out the www folder. I guess it all depends on what version of nw.js your comp is set to run. The “Web Data” and “Web Data-journal” may play a role in that.

The whole point of replacing these folders is to replace the old slow MV NW.js version 29 with a much improved version.
Oh, very cool - so the updated NW.js will be included in the game's executable once the game dev updates according to your instructions?
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
528
First Language
English
Primarily Uses
N/A
Oh, very cool - so the updated NW.js will be included in the game's executable once the game dev updates according to your instructions?

yes, when you deploy, the folder will now contain the updated NW.js files instead of the old ones.
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
528
First Language
English
Primarily Uses
N/A
Thank you so much for this guide Freddie. :LZSooo:
I was wondering if the process is anything different when upgrading the NWJS for a deployed MV project on windows?
(So the project has been deployed already, with an older version of NWJS. And now I just want to upgrade NWJS for it. How would the process be?)

My reasoning: In my games, I go crazy with graphics and effects. And whenever there's a performance issue. I am forced to optimize.
I want to stick to my current NWJS, so I optimize best. And upgrade it after deploying for an overall better performance for the gamer. :LZScheeze:

Once you update the NW.js using the guide, the engine will spit out the game with all the new updated NW.js files included.

So why not just create a new deployed version?

If you want to keep an old version......updating the folder should be very similar..... because the engine kinda just copies whats in the folder and places your game files in the www folder.....

So I guess you can look at all the new NW.js files as a new wrapper for your game.
 

SigmaSuccour

Dogmatic
Veteran
Joined
Mar 22, 2017
Messages
273
Reaction score
1,099
First Language
Urdu, English
Primarily Uses
RMMV
If you want to keep an old version......updating the folder should be very similar..... because the engine kinda just copies whats in the folder and places your game files in the www folder.....

Makes sense. Thank you! :LZScheeze:
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
659
Reaction score
940
First Language
German
Primarily Uses
RMMV
Holy hell, I don't know if this is just a placebo effect or something, but the game runs so smooth now!
Hopefully my happiness does not get crushed eventually by unfortunate side effects :kaomad2:

Anyways, since I made a safety backup of everything as suggested, I can just revert back to normal if anything goes wrong.

Thank you very much for this guide!
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
528
First Language
English
Primarily Uses
N/A
Holy hell, I don't know if this is just a placebo effect or something, but the game runs so smooth now!
Hopefully my happiness does not get crushed eventually by unfortunate side effects :kaomad2:

Anyways, since I made a safety backup of everything as suggested, I can just revert back to normal if anything goes wrong.

Thank you very much for this guide!

My pleasure, glad I could help.

Makes sense. Thank you! :LZScheeze:

hey, I am curious.

You made a video comparing the performance of MV and MZ.

Now, I wonder, with this update, how will MV perform? Was it just the updated NW.js all along?! Will MV perform just as well?

Let me know how it works for you.
 

zaraku

Time Keeper
Veteran
Joined
Apr 19, 2018
Messages
70
Reaction score
66
First Language
English
Primarily Uses
RMMV
Updated to 49.2 and somehow that fixed a contrast bug with my menus that's been annoying me for a while. Kudos for the guide!

Ep-tE4hVoAAOOaY.jpg
e3b0a7018174d0f60b36f576a414d3d2.png
 

SigmaSuccour

Dogmatic
Veteran
Joined
Mar 22, 2017
Messages
273
Reaction score
1,099
First Language
Urdu, English
Primarily Uses
RMMV
Now, I wonder, with this update, how will MV perform? Was it just the updated NW.js all along?! Will MV perform just as well?

I am aware of this to be true already.
Someone I know, who updated the NWJS in their MV, did not notice any performance upgrades when running their game in the MZ editor.

So I believe that's been settled. :LZSjoy:
 

TheTitan99

Veteran
Veteran
Joined
Nov 2, 2015
Messages
230
Reaction score
117
First Language
English
Primarily Uses
RMMV
Hmm... Getting a weird issue here, and I don't understand it.

When I test my game, it runs fine. When I go to Deploy it, I get a "Failed to create a distribution package" message. The weird part is... It still is creating a package, but only when I don't encrypt the game files.

So, when I deploy the game with encrypted files, it just doesn't work flat out. But, when I deploy the game without encrypted files, it says that it fails to deploy, but it actually does deploy. And now I'm worried that it's missing a file somewhere.

This is strange!
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
528
First Language
English
Primarily Uses
N/A
I am aware of this to be true already.
Someone I know, who updated the NWJS in their MV, did not notice any performance upgrades when running their game in the MZ editor.

So I believe that's been settled. :LZSjoy:

You mean....the performance is the same between MV and MZ when the NW.js is updated?

I think this would be true, why not give it a shot. It would make for a cool video. MV = MZ lol.... well minus all the mapping and plugin updates etc.

UPDATE: Ah yes, I know what you mean know, sorry I was in a bit of a rush lol.

Awesome to hear, thanks for letting me know.

MV still has a lot of life ahead of it then lol

Hmm... Getting a weird issue here, and I don't understand it.

When I test my game, it runs fine. When I go to Deploy it, I get a "Failed to create a distribution package" message. The weird part is... It still is creating a package, but only when I don't encrypt the game files.

So, when I deploy the game with encrypted files, it just doesn't work flat out. But, when I deploy the game without encrypted files, it says that it fails to deploy, but it actually does deploy. And now I'm worried that it's missing a file somewhere.

This is strange!

Usually when you get an error, it's likely because a step was missed.

Remember, updating the "nwjs-win" and the "nwjs-win-test" are different.

1) "nwjs-win" should NOT contain the "chrome Driver" and SHOULD contain the "package.json" and the "www" folder.

2) "nwjs-win-test" SHOULD contain the "chrome Driver" and SHOULD NOT contain the "package.json" and the "www" folder.
 
Last edited:

TheTitan99

Veteran
Veteran
Joined
Nov 2, 2015
Messages
230
Reaction score
117
First Language
English
Primarily Uses
RMMV
I think I got everything right. Certainly those two things are accurate. I'll probably restart the whole process to make sure.
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
528
First Language
English
Primarily Uses
N/A
I think I got everything right. Certainly those two things are accurate. I'll probably restart the whole process to make sure.

If you are still experiencing issues you could try two things.

1) Start an empty project and see if the issue persists for the new game. If not it could be a plugin issue.

2) You can choose a different NW.js version. I personally use 49.2. I use a ton of plugins, yanfly, hime, and Olivia and a lot of custom plugins and it works beautifully. I encrypt my files. You can try another version, it may work.
 

Featherbrain

Prehistoric Gamer
Veteran
Joined
Jan 12, 2020
Messages
167
Reaction score
390
First Language
English
Primarily Uses
RMMV
I thought you might be exaggerating, but... wow!

I did immediately notice the window is behaving a little differently, and my game no longer starts in full screen. I was using a call to Graphics._switchFullScreen() for that. It seems to try to start in full screen, then goes back to windowed.

Otherwise, it doesn't seem like anything else broke at all! And I haven't seen the game so stable and rock-solid at 60 fps since it was a blank project, if even then...

Question: I'm on PC, didn't have a nwjs-osx-test folder. If I deploy a MacOS version of my game, what version nwjs will it use?
 

Latest Threads

Latest Profile Posts


It's a Spanish devlog don't get scared!. (please)
Q:"Why don't you get a job?"
A: Posting statuses IS my job. It just so happens to not pay and happen periodically over the course of three months.
My new 49" monitor has been dispatched from the warehouse. Will it arrive tomorrow? The day after? I love that we can track packages now, even if it does only tell me when it's left that end and when it's arrived at the local centre. As long as it doesn't end up in Melbourne again, which has happened before ...
My friend's doing a surprise stream of my game Origin Hunt on Twitch here ! Feel free to stop by :yhappy:

Forum statistics

Threads
117,236
Messages
1,105,753
Members
153,397
Latest member
Westernnimbus
Top