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

MelonMintGames

Villager
Member
Joined
Jul 10, 2020
Messages
18
Reaction score
4
First Language
English
Primarily Uses
RMMV
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?
 

MorsVictrix

Veteran
Veteran
Joined
Jun 25, 2017
Messages
39
Reaction score
5
First Language
Slovenian
Primarily Uses
RMMV
What would be a downside to just upgrading to the latest 64x version? Why would you be downgrading it?
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
998
Reaction score
461
First Language
english
Primarily Uses
RMMV
might have a plugin that isnt getting updated anymore and not compatible with newer version
 

thatljguy

Warper
Member
Joined
Sep 15, 2021
Messages
1
Reaction score
0
First Language
Taishanese
Primarily Uses
RMMV
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?
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
609
Reaction score
396
First Language
English
Primarily Uses
RMMV
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.
 

MorsVictrix

Veteran
Veteran
Joined
Jun 25, 2017
Messages
39
Reaction score
5
First Language
Slovenian
Primarily Uses
RMMV
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...
 

WCouillard

Veteran
Veteran
Joined
Nov 24, 2013
Messages
77
Reaction score
21
First Language
English
Primarily Uses
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.
 
Last edited:

MorsVictrix

Veteran
Veteran
Joined
Jun 25, 2017
Messages
39
Reaction score
5
First Language
Slovenian
Primarily Uses
RMMV
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. :/
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,308
Reaction score
1,936
First Language
English
Primarily Uses
RMMV
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
 
Last edited:

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
609
Reaction score
396
First Language
English
Primarily Uses
RMMV
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.
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,308
Reaction score
1,936
First Language
English
Primarily Uses
RMMV
@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?
 
Joined
Aug 24, 2019
Messages
2
Reaction score
1
First Language
English
Primarily Uses
RMMV
[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!
 

Attachments

  • Screenshot (39).png
    Screenshot (39).png
    1.5 MB · Views: 5
Last edited:

wulven

Warper
Member
Joined
Nov 24, 2021
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
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!)
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!
 

Noova_art

Villager
Member
Joined
Nov 27, 2019
Messages
6
Reaction score
3
First Language
Norwegian
Primarily Uses
RMMV
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
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,236
Reaction score
285
First Language
English
Primarily Uses
N/A
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.
 

Attachments

  • huh.png
    huh.png
    163 KB · Views: 2

Latest Threads

Latest Profile Posts

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:
Me, designing it a long time ago: Having an optional boss fight as a random chance to trigger when you fish in a certain spot with a certain type of bait is fun! Cool idea!
Me, trying to playtest everything again: oh god just let me see the boss, my bag is so full of fish!
both love and pain have no boundaries

Forum statistics

Threads
117,229
Messages
1,105,688
Members
153,384
Latest member
mfilez
Top