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

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
558
Reaction score
510
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
160
Reaction score
221
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,599
Reaction score
3,828
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
558
Reaction score
510
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
172
Reaction score
18
First Language
Vietnam
Primarily Uses
RMMV
Does it improve performance better when manufactured to mobile?
 

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
11
Reaction score
2
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
558
Reaction score
510
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Making test maps is really illuminating when it comes to figuring out how the real maps should be. It's like the outline that one writes for the story before writing the actual story.
I am adamant about not having missable quests, which means having to write entirely new scenes at each plot progression that takes into account that time and events have passed since the quest could first be accepted while still having there be a quest to solve in the first place. It's worth every second.
Surprisingly useful and thought provoking
Working on animation. Trying to see if I can apply it meaningfully to my games!

Forum statistics

Threads
110,380
Messages
1,052,832
Members
143,425
Latest member
AstarothPenguin
Top