MV Anti-lag?

I have a map that is about 70x55 with about 70 events and MZ doesn't look perfectly smooth running it.
Is that normal/expected? Are there any ways to make the game run more smoothly?
Depends on events complexity and you PC specs I think, it should work smoothly imo. Maybe there is too many parallel events? Or autorun one? Or maybe too many common events running too?
There are no parallel and autorun events at all, except one global one with few commands and a wait 120 frames.
There are 3 layers of Visustella weather effects though. It does seem to help to remove it all entirely but I still feel a bit of lag (or so it seems).
I've also modified the walking speed to be half between normal and dashing (I can't stand any of them as normal is way too slow and dashing way too fast).
Was it lagging previously or when your parallel event is turned off?
I ask because on some screen resolutions i had stable frames but moving looked somehow lagy,
the fault was the Screen Resolution, after changing it all run smoothly. Just a guess.
But can you post pictures of your global parallel event? In case there is a dirty code block somewhere in there.
Hi there!
I know it depends on PC specs, but as far as I can tell, that is a decent amount of events and map size. The lag shouldn't happen by default.
Which means, I believe it's a plugin problem or parallel/autorun event.

The best way to know for sure would be take a look at the project and see all the details.
But you can try disable some plugins and see the outcome without them.
one uses DK pre-loader plugin which causes the lag, (bug or miss used correctly).
pre-loaders can cause lags to low to high if not used correctly.

if you use any, turn it off, and see if it is the same or not.
There are 3 layers of Visustella weather effects though. It does seem to help to remove it all entirely but I still feel a bit of lag (or so it seems).
I think this is probably the culprit - Arthran posted a big analysis in another thread where the obfuscated code for the VisuStella weather effects created significant lag in his projects.

As others have said, that size of map shouldn't have any problems by itself (and the number of events is irrelevant if they're not actually autorun/parallel to be doing anything).
There are multiple factors that can combine to cause lag, so without having more specific details about your project and your PC, it's hard to really give much advice. However, since I've seen you mention using various VisuStella plugins on multiple occasions, I will reiterate the point about obfuscation that I had raised in the post that ATT_Turan referred to:

Spoiler: Performance impact of obfuscated code
VisuStella's approach to obfuscation causes the obfuscated code to run much slower (relatively speaking) than the pre-obfuscated code. That is to say, all VisuStella plugins are sub-optimal in terms of performance. When I say "sub-optimal" I don't mean that they necessarily will cause a noticeable performance impact on your game as a whole--I simply mean that the code in the plugin is running slower than it *could* be. Even if a plugin is originally written in the most immaculate, highly optimized code... it gets turned into bad code once you obfuscate it (using the obfuscation approach that VisuStella uses).

When you use a plugin, you're essentially overwriting parts of your game's engine with the code from that plugin. So if you use a whole bunch of plugins that contain sub-optimal code, you're basically replacing a whole bunch of your game engine with sub-optimal code. While I don't know enough about your project to say that this is your issue, it certainly could be a contributing factor. So if you happen to be using a bunch of obfuscated plugins, then it might help to take a look and see if any of the ones that aren't indispensable can be removed or replaced.

I will just go ahead and add a disclaimer to clarify that I'm not trying to say that you shouldn't use any obfuscated plugins at all. In fact, I do use some myself, and you wouldn't have to look too hard to find posts where I've recommended/praised some VisuStella plugins.

I'm just saying that if you happen to be using some that you don't actually need, then it can be a good idea to try to trim them out of your project. When I see people post pictures of their project's plugin list on here, they're almost always using some really high (IMO) number of plugins, and I can't help but wonder if maybe they're just piling unnecessary plugins into their project (simply because they can) without actually using/needing some of them. Having more plugins than you actually need isn't a good idea even in the best of times, and it's an especially bad idea when those plugins are obfuscated.

And then there might also be situations where there are multiple plugins that can do what a person needs, but they choose to use VisuStella's version, either to feel like they're getting their money's worth from a plugin bundle that they already paid for, or because they assume that being a "name brand" plugin means that it's better. In those situations, it might not be a bad idea to give one of the other options a shot.

Setting obfuscation aside, I will mention a few other things that might be worth looking at:

Spoiler: Possible impact of Events and Movement Core
and the number of events is irrelevant if they're not actually autorun/parallel to be doing anything
While this is normally accurate, certain plugins can cause that to change. For example, in my testing, I noticed that having VisuStella Events and Movement Core installed *very* significantly reduced the maximum number of events that I can have on a map--even if those events are not autorun/parallel, have no animation, and have no movement route. I actually made note of this in the "Other Tests" portion of the post that I linked.

The test labeled "Test 2" was a small test where I continually spawned events that do absolutely nothing (i.e. not autorun/parallel and no movement or animation) until my FPS dropped below 30. When I was using Galv's Event Spawner to spawn the events, I managed to spawn in 7287 events. When I was using VisuStella Events and Movement Core to spawn the events, I was only able to spawn in 473 events.

So for whatever reason, having VisuStella Events and Movement Core installed completely murdered the maximum number of events I could have on the map (literally by a factor of 15x), even when those events do absolutely nothing. I would assume that the plugin is constantly polling each event to check whether or not it's supposed to do something or another (for some plugin feature that I wasn't actually using).

My 473 is much higher than the 70 events that you're using, but it's also important to note that I was performing this test with no other plugins installed, on a small map where absolutely nothing else was happening--so in a real scenario, the maximum number of events that I could use with that plugin installed would likely be much lower than 473. But I don't know the specs of your PC, so the actual number isn't really what's important anyway. The fact that the plugin (at least the version that I tested back in July) does impact maximum events is what's important. So if you happen to be using that plugin, it could be part of your problem.

Spoiler: Possible impact of Visual Parallaxes
What people said about the size of the map being alright is also normally accurate, but certain plugins can also potentially change that. For example, when I tested VisuStella's Visual Parallaxes plugin a long time ago, I noticed that it caused high RAM usage that directly correlated with map size--IIRC, it was using like 6 gigabytes of RAM on a pretty big map. I don't know for sure, but I'm guessing that the plugin basically causes your game to treat the entire map like a parallax map, even if it's a tile map.

For some reason, the RAM usage would also double every time I opened and then exited the menu, so it was really easy to make the game unplayable by tapping the menu button a few times on a really big map.

This was a pretty long time ago, so I don't know whether or not these issues have been fixed. And I will reiterate that it took a pretty big map size for the issue to be notable, and I don't know for sure if your map size falls within that category... but if you happen to be using that plugin, it might be worth temporarily disabling it, just to see if your lag issue gets alleviated any.

I feel like I had a few other things to mention, but this post got way longer than anticipated, so I wound up forgetting. In any case, plenty of other plugins can cause problems too, so as everyone else mentioned, it's worth trying to disable some to see if anything changes for you. Lighting plugins and weather plugins are always good candidates.
One thing I found that really caused lag was if you use the event chase plugin as it is using a very advanced pathfinding system which can slow down the PC as it tries to find the paths to the party. I got around it by changing it to Crash to instead of chase, and by changing how long they chased. Otherwise you can get a lag once it detects you, and it gets worse if you get a conga line of enemies chasing you.

T he other thing I have noticed is MZ lags if your PC is doing a 'background' update, especially on old non-SSD HDs. Windows update loves to take 100% HD processing for those background processes, and nothing can stop them. It will even ignore your times set for installing the updates, as it sees it as not installing but just downloading them. However, this will also lag any RPGMaker engine, I got 2 FPS in my last game when windows was doing one of those updates.

Original thread: https://forums.rpgmakerweb.com/threads/anti-lag.151826/