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

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
563
Reaction score
519
First Language
English
Primarily Uses
N/A
Hey, thanks for the suggestion. I tried replacing SceneManager.exit(); with SceneManager.terminate(); but unfortunately it's providing the same result... everything fades to black, window goes from fullscreen to windowed, but never closes the actual game window.

Ah, well, I actually use "SceneManager.terminate();" in a small plugin I wrote that is tied to the menus and it works, even though I am using 49.2 I think it would work for you as well.

Here is a small part of it:

"Scene_GameEnd.prototype.exitCommand = function(){
SceneManager.terminate();
}; "
 

Ace of Spades

Veteran
Veteran
Joined
Jan 19, 2017
Messages
162
Reaction score
238
First Language
English
Primarily Uses
Ah, well, I actually use "SceneManager.terminate();" in a small plugin I wrote that is tied to the menus and it works, even though I am using 49.2 I think it would work for you as well.

Here is a small part of it:

"Scene_GameEnd.prototype.exitCommand = function(){
SceneManager.terminate();
}; "
Yeah, that's pretty much the same function I'm using. I even tried to revert back to 49.2 to see if it'd work and it was still giving me the same issue.

After thinking it through, I tried to deploy the project to see if that would work. Turns out this bug only occurs when test-playing from RMMV. I was able to revert back to v 0.51.0 and the bug did not occur after I tried to deploy the project, which was a huge relief. As long as the bug doesn't occur in the final build of the game, I'm perfectly okay with manually closing the game window during test play.

Thanks so much for your time and efforts, it's greatly appreciated!
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,602
Reaction score
3,837
First Language
Java's Crypt
Primarily Uses
RMMZ
Code:
  if (Utils.isNwjs()) {
    require('nw.gui').Window.get().close();
  } else {
    SceneManager.terminate();
  }
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
563
Reaction score
519
First Language
English
Primarily Uses
N/A
Yeah, that's pretty much the same function I'm using. I even tried to revert back to 49.2 to see if it'd work and it was still giving me the same issue.

After thinking it through, I tried to deploy the project to see if that would work. Turns out this bug only occurs when test-playing from RMMV. I was able to revert back to v 0.51.0 and the bug did not occur after I tried to deploy the project, which was a huge relief. As long as the bug doesn't occur in the final build of the game, I'm perfectly okay with manually closing the game window during test play.

Thanks so much for your time and efforts, it's greatly appreciated!

Hey, as long as it works for the deployed version, thats what matters, yay!
 

TenTranVN

Veteran
Veteran
Joined
Apr 13, 2017
Messages
175
Reaction score
19
First Language
Vietnam
Primarily Uses
RMMV
Does it improve performance better when manufactured to mobile?
 

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
15
Reaction score
3
First Language
Islandic
Primarily Uses
RMMV
I guess I only need to update PC windows folders and deploying to mac/linux it'll use windows new nw.js?

P.S With the most recent version nw.js v0.51.2 I get multiple bugs/errors. One-time parallax map was all black throughout the saves (parallax failed to load for all saves).
My custom save/load menu was stuck had to close the game and overall doesn't look stable (a couple of errors etc.)
+issue with not closing properly for "test" build (delayed closes properly).
+in game's/project folder file "package.json" don't forget to add
"position":"center"
just before fullscreen to properly position your game.

Will try v0.49.2, I hope it's more stable.

P.S.S and unfortunately getting this randomly. I think this happens when showing pictures.
I have Pixi updated to 4.8.9 in my project. First time seeing this error, probably 99,9% caused by new nw.js.

Screenshot_8.png

P.S.S.S
Upon further testing, I found updating nw.js to be very unstable. I get many black screens. Sometimes battles start with a black screen while audio still playing, sometimes opening F8 will make the game screen black. This could happen only in the editor as I haven't tested deployed projects and this can be caused by many plugins I use (it's a complex project with over 250 plugins+compatibility fixes).
I'd love some extra performance, but this seems very unreliable.

P.S.S.S.S
Using nwjs-sdk-v0.44.6-win-x32 (because I want to support even old x32 platforms and the difference between x32 vs x64 seems non-existent) seems to be stable, but needs more testing. So far no black screens or errors. And the Editor test game window closes properly now.
I Will update about stability within a week and further testing, but it seems working fine.
 
Last edited:

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
563
Reaction score
519
First Language
English
Primarily Uses
N/A
I guess I only need to update PC windows folders and deploying to mac/linux it'll use windows new nw.js?

P.S With the most recent version nw.js v0.51.2 I get multiple bugs/errors. One-time parallax map was all black throughout the saves (parallax failed to load for all saves).
My custom save/load menu was stuck had to close the game and overall doesn't look stable (a couple of errors etc.)
+issue with not closing properly for "test" build (delayed closes properly).
+in game's/project folder file "package.json" don't forget to add
"position":"center"
just before fullscreen to properly position your game.

Will try v0.49.2, I hope it's more stable.

P.S.S and unfortunately getting this randomly. I think this happens when showing pictures.
I have Pixi updated to 4.8.9 in my project. First time seeing this error, probably 99,9% caused by new nw.js.

View attachment 180791

P.S.S.S
Upon further testing, I found updating nw.js to be very unstable. I get many black screens. Sometimes battles start with a black screen while audio still playing, sometimes opening F8 will make the game screen black. This could happen only in the editor as I haven't tested deployed projects and this can be caused by many plugins I use (it's a complex project with over 250 plugins+compatibility fixes).
I'd love some extra performance, but this seems very unreliable.

P.S.S.S.S
Using nwjs-sdk-v0.44.6-win-x32 (because I want to support even old x32 platforms and the difference between x32 vs x64 seems non-existent) seems to be stable, but needs more testing. So far no black screens or errors. And the Editor test game window closes properly now.
I Will update about stability within a week and further testing, but it seems working fine.

Lol, Well, im glad its slowly coming together. Depending on your plugins etc, there may be a conflict somewhere.

Anyways, awesome.
 

Vis_Mage

Wisp Charmer
Veteran
Joined
Jul 28, 2013
Messages
691
Reaction score
226
First Language
English
Primarily Uses
RMMV
Quick question, ever since I went through these steps to upgrade my project (Windows, to 49.2), when I playtest my game, the playtest window always opens at the top-left corner of my screen, instead of the center like it had before. Is there any way to fix this?
 

Ronove

♫꒰・‿・๑꒱
Veteran
Joined
Mar 12, 2012
Messages
1,083
Reaction score
374
First Language
English
Primarily Uses
RMMV
Quick question, ever since I went through these steps to upgrade my project (Windows, to 49.2), when I playtest my game, the playtest window always opens at the top-left corner of my screen, instead of the center like it had before. Is there any way to fix this?

It's mentioned in this post in the thread.
 

sirnameless

Warper
Member
Joined
Jun 3, 2014
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Thank you so much for this guide. It's helped a lot.

For my Mac deployment, though... it appears as if NWJS is not updated there? When playtesting, it does not crash, and I don't see the "Your profile can not be used because it is from a newer version of NW.js" error. After I deploy, I see that annoying error, and the game crashes a whole bunch again (because the old version of NWJS is useless on MacOS).

I've updated the nwjs-osx-test folder with version 0.49.2 NWJS. I didn't touch nwjs-osx-unsigned.zip. What could I be missing? Does Mac deployment work perfectly for everyone else? (I am deploying from a Mac, fwiw).
 

hernieren

Villager
Member
Joined
Jan 20, 2020
Messages
24
Reaction score
6
First Language
Spanish
Primarily Uses
RMMV
I'm using MV on PC. I updated NW to 54.1 (only the win and win-test folders) and Pixi to 4.8.9. I haven't noticed any improvement in performance and suddenly my game has no sound... Maybe I need an older version for MV?
 

Latest Threads

Latest Posts

Latest Profile Posts

I've decided to try and be more social and less nervous about engaging. I'm always over thinking things - from now on when I'm worried or don't get something I'll just ask.
Sometimes a mechanic that is meant to add challenge is just annoying. Even the Final Fantasy games did not completely escape this pitfall of design. (FF8 draw system I'm looking at you - grrrr)
starting working on the sprites for one of my games major antagonists finally. here's the first frame of his chanting motion in battle.
Have spent too much time hammering out with a friend just how to make a reoccurring enemy that permanently learns skills you use against her.
I know what I want in a loose sense. Maybe I should just make a post asking for opinions and suggestions.

Forum statistics

Threads
113,737
Messages
1,077,067
Members
147,762
Latest member
Bad_At_Scripting
Top