What should be avoided in order to have a game with good performance

Hi!
i'm new to RPG maker, and my worst nightmare would be doing something that would cause such issues down the line. Any advice?
Too many parallel events running at once. Stuff like pathfinding and lighting are processor intensive too and can make your game lag.
If you need a LOT of Events for a certain reason, you should only call for them when a certain variable reaches a number or a certain switch has been activated, Self-Switches inside Events help to turn them On or Off.
There are a large number of factors to consider.
Problems that will show up more quickly than others has already been mentioned:
Parallel events. Using wait frames will reduce the number of times (and therefore the amount of processing) needed to do an event. Always use at a minimum 1 wait frame, but depending on the "priority" of the event, longer wait frames can reduce the overhead.

Smart use of events is something else to keep in mind. Does it need to be a parallel event? Or could you maybe smartly put the operation into a common event and only run the common event every turn/every map change? You can also intelligently funnel the player into choke points on the map and have the common event run on player touch (or maybe it doesn't even need to be a common event)

Other things to keep in mind of how minor errors and performance problems could build up slowly over time. You should keep track of what plugins you have installed, because performance problems may not be immediately apparent, but after 20 hours of development time, suddenly you are getting 1 less fps. 200 hours later, suddenly that 1 fps drop is now 10 fps slower.
When it comes to plugins, it's always been to chose small plugins that do exactly what you need, rather than "super plugins" that have 100s of functions but you only need to use 1 small part.
Avoid obfuscated plugins where possible (not very much possible on MZ..) as the obfuscation methods often employed by plugin devs require sometimes 5 - 10x more calls just to execute a single line of code than non-obfuscated plugins. Obviously having to do 5 times more work to do 1 thing is going to perform worse.

Keep in mind that performance on RPG Maker is limited to the engine, often not necessarily a hardware issue.
The games are 32bit. This means they are limited to a maximum utilization of 4gb of RAM. Even if you computer has more than 4gb, the engine cannot take advantage of that.
The engine is a single core/single threaded operation. Everything it calculates is being processed on the same thread which means bottle necks in processing can happen quickly (which is why we use wait frames in parallel processes). Even if you have a 16 core, 32 thread CPU, that doesn't matter to the engine. What does matter to the engine is clock speed - which - side tangent - is funny, because that falls right in line with the archaic design choices of the engine itself, considering during the early 00's, CPU's and gaming were more betting on higher clock speeds instead of more cores in future computer hardware architecture. [snipped long tangent about wishing the cpu/thread count war ended and focused on clock speed again]
Finally, the engine woefully under-utilizes the GPU. MZ uses the GPU slightly more than MV, but both do not utilize the GPU enough. A lot of lighting effect plugins will be software rendered within the CPU. So even if you went bankrupt buying a case large enough and a power supply big enough to support that phatass RTX4090, it's not going to improve the performance of an RM game much at all.
@LordZetta To add onto what @AquaEcho said: Parallel events are running every second, so if you don't have any wait frames in them to stop them from doing that, it lags the game to increasingly unplayable levels the more you have.

Even something as small as 15 frames (less than half of a second) can help remove this issue entirely.

Source: I have multiple parallel events running but they have wait frames, so they're not an issue.

... Also, you should refrain from going crazy with lighting effects, since I've experienced a lag spike or two when using a plugin that lets me use "god-ray" (aka. light coming in from the top) effects.
I've experienced a lag spike or two when using a plugin that lets me use "god-ray"
I think I know which plugin you are talking about, and that one is a double whammy; obfuscated and lighting that is CPU bound.
There are many things to consider, but you can also upgrade much of it. You can totally make your games 64bit with the right knowhow/tools. Properly utilizing a preloader can help run things smoothly in the long run as well. Upgrading your nw.js is essential especially on MV. Upgrading pixi.js can help immensely as well.

As the others have said tho, it is important to event smartly, and parallel events are the most obvious performance killers. Massive map sizes and a huge number of events can also impact performance.

Misshandling plugins is another. From incompatibilities to just poor usage, plugins can absolutely slow down your game if not handled well.

I think those are the most common issues one could face... Overall I'd say you'll just have to figure out what exactly is causing the performance drops and work around fixing them whenever they happen.
Not seeing it listed here, but it's worth noting: Parallax maps, especially large ones, can cause a number of issues.
general rule of thumb is don't to too much at once, with anything, be it plugins, events, images, effects.
Screen size and plugins would also affect performance and hardware requirement.

For example, just by installing Yanfly core update 1.6.1 plugin to the dragonbone demonstration mv demo would make the gpu usage raise by 15%~20% if using a 3060m laptop.
Try to stay away from engines that use javascript, like RPG Maker MV or MZ
You can speed up your game by using a game engine that in any way takes advantage of your computers resources, instead of running single threaded in a web browser, such as godot, or even gamemaker
Hope this helps! 😀
Hope this helps! 😀
Likely not in the least, since your answer can be summarized like this:
"How can I effectively use this engine?"
"You don't!"
Not sure if you're trolling, if so, good job. But it seems really weird to bash the engine that this forum is dedicated towards. I suppose you didn't specifically say the Ruby engines, so are you recommending those?
Still incredibly unhelpful, because it seems like the OP is using MZ. It's really poor advice to say, "You can't build that house because you bought the wrong brand of hammer. You bought the Cobalt hammer, but you actually need the SnapOn hammer."
Try to stay away from engines that use javascript, like RPG Maker MV or MZ

Then... what do you expect them to make their game with? VX Ace? XP? RM2003???

The older RM engines do not play well with more modern computers, and have incredibly tiny play windows, along with a host of other issues that make them not feasible. I would know because I spent a lot of time with VX Ace.

It's such a bizarre and unhelpful statement especially in an RPG MAKER FORUM of all places.
Factor #1
The event system has page conditions.
One of them checks if switches/variables meet the condition.
If you flip the switch or change the variable, it will refresh the entire map.

Factor #2
Parallel common events run every frame.
There are 60 frames per second. This means the parallel common event runs 60 per second.
Usually, a parallel common event changes the variable value.

Combining factor #1 and factor #2, you made the system refresh the entire map 60 per second.
This is why some people advice to put wait in the parallel common events to lessen the burden.
Then... what do you expect them to make their game with? VX Ace? XP? RM2003???
They said to use GameMaker and Godot.
Not sure if you're trolling, if so, good job
Yes I was joking. People have already provided good tips for optimizing MV/MZ earlier in the the thread, I fully realize "just dont" isn't helpful

But there's something to be said for your hammer comparison because while the rpgmaker engines are great and serve their purpose well, even mv/mz with all of their flaws, if this person is genuinely concerned about performance and has a game idea where that's important, then they should genuinely consider an engine that is well suited to delivering performant games. RPGMaker is not that, as good as it is at delivering RPGs. I don't really think that's what's going on here, but it bares saying anyway.

A more helpful, if still annoying, version of my post would be to just stick to making a core turnbased rpg in rpgmaker and you won't really need to worry too much about performance too much *

* the advice ITT is still worth acting on, ounce of cure etc

(Also I don't mean to cause a flame war, I just wanted to take a cheap shot at this engine that's caused me hundreds of hours of grief trying to optimize enough little game logic things to offset the drawbacks of the engine itself)


Oh I do have one piece of actual programming advice:
Never ever use eval and if you see someone using it in a plugin immediately replace it with a function constructor or preprocessing script and then track down the author and break their hands so it never happens again
Even with those engines, you still need to do your own due diligence. The engine alone is not going to save your performance if you code in those engines badly. So I don't think it is helpful. Giving advice on how to do the best practice on how to do something is more helpful than simply saying "don't".

But this is no context question though, so any advice is ok I guess?
By performance, I think you mean 'frames per second'? My experience has been similar to others. Here is what I've found:

-Parallel Events (These are nasty. Use sparingly.)
-Large maps (I'm not exactly sure why large maps can create such an effect, but it might be in addition to loading that large map with stuff as well. Smaller maps will perform better.)
-Lighting Plugins (These are also very nasty.)
-Too many pictures (If you have too many pictures and are moving them in and out, doing various things with them, that can thrash the garbage clean up.)

Original thread: https://forums.rpgmakerweb.com/threads/what-should-be-avoided-in-order-to-have-a-game-with-good-performance.161534/