What makes RPG Maker MV lag?

doom_juan

Villager
Member
Joined
Jun 5, 2020
Messages
9
Reaction score
2
First Language
English
Primarily Uses
RMMV
Very new to RPG Maker MV, but before I commit myself would really like to learn what kind of things are likely to make a game lag/slowdown.

I've read today that parallax mapping can cause lag if too big: how big exactly? What's the most you can get away with?

In general, what are the main things that can really lag the engine?

Many thanks.
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
511
Reaction score
175
First Language
English
Primarily Uses
RMMV
Hello, welcome to the forums, and to RPG Maker! :kaohi:

Probably the biggest cause of lag would be haphazard usage of Parallel Processes. Parallel Processes will attempt to run their event at every possible frame, which depending on what that event is set to do (and especially if you have several of these going off at once), this can quickly cause some lag.

The other common cause of lag tends to be having too many events on one map. What the event is doing matters a lot more than how many there are, but if you're trying to have hundreds of events on one map, you might run into some slowdown. There are anti-lag plugins available that can help with this, though.

For paralax mapping, I've heard that the magic number is somewhere between 40x40 and 50x50 before you start getting lag, but I admitably don't have much experience with paralax mapping, so take that with a grain of salt.

Feel free to ask any questions you come across, there's plenty of friendly people around that are happy to help you out.
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,649
Reaction score
13,261
First Language
English
Primarily Uses
RMMV
There are many potential causes of lag.

A single parallel process with just a couple of lines can cause lag. Two parallel processes running at the same time can cause lag. It depends what's in them.

Processing-intensive plugins can cause lag, such as lighting plugins. They may work fine for someone who has a high-spec machine, but cause someone else's low-end machine to ground to a halt.

Large maps, lots of events, large parallaxes.

A lot of them can be avoided with good design, but not all.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
523
Reaction score
410
First Language
English
Primarily Uses
RMMV
loading stuff from disk if a lot of other stuff is going on (can be handled by preloading)
 

TheDrifter

Veteran
Veteran
Joined
Apr 18, 2012
Messages
116
Reaction score
5
First Language
English
Primarily Uses
As far as parallax mapping goes, I was recommended to not be lazy and use multiple small assets and take the time to position each one correctly, instead of using large visual assets that cover the entire screen.

Having fewer Events running at once on the screen will also help reduce lag, from my experience.

One of the projects I worked on would run perfectly on some of my computers, and not at all on some older models, so the amount of lag could be dependant on your hardware and the game's optimization. It's probably preferable to make sure your game can run on a toaster.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,389
Reaction score
7,217
First Language
German
Primarily Uses
RMMV
As said above there are a lot of different causes for lag, and they are all additive. Every computer has a limited capacity before that lag becomes detectable, and you'll only know the last part that added to the lag because the previous parts that added to lag were still within the limits of the computer (even if they are often causing more lag than that last part you added before lag became too much).

That is why you will only get vague statements without specifics on what causes how much lag.


As for parallax maps - the problem is that a parallax picture needs to be uncompressed in RAM for it to be used in a map, and that takes several thousand times the RAM as would be needed for a tile-based map.
A lot of people confuse the compressed filesizes of a stored picture with the uncompressed RAM requirement. If you want to know how much RAM a picture needs to be used as a parallax map, please store it as BMP on your harddrive. That is the RAM-size, because BMP has no compression.
(it's a lot more than the picture needs stored as PNG)
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
528
Reaction score
250
First Language
thai
Primarily Uses
RMMV
As far as parallax mapping goes, I was recommended to not be lazy and use multiple small assets and take the time to position each one correctly, instead of using large visual assets that cover the entire screen.

Having fewer Events running at once on the screen will also help reduce lag, from my experience.

One of the projects I worked on would run perfectly on some of my computers, and not at all on some older models, so the amount of lag could be dependant on your hardware and the game's optimization. It's probably preferable to make sure your game can run on a toaster.
Hi... I'm curios of how you handle parallax
I'm not English speaker so I'm a bit confuse on your post
"I was recommended to not be lazy and use multiple small assets"
what good to have several small multi parallax piece work more than one piece

image_20200529_104908.jpg
this is how my parallax look like
so if I cut out the cluster the shadow the paper etc and place it one by one
it will more less lag than one picture?
 

kako05

Veteran
Veteran
Joined
Sep 11, 2017
Messages
137
Reaction score
14
First Language
Australian
Primarily Uses
RMMV
RPGM mv has very poor performance overall especially when you start adding plugins.
Maybe it has something to do with the programming language and how inefficiently it handles the data. In the same manner why browsers are so demanding nowadays.
TDDP bind pictures to map kills performance and has memory leaks. I see a lot of people using that plugin, but I would advise against it.
So far galv parallax map plugin worked best for me. Maybe yep_doodads is worth a try for adding sprites. But I think you'll need "jitter fix" plugin to fix some graphical bugs.
There are several plugins which reduce performance a lot, just be careful. For example, mog animated enemy busts during battle result in 22fps instead of 38fps just by adding a "breath" effects them.
Avoid making big maps. 40x40 or 50x50 shouldn't cause issues. Bigger than that, plus parallax plugins will kill performance. Too bad, but rpgm mv can handle only pocket-size maps. That's why I dropped the idea of making actual rpg style game, it just wasn't good enough especially when sprites and tiles were 2x of regular size. Game on lower end machines would lag and maps were too small for my liking. Unless your game is basic as it gets, forget the idea of making 100x100+ town full of npc etc.
Resolution can be a problem. That's something I still need to test, but just using 720p instead of 1080p can have a massive difference. Not 100% sure about that though.
Using bigger than 4000x4000 pictures will fail to load them on some machines. It's the limit set by hardware to avoid long loading times. It's noticible on phones especially.
Lightning plugins are pretty demanding. Loading multiple pictures at once will stutter pc. For some reason rpgm has a hard time loading pictures. Problem for lower end pc and mobiles.
And yes, parallel events/common events are demanding. Maybe adding 1-3wait command if it's some kind of stat checking event is a good idea.

What I'm saying RPGM is the pretty nice little engine, just don't overdo what's beyond the engine.
There are hundreds of plugins available, you can stack them all together expecting to make this huuuge rpg world full of wonder and mystery, but the game itself will probably end up as an unplayable mess with crashes and poor performance. Test a lot and have realistic expectations. Start small and use plugins you actually need.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,389
Reaction score
7,217
First Language
German
Primarily Uses
RMMV
what good to have several small multi parallax piece work more than one piece
"Parallax mapping" for the RPG-Makers is not the same as using a parallax. It was named because it basically abuses a function intended to make a parallax for something else, for a background map.
That is by the way why the help file on MV calls the use of ! in the filename "disabling parallax".

And what the topic above meant was to use several small maps instead of one big map, because the bigger a parallax map is the worse the RAM situation gets. Because with parallax mapping, only one parallax picture is loaded at a time for the map background.
 

doom_juan

Villager
Member
Joined
Jun 5, 2020
Messages
9
Reaction score
2
First Language
English
Primarily Uses
RMMV
There's some seriously useful information being posted here, really giving me a better focus - many thanks.

Will a lot of lag be reduced depending on the filesize of your png's overall? Would a 8-bit png run faster than a 24-bit png, for example?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,389
Reaction score
7,217
First Language
German
Primarily Uses
RMMV
Will a lot of lag be reduced depending on the filesize of your png's overall? Would a 8-bit png run faster than a 24-bit png, for example?
yes and no.

if the filesize is reduced by better compression then it will only affect the loading time but not the required amount of RAM on the uncompressed version.

Theoretically the difference between 8 bit pictures and 24 bit pictures is the number of bits to store the color of one pixel, so that will reduce the required RAM. Unfortunately that depends on what the color screen of windows is set to, so if you are in windowed mode and the desktop is set to 24 bit color, then using less colors will not remove the required RAM.
However that depends on the coding of the engine, and I don't know how that is done so I don't know if they would reduce the data requirements if there are less colors.

As said the RAM size is without compression, so you can test it by storing the picture as BMP.
 

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
556
Reaction score
128
First Language
English
Primarily Uses
RMMV
What caused lag for me before was having many monsters with various hues changed from engine in battle, having too many animations from parallel events running and such.

But I believe it's what your hardware can handle that mainly affects this.

With my new laptop I have none of this previous issues I mentioned.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,113
Reaction score
517
First Language
English
Primarily Uses
RMMV
@J-G Sounds like this particular anti-lag plugin may help you out with that. I had similar issues, this helped me a lot.
 

kako05

Veteran
Veteran
Joined
Sep 11, 2017
Messages
137
Reaction score
14
First Language
Australian
Primarily Uses
RMMV
There's some seriously useful information being posted here, really giving me a better focus - many thanks.

Will a lot of lag be reduced depending on the filesize of your png's overall? Would a 8-bit png run faster than a 24-bit png, for example?
I don't think there's much difference in performance. But you can convert PNG to webp to save space (my project ~3.4gb, converted ~900mb. But you should do that only on exported games since the editor itself won't show you webp format.
Lookup for "Cruncher - Ren'Py & RPGM MV Game Compactor". Using 85%-94% quality will fetch good results.

What caused lag for me before was having many monsters with various hues changed from engine in battle, having too many animations from parallel events running and such.

But I believe it's what your hardware can handle that mainly affects this.

With my new laptop I have none of this previous issues I mentioned.
Try
But test if it doesn't break other plugins or slow the game. I think I had issues with this plugin.
 

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
262
Reaction score
295
First Language
Portuguese
Primarily Uses
RMMV
Because people already gave an overview of why RPG Maker itself may cause some unstable frame rates, I want to talk a little more down the rabbit hole.

Itt goes way beyond on what RPG Maker does, the unstable frame rate is because at some point the hardware is being bottlenecked (The code also sets some limits for some things, like cacheing) . So you need to think about mainly 3 things:
RAM (Memory)
Graphics (Renderizing)
Instructions (Processor)

If your game bottlenecks at one of these points, you get the frame rate to fall, Now each thing is its own universe. The more instructions you pass like variable operations (indirectly also, like walking on the map, calculations, and other stuff), it will require the processor. Things you put in Cache, like images, variables, events will be loaded on the RAM. Image processing and visual things will require the to be renderized, and that asks from the graphic card. Some hardware can cross-help the other, but that wouldn't be the point of the question now.

Knowing those, you can evaluate a little bettler some plugins also, what it is forcing from the hardware to do, and where it might be lending heavier on.

So what happens if a huge parallax image is loaded at once, it will ask for both Graphics, because it is actually showing the image even if its not on the screen, and from the RAM, because it needs to Cache it, also the processor because it does pass into a lot of instructions to renderize it also.

Its not exactly the engine, its what it is doing at the moment, Sadly or Happily for some, RPG Maker comes with a LOT of default coding, and some are executed even if you are not using like vehicles/states, those do help for RPG Maker games to not be performatic, but usually your design on the game will be the best way to avoid lags and freezes.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

And now since I've got the whole game parts working, the *contents* await.

I've invented a cheap way to manipulate weather. Should I get it patented?
It's change from frikin' hot to beautiful at the cost of only 4 beers.
I think is french enough.
Yanfly told me the new earth all animations in MZ look a bit like summoning potatoes and now I can't unsee it. halp

Forum statistics

Threads
100,589
Messages
977,550
Members
132,187
Latest member
akshpatil
Top