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
539
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
610
Reaction score
606
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
610
Reaction score
606
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
5,485
Reaction score
3,561
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,680
Reaction score
458
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
69
Reaction score
20
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,680
Reaction score
458
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
46
Reaction score
69
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,680
Reaction score
458
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

DamageEvil_1.png added!
index.php

I have a very strong feeling my internet will be hurricane'd, forcing me to work exclusively on my projects. Wish me luck y'all.
Figured I should probably put my badly written RMMV plugins on GitHub or something, idk.
I've been working on plugins to make it easier to incorporate Persona 3's Once More batsys into MV games. One makes it so you can have states automatically applied to the target and/or user when their hit crits or targets a weakness... I could use testers for it, though. Maybe I'll make a thread in the JS Plugins In Development board about it?
Whenever I'm feeling down I like to watch Bardic Inspiration by Deerstalker Pictures
on youtube. Because 'my mockery is Vicious.' It's funny and catchy like the flu.

Forum statistics

Threads
125,617
Messages
1,172,297
Members
164,723
Latest member
Jobiia
Top