Need some help solving performance issues

Hey folks,

I am working on a commercial game which has all of its core systems implemented. Before I dive too much further into development, I want to get the performance sorted out, as I am sure it will only decrease as I add more to the game.

An issue I am having is that the frame rate drops between 60-48-ish periodically, and is never really stable except when I am on very small maps. This normally wouldn't be an issue, however RPG maker games seem to noticeably slow down for a moment when this happens (as opposed to skipping frames) which is causing the game to feel stuttery even on high end devices.

I have tested my game on Steam Deck and an old Macbook Air (4GB RAM, i5, built-in 1500mb graphics) and it runs around a passable 30 fps on the deck with many settings tweaks and an unplayable 20-30 fps on the macbook. Again, this wouldn't be an issue if it was frame skipping but it is more of a sluggish slow-mo thing going on.

For an RPG Maker game, this seems like awful performance. I am building this on a high-end PC, so it is hard to notice these issues as I develop the game.

I am hoping that anyone interested can try my game or load my project to see if you can figure out why this performance is so poor. I am running quite a few plugins, however this is necessary for my game and far from the first time it has been done so I am not sure if that is the only potential issue.

Some things to note:
  • I am using parallax mapping, but since my game is only 16x16 the image sizes for my map layers are pretty small compared to a usual 48x48 game
  • I do not have any continuous parallel events that run on any maps. Any parallel events (common or in map events) that trigger are set to do their thing once on with certain triggers and then terminate by changing switches etc..
  • Disabling most or all of my plugins does help, but it doesn't seem to matter which ones, as I have tried many combinations. Disabling all only improves things on the lower-end devices slightly (from 30 to 40 fps).
  • Nearly all of the events on my maps are just "show text on interact" sorts.
You can get the game demo HERE (Windows)
And the project files HERE
(Note: the game is not very functional, just run around and see what happens. The issues are mainly in just running around the map. Moving all the way right in town and stepping on the orange square will bring you to another map).

If you give it a shot, please let me know any thoughts you have, even if it is just how well (or not) it runs for you in general. Any suggestions would be much appreciated.

I am hoping to see if this is all just me being overly critical or if I have some big problems to sort out before I move forward, as I am intending for this to be a commercial project at some point.

Thanks!

Edit: Updated the download links, as I had the Mac version here by mistake
I can't try it out right now exactly but have you tried updating NWJS? It does increase performance massively when done. Although there is a very small chance some plugins break.
I can't try it out right now exactly but have you tried updating NWJS? It does increase performance massively when done. Although there is a very small chance some plugins break.
Yes, I have done this. I am on the newest version that is SteamDeck compatible. Updating it didn't have any noticeable effect for me unfortunately.
Ok, i'll do an effort to help with testing. I'll edit this post after i'm done.
Since turning off all the plugins didn't improve much it's probably not that. Parallax mapping will hurt frame rate. So will any pathfinding or lighting effects so you may want to check that.

Go through all your parallel events and add a wait of at least one frame at the end. The less often it needs to be checked the more you can increase the wait.
Yep, it seems to be parallax & parallel events so far.

Edit: I've disabled all Filter plugins & Fogs and i've managed to reach 60 fps stable, even moving.
Disabling
  • hw_Filters
  • VisuMZ_Lighting
  • VisuMZ_HorrorEffects
  • VisuMZ_AmbienceSounds
  • pixi-filters
  • GabeMZ_Fog
  • Zoom
Seems to help the framerate to be at constant 60 fps, might need deeper testing.
Yep, it seems to be parallax & parallel events so far.

Edit: I've disabled all Filter plugins & Fogs and i've managed to reach 60 fps stable, even moving.
This got me thinking, and I went and switched nwjs from the latest SteamDeck version to a slightly older one (but still much newer than the default), and this does seem to have improved things a bit! (at least on my high-end PC)

I'll need to test it on the other devices still, but this seems to be helpful so far.

Since turning off all the plugins didn't improve much it's probably not that. Parallax mapping will hurt frame rate. So will any pathfinding or lighting effects so you may want to check that.

Go through all your parallel events and add a wait of at least one frame at the end. The less often it needs to be checked the more you can increase the wait.

The very few parallel processes are More or Less (something triggers a switch, this triggers the common event, and at The End of said event, it turns off the switch so it ends). I can tried adding more "wait" commands, but since the are all one-and-done events and not triggering often (like one every 10 IRL mins) it doesn't seem to have changed anything. This does sound like good best-practices advice in general though.
This got me thinking, and I went and switched nwjs from the latest SteamDeck version to a slightly older one (but still much newer than the default), and this does seem to have improved things a bit! (at least on my high-end PC)

I'll need to test it on the other devices still, but this seems to be helpful so far.
Newer doesn't always equate stable, there seems to be some issues with newer versions, try to stick with one until a much more stable drops. I've used 72 & 82 and i've gotten no performance issues, though, needs to be said, i'm not doing a graphically heavy game (the heaviest thing is the battle system but it's on MV and it isn't that heavy at all)
Visu plugins are known to cause performance issues. Especially Weather and lighting. You'll have to use those things very carefully and in moderation.
Newer doesn't always equate stable, there seems to be some issues with newer versions, try to stick with one until a much more stable drops. I've used 72 & 82 and i've gotten no performance issues, though, needs to be said, i'm not doing a graphically heavy game (the heaviest thing is the battle system but it's on MV and it isn't that heavy at all)
I was on 72 before your comment, but dropping to 69 seems to be the sweet spot for my game, for some reason haha. Good ol' jank.
What version were you using before dropping to 69?
Edit: Blind, i saw that you were on 72, 82 is a good version though.
What version were you using before dropping to 69?
Edit: Blind, i saw that you were on 72, 82 is a good version though.
82 seems to be incompatible with SteamDeck, hence going lower in the first place.

While the framerate is improved on my main windows PC, the macbook performance is still an abysmal 20 fps even with the update (and both the Win and OSX nwjs were updated). Seems there are still more issues.

Visu plugins are known to cause performance issues. Especially Weather and lighting. You'll have to use those things very carefully and in moderation.

I have tried disabling the lighting plugin, but nothing seems to change. It is used very sparingly (maybe 5 lights on a map with a day/night cycle overlay). These issues have been around since before this was added.

There is a weather plugin, which I will try disabling along with the lights again to see if there is any change on the other devices.
Have you modified anything in the base code? Although very unlikely, it's possible that something is causing damages from there.
Have you modified anything in the base code? Although very unlikely, it's possible that something is causing damages from there.

No, nothing in the base code. I have changed some small display things (damage popup font, status display max icon count) as plugins but that's it.

Visu plugins are known to cause performance issues. Especially Weather and lighting. You'll have to use those things very carefully and in moderation.

I've just tried disabling lighting/weather but there was no effect unfortunately.
At least from my side, i'll try and do a deeper test to see what i can find, i can't guarantee anything.
At least from my side, i'll try and do a deeper test to see what i can find, i can't guarantee anything.

Awesome, thanks for the help!

FYI, the project and game files were just updated as I had a few errors to fix and the mac version by mistake. All good now.
Where's my copy-pasta!?!
RPG Maker is a single-core/single-threaded, 32 bit application that woefully under utilizes the GPU.
Doesn't matter how much ram or how many cores/threads you're super CPU has as the application cannot take advantage of that. Everything is running on a single thread, so things can quickly bottleneck.
Unless specifically programmed to take advantage of the GPU (which may also require adjustments to PIXI), lighting effects are rendered in software. Basically all of your plugins and events are running on that single thread.
Which is why you need to use wait frames on parallel events.

VS can really tank FPS too if you are not careful due to the way they are programmed, making very basic script calls make multiple unnecessary script calls just to "decode" the function.

Parallax doesn't tank frame rate that much, actually. It takes RAM, and may cause stutters when loading a new map but for the time being I would say avoid troubleshooting parallax. I would investigate parallel events and how they have been programmed.
I can't try it out right now exactly but have you tried updating NWJS? It does increase performance massively when done.
That's only true for MV users. MZ ships with a newer version of NW.js than MV does, and upgrading it doesn't really seem to improve performance notably.
RPG Maker is a single-core/single-threaded, 32 bit application...
This is also only true for MV. As I was educated yesterday, MZ is 64-bit.
As I was educated yesterday, MZ is 64-bit.
You learn something new everday. Well nice to have Arthran here since it was his benchmarks that actually most of my data on cpu performance came from and that benchmark was built in MZ. So other than the application actually being 64 bit, everything else remains true.

Fact it was funny and fascinating to me that Arthran's 2013 CPU beat my 2018 CPU with 8 cores/16 threads simply because Arthran's CPU is clocked faster than mine. RM prefers clock cycles, not threads.

Original thread: https://forums.rpgmakerweb.com/threads/need-some-help-solving-performance-issues.163589/