Dramatically Improve Game Performance for Devs and Players! (MV and MZ) (second big discovery, GPU related)

Oir

Veteran
Veteran
Joined
Dec 19, 2020
Messages
104
Reaction score
47
First Language
English
Primarily Uses
RMMV
Apologies if I'm misunderstanding. Is this a setting that a player tweaks on their own computer in order to run the game better? Or is this a setting that the dev makes to the game which forces any player's computer to use the better GPU?
 

KillerGin

Freddie
Veteran
Joined
Dec 18, 2015
Messages
569
Reaction score
544
First Language
English
Primarily Uses
N/A
Apologies if I'm misunderstanding. Is this a setting that a player tweaks on their own computer in order to run the game better? Or is this a setting that the dev makes to the game which forces any player's computer to use the better GPU?

This is a setting the player, or Dev, tweaks on their own computer.

I also ask at the end, if the Engine Devs can fix this....
 
  • Like
Reactions: Oir

Arthran

Veteran
Veteran
Joined
Jun 25, 2021
Messages
860
Reaction score
1,060
First Language
English
Primarily Uses
RMMZ
I also ask at the end, if the Engine Devs can fix this....

I don't think that this is necessarily something that the Engine devs have control over. "Game.exe" is actually just "nw.exe" (nwjs) renamed, which is basically a modified version of the Chromium web browser. So your system is treating it like it's a web browser, instead of like it's a game.

I think the issue is actually either a Chromium thing, or an Nvidia thing. However, in the game folder, there is a file called "package.json", which allows you to specify particular flags that you want it to run chromium with. Perhaps there is a flag that will force it to run on the dedicated GPU. If so, then devs can add that flag into the file before they distribute their games, and then end users don't have to change any settings on their side. But I didn't really dig into that, since I don't have an integrated GPU and am unable to test any of this stuff anyway.

BTW, you can actually test to see which GPU RPG Maker games are using on your system. If you go into any RM game directory and open the package.json file that I mentioned, and find the line that says:

"main": "index.html",

and then change it to:

"main": "chrome://gpu",

Then run Game.exe it will give you a report about the various graphics settings that it is using. If you look for a line that says "GL_Renderer" then you can see which GPU it would have tried to use. Of course, you'll want to change the package.json file back to normal once you're done.
 
Last edited:

DanielTsc

Villager
Member
Joined
Jul 20, 2020
Messages
18
Reaction score
10
First Language
English
Primarily Uses
RMMZ
I thought I was the only one having this issue on RPG Maker MZ with integrated GPU on my laptop.

If I run my game using only vanilla RPG Maker MZ, my game runs fine on 60 FPS.

But if I use Visustella's Battle Core Plugin, the battles drop down to 40 FPS, even if I disable most of it's features.

The game only runs smoothly if I use my dedicated GPU. How am I supposed to launch commercially such a simple game made on this simple 2D engine if it needs a good GPU to work properly?

I am really disappointed with RPG Maker, for real :/
 

Arthran

Veteran
Veteran
Joined
Jun 25, 2021
Messages
860
Reaction score
1,060
First Language
English
Primarily Uses
RMMZ
But if I use Visustella's Battle Core Plugin, the battles drop down to 40 FPS, even if I disable most of it's features.
...
I am really disappointed with RPG Maker, for real :/

RPG Maker isn't really responsible for the impact that 3rd party plugins are having on your game. You should probably be directing your complaints to VisuStella, instead of RPG Maker as a whole. VisuStella plugins consume more resources than they actually need to, because they overwrite large chunks of your engine with obfuscated code, which requires constant additional, superfluous function calls and memory operations in order to deobfuscate at run time. Disabling features in the plugin doesn't actually stop it from continually executing that extra code, even for the features that you aren't using.

How am I supposed to launch commercially such a simple game made on this simple 2D engine if it needs a good GPU to work properly?
Most people who buy games do have dedicated video cards. Integrated GPUs aren't for gaming, and most people who are using an integrated GPU are aware of that.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
7,546
Reaction score
5,311
First Language
English
Primarily Uses
RMMV
The game only runs smoothly if I use my dedicated GPU. How am I supposed to launch commercially such a simple game made on this simple 2D engine if it needs a good GPU to work properly?
It's not such simple 2D - the Effekseer particle animations need a GPU to work with. As far as marketing it...this was already said by Arthran, but who exactly do you think your market is? Are there secret gamers who want to buy games but only have trash computers? :stickytongue:

Anyone using Steam or Itch who has actually played something on their computer knows you need a dedicated graphics card. I suppose there are probably some people who just buy whatever cheapest PC from a store and download this Steam thing they heard about, but beyond that this is all pretty common knowledge.
 

DanielTsc

Villager
Member
Joined
Jul 20, 2020
Messages
18
Reaction score
10
First Language
English
Primarily Uses
RMMZ
RPG Maker isn't really responsible for the impact that 3rd party plugins are having on your game. You should probably be directing your complaints to VisuStella, instead of RPG Maker as a whole. VisuStella plugins consume more resources than they actually need to, because they overwrite large chunks of your engine with obfuscated code, which requires constant additional, superfluous function calls and memory operations in order to deobfuscate at run time. Disabling features in the plugin doesn't actually stop it from continually executing that extra code, even for the features that you aren't using.


Most people who buy games do have dedicated video cards. Integrated GPUs aren't for gaming, and most people who are using an integrated GPU are aware of that.

You are absolutely right. I shouldn't have directed my complaint towards RPG Maker, as it is not an issue from it.

But, anyway, the newest versions of Visustella are fine now. They have improved a lot their perfomance and the game is running smoothly even with weak GPUs.

But it does feel sad that basic stuff like animated enemies still need a plugin to work...
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,706
Reaction score
469
First Language
Portuguese
Primarily Uses
RMMV
Sorry for the Necro, but I think it would be a relevant update.

The solution on the first page never stuck me as a proper one. After all it needs the player to make changes on their side to fix this.

So, knowing what was the issue, I looked online for the causes and possible solutions.

The cause is not rpg maker or nw.js... exactly.
It is that nw.js is chromium-based. Just like google chrome, and more recent browsers like microsoft edge and opera gx.
For security reasons they are made to go for the integrated gpu by default.

Finding this out, I looked for some solutions.
One was substituting nw.js in my project for electrum or something like that. Testing would be needed though.

The easier solution on the developer's side is... changing the game's package.json so nw.js tells your computer to ignore it for this time.

Now, I'm no specialist in it, but it seemed to work for me.

For MV, you add a line to it among the ones there (I myself put it right under js-flags):
Code:
"chromium-args": "--ignore-gpu-blacklist --ignore-gpu-blocklist",
and it should work just fine.

For MZ, however, there is an issue.
Thanks to it having the option to set the game's resolution, it changes its settings on package.json... meaning it overwrites any changes to it. You would need to make the change by hand after saving but before any testing.
Regardless...
As MZ's package.json already has a "chromium-args" line, you need to change it from
Code:
"chromium-args": "--force-color-profile=srgb",
to
Code:
"chromium-args": "--force-color-profile=srgb --ignore-gpu-blacklist --ignore-gpu-blocklist",
 
Last edited:

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
91
Reaction score
25
First Language
german
Primarily Uses
RMMV
Intel cpus (i5, i6, i7) are usually used for pcs and do not contain an integrated gpu.
Laptops usually use amd cpus which do contain an integrated gpu.
Also Laptops usually dont use their main gpu if the charging cable is not plugged in.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,706
Reaction score
469
First Language
Portuguese
Primarily Uses
RMMV
Intel cpus (i5, i6, i7) are usually used for pcs and do not contain an integrated gpu.
Laptops usually use amd cpus which do contain an integrated gpu.
Also Laptops usually dont use their main gpu if the charging cable is not plugged in.
Well, I do admit that I use a laptop, so this may not be relevant to a stationary pc.

But unfortunately, while most of the time they do indeed use the dedicated gpu instead of the integrated one if they are on a charging cable, there is one exception.
And a big one, considering its relevancy to this forum, not just this thread.

Chromium-based programs.
They use the integrated gpu instead of the dedicated one for chromium-based programs.
And not just browsers, like google chrome, opera and microsoft edge.

Nw.js, which rpg maker games use to run on the computer without a browser, is chromium-based.
Unless the package.json is changed to give it an excemption, most laptops will use the integrated gpu for it instead of the dedicated one.

Which is what my post above is about. Well, on my tests it seemed to work at least.
Too bad MZ overwrites it whenever you save your project, resulting into you needing to re-do that all the time.
But at least... it seemed to work when I tested it.
 

Pasteleptic

Costan's Sin
Veteran
Joined
Oct 4, 2014
Messages
47
Reaction score
73
First Language
English
Primarily Uses
RMMZ
As MZ's package.json already has a "chromium-args" line, you need to change it from
Code:
"chromium-args": "--force-color-profile=srgb",
to
Code:
"chromium-args": "--ignore-gpu-blacklist --ignore-gpu-blocklist",
Not to be nitpicky, but keeping the SRGB line is important, at least, I think anyway. According to the official command line switches, only ignore-gpu-blocklist is used, so it'd probably be better to do this:
Code:
"chromium-args": "--force-color-profile=srgb --ignore-gpu-blocklist",
Then again, I'm testing with 68.1, so it may be different for other versions.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,706
Reaction score
469
First Language
Portuguese
Primarily Uses
RMMV
Not to be nitpicky, but keeping the SRGB line is important, at least, I think anyway. According to the official command line switches, only ignore-gpu-blocklist is used, so it'd probably be better to do this:
Code:
"chromium-args": "--force-color-profile=srgb --ignore-gpu-blocklist",
Then again, I'm testing with 68.1, so it may be different for other versions.
Ops, you are right.

It's just that I copied the quote from the MV code and forgot to re-add the part that was already on the MZ one.

I'll edit there to fix this. Thanks
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm really sorry I haven't done any streams. I actually just got home from the hospital after a week and a half.
I'm not dead - I promise :stickytongue:

Anyway, some pokemon inspired art (dont ask me which one tho xD)
reali.png
Writing boss music for Pale Coins. This is the Goblin Mage's theme!

Caz
I've been trying to upload more video tutorials for RMMZ lately! Does anyone have a topic they'd like to see covered? :ehappy:

Forum statistics

Threads
129,716
Messages
1,204,585
Members
170,788
Latest member
Shinsly
Top