MZ Is there any way to mitigate the severe performance issues with Visustella Events and Movement Core on large maps with lots of events?

I would like to explore every option before further fragmenting up my maps. I've got a few maps roughly between 80x80 and 150x150, and that have between 200-400 events. They run alright on my machine but are really starting to chug down to 30 fps on a friend's (with above average specs). I've tried updating Nw.js, isolating the plugin, ensuring there's no parallel events, you name it.

No matter what I trim down it just seems to be a direct correlation to the volume of events on the map, most of which are either blank with a graphic, or simple action button interactions. There's maybe one or two with custom movement routes, none of which are unoptimized.

Normally if a plugin is giving me grief, I'd have my buddy program a workaround, but VS plugins being obfuscated makes this nearly impossible, so I'm hoping someone else has some sort of solution that I wouldn't be able to intuit normally.

Thanks in advance for any insight or assistance.


Edit 1: I am not asking for comprehensive assistance with performance issues. I do not need further troubleshooting, this is a known issue. I dont need more suggestions to deal with the slowdown by reducing event volume and map size. I have already decided that I will use alternative plugins, custom or otherwise, if no one has found a tweak that targets this slowdown. As the slowdown is entirely on the shoulders of Events and Movement Core, and I will not be furthering the use of new plugin categories that cause additional slowdowns, it is not necessary for me to limit myself further.


Edit 2: My buddy and I have now, largely, found the issue that VS plugins (mostly Events and Movement core) cause when in a map with a high event volume (regardless of the format of the event), and have a solid solution that can be implemented as a non intrusive plugin. We are ironing things out, and then we will make it public - it does not mess with VS code directly so it should be rule-abiding.

A big thank-you again to Aerosys for being the only person to give insightful information directly addressing a potential workaround instead of a compromise/mitigation; information which allowed us to diagnose what the VS plugin is doing. It wasn't refreshes, but knowing now how to look at stuff on bottom-up and call-tree was a game changer.
As a start, you can use the performance tools to dig into potential bottlenecks.

- In the game, press F12
- Go to "performance"
- Record for a while
- Play around with the tools, maybe you find something
1)
first, you should analyse the why of the slowdown - it should not happen without reason.
are you using a lot of pathfinding? or do you use a lighting plugin?

those two are the most common resource drains after parallel events.

2)
and then your friend should check the background processes of his computer.
Hardware specs only give the total power available to a computer, they say nothing about the current free capacities.
and from your description your computer has much more free capacities than your friend's one.

So the question becomes what else is running on your friends computer to use up his free capacities if his specs are better? multiple antivirus or an automatic cloudsave while having a bad internet condition or a bad display driver forcing the use of slower display functions or or or - the possibilities are not endless, but there is a lot that can go wrong in a computer.
As a start, you can use the performance tools to dig into potential bottlenecks.

- In the game, press F12
- Go to "performance"
- Record for a while
- Play around with the tools, maybe you find something

We already tried this, but we're not really able to make heads or tails of the data. It's "scripting" heavy by a wide portion on the circle, but even if we knew exactly what was firing, it's a problem with an obfuscated plugin and we wouldn't know where to start to fix it or bypass whatever the interaction is. If events movement core is firing some sort of specific script far too fast and often that doesn't need to be doing that, I don't know how useful that information would be. I'm hoping someone has a workaround that does some sort of interception, given the obfuscation.

1)
first, you should analyse the why of the slowdown - it should not happen without reason.
are you using a lot of pathfinding? or do you use a lighting plugin?

those two are the most common resource drains after parallel events.

2)
and then your friend should check the background processes of his computer.
Hardware specs only give the total power available to a computer, they say nothing about the current free capacities.
and from your description your computer has much more free capacities than your friend's one.

So the question becomes what else is running on your friends computer to use up his free capacities if his specs are better? multiple antivirus or an automatic cloudsave while having a bad internet condition or a bad display driver forcing the use of slower display functions or or or - the possibilities are not endless, but there is a lot that can go wrong in a computer.
The reason is Events and Movement core. This is a pretty well documented phenomena by a lot of regular posters, here and on the discords. I stated this up front, it's not "without reason".

I was having the same performance tanking until I updated the plugin from 1.59 to 1.60, but his improvement was only marginal. The parameters of the plugin do not leave much room for enabling and disabling features outside of charset shadows (which are off) and 8 dir (which is off).

I don't have click to move enabled, and there's no automatic pathfinding at all. I already stated the nature of the events on the maps where the issue occurs. For the rest, lighting is baked in via tile shadows and is flat/default otherwise. Friend restarted his PC and closed out all of his background processes. His game runs fine with the plugin disabled and has the performance issues with it enabled.

As I already said, I isolated the plugin, it's not a matter of conflict.
May I ask why you have about 300 events on 1 map?

How many of them are Parallel?

Why do you need 300?


You might be able to reduce the amount of events you need down to quite a lot.
May I ask why you have about 300 events on 1 map?

How many of them are Parallel?

Why do you need 300?


You might be able to reduce the amount of events you need down to quite a lot.
You're free to ask that, but it's not a helpful question. This is not a limitation that is present without the plugin. I am asking for a possible insight on sidestepping a constraint, narrowed down already, that shouldn't exist and is beyond our ability to alter due to obfuscation. I also already stated that I ensured none of the events on the problem maps were parallel.

I am aware that I can mitigate slowdown that scales with event volume by reducing event volume, as one should probably guess. If there's no solution to this floating around or in the works, I would simply identify every feature I'm using from this plugin, and from those which use it as a dependency, and find alternatives. Despite how obnoxious and tedious it would be, given all of the notetags I'd have to swap, it's a much more preferable answer than upending my design for arbitrary requirements.
I know in your post you said you want to explore other options before scaling down your maps, but I would really, REALLY, recommend you do in fact scale down your maps and/or find a different plugin.

In any RMMaker you shouldn't have 300 events running in 100x100 maps, the engine itself doesn't handle this amount very well (specially if you have many parallel processes in these maps and/or parallel common events), and if you add movement, lighting and other heavy plugins on top of that, yeah, you're going to have loads of frame drops one way or the other. Even if you don't have frame drops when disabling Visustella now, down the line when you require more plugins and your game becomes heavier/greater, you're going to have a tough time with framerates either way if your maps continue to be this huge.
I don't know how to solve your problem and there probably isn't a solution in the plugin. And I also know that there are areas that require large maps (city, forest, world map).

One suggestion I can give is to create a large map, divide it into smaller maps and use a plugin to switch between maps by touching the edge of the map and without transition.


You're free to ask that, but it's not a helpful question.
you really should check your attitude, it will not help you to refuse every step to the side.

As you have seen yourself, your original way to a solution is almost impossible due to the Obfuscation of VS plugins.
So if you continue to refuse any and all tries to circumvent the problem in a different way, you'll also refusing any possible solution - and refusing to answer the questions intended to find some other solutions will only alienate the few people who still might want to help you in their free time (after all we are wasting our free time for this instead of working on our own project, you're paying us nothing).

Or in short: to have even a chance of finding you a workaround we ned to know what your game mechanics are and what really happens in your game.
continue refusing to answer the questions in several posts above and you won't get any help at all.
you really should check your attitude, it will not help you to refuse every step to the side.

As you have seen yourself, your original way to a solution is almost impossible due to the Obfuscation of VS plugins.
So if you continue to refuse any and all tries to circumvent the problem in a different way, you'll also refusing any possible solution - and refusing to answer the questions intended to find some other solutions will only alienate the few people who still might want to help you in their free time (after all we are wasting our free time for this instead of working on our own project, you're paying us nothing).

Or in short: to have even a chance of finding you a workaround we ned to know what your game mechanics are and what really happens in your game.
continue refusing to answer the questions in several posts above and you won't get any help at all.
You can choose to interpret the way I'm responding all you like: I am asking for something very specific, a possible workaround to a known flaw in a plugin that someone may have discovered that I was not able to find before making this thread. I already have the scope of my game planned out and alternatives in mind if I am unable to find a solution to this issue. I have made that abundantly clear. There is not a single reason I need to justify the content of my game as it's irrelevant to the question at hand: A request for a workaround for Events and Movement Core framerate drops that maintains the use of the plugin.

The majority of the responses in this thread have been unhelpful troubleshooting diatribes that have already been halfway or entirely answered by my opener, or people attempting to convince me to go with the plan B that I already outlined as what I will do if there is no solution. It's a complete waste of everyone's time. Pointing out that I'm not paying people to reply to me is as asinine as you bringing up parallel event and lighting plugins, when I had already stated the plugin was troubleshot with isolation and I ensured I had no parallel events. Please stop posting asinine things in this thread.

Workarounds that circumvent the obfuscated code and prevent issues are rare but possible, and the friend I've mentioned who programs workarounds has done so before, for instance with a UI issue he had with Items/Equip Core that has yet to be fixed by VS. He hasn't been able to make heads or tails of what's being bogged down by Events and Movement core here, but given that people like bgillisp have been talking about this issue with the plugin for a long time, and it's well known, I am hoping that someone has found a tweak that they are willing to share. That is the goal.

I understand that the lion's share of questions that get posted on this forum deserve the surface level interrogation that assumes a lack of understanding, but it has no place here. I have participated in about four bug/performance conversations total on this site before this thread, two of which being threads I made, and every single time has been a bug that I discovered that then was either fixed by VS, another plugin developer, or for the RMMZ engine itself. I don't need the equivalent of "did you turn it off and on again" from people that can't read my post, and then a lecture about my attitude for not engaging in irrelevant lines of questioning.

"Waste your time" elsewhere, please. I do not understand the common mentality of this forum where users pad their post counts by replying to threads they have no insight on, and act as if they're being helpful and should be coddled.
This is not a silver bullet solution (and I doubt anyone would find it), but it is a tiny plugin that I once created to analyze why my game is lagging.

Once in your game, it indicates when a map is refreshed. A map refresh is expensive and, therefore, should only happen when a Switch, Variable, or something else changes. If you see that the counter skyrockets, then it means that your scripting or eventing fires up map change requests unnecessarily often.

Even the tiniest switch/variable OP in a parallel process (example: If airship -> Switch ON, Else -> Switch OFF, repeat) can cause a full map refresh, which often causes lag.

Again, this is just a plugin that I made for myself. It might help you, or it might not.
This is not a silver bullet solution (and I doubt anyone would find it), but it is a tiny plugin that I once created to analyze why my game is lagging.

Once in your game, it indicates when a map is refreshed. A map refresh is expensive and, therefore, should only happen when a Switch, Variable, or something else changes. If you see that the counter skyrockets, then it means that your scripting or eventing fires up map change requests unnecessarily often.

Even the tiniest switch/variable OP in a parallel process (example: If airship -> Switch ON, Else -> Switch OFF, repeat) can cause a full map refresh, which often causes lag.

Again, this is just a plugin that I made for myself. It might help you, or it might not.
Thanks for sharing, there's no use case for it on this specific issue, as I myself can't parse and adjust what obfuscated code is doing, and the other factors are controlled already, but there are some other unrelated matters it will come in handy for in the future. I'll check your plugin out tomorrow.
We already tried this, but we're not really able to make heads or tails of the data. It's "scripting" heavy by a wide portion on the circle, but even if we knew exactly what was firing, it's a problem with an obfuscated plugin and we wouldn't know where to start to fix it or bypass whatever the interaction is. If events movement core is firing some sort of specific script far too fast and often that doesn't need to be doing that, I don't know how useful that information would be. I'm hoping someone has a workaround that does some sort of interception, given the obfuscation.
I would love to see your results. Especially "Bottom-up" or "Call-tree" almost always give hints which line of codes are causing trouble. And even with the obfuscation, many VS functions still have a human-friendly name where you could go to Visustella team and tell them "hey your function xy in Game_Map" is a bottleneck.


Thanks for sharing, there's no use case for it on this specific issue, as I myself can't parse and adjust what obfuscated code is doing
Well, I would not say that. My plugin tells you whether the map is refreshed too frequently or not, it has nothing to do with the obfuscation. You simply get 2 possible results:

-> too many map refreshes: Look in your eventing, it's unlikely that VS causes too many map refreshes, they usually know what they are doing
-> map refresh occurs once a second or less: Your eventing looks good, now you can look at VS again
I would love to see your results. Especially "Bottom-up" or "Call-tree" almost always give hints which line of codes are causing trouble. And even with the obfuscation, many VS functions still have a human-friendly name where you could go to Visustella team and tell them "hey your function xy in Game_Map" is a bottleneck.



Well, I would not say that. My plugin tells you whether the map is refreshed too frequently or not, it has nothing to do with the obfuscation. You simply get 2 possible results:

-> too many map refreshes: Look in your eventing, it's unlikely that VS causes too many map refreshes, they usually know what they are doing
-> map refresh occurs once a second or less: Your eventing looks good, now you can look at VS again
I've just ran it, and it doesn't seem to be refreshes that are going off. The bottom up and call tree functions are pointing to some interesting stuff with Events Move Core though, which I can promisingly follow via the reveal in sources option, but I'll need my buddy to comb over this with me as it's his rig that's farting over this. I wasn't actually aware of this element on the performance tab during your first reply in the thread (heads or tails may now be made), so thank you for mentioning it by name. If we can cook up some kind of intercept plugin that addresses this issue, I'll share it (but first I'll look at the Visustella ToS to see if I'm allowed to do that, otherwise I'll just bug report it and maybe describe what to do). I'll report back regardless.

I made the thread to find a workaround, but we might be able to make one ourselves now or very accurately report it for Vs to fix, promisingly.


Also, I'm going to definitely keep this refresh counter plugin, as it's highlighted an unrelated inefficiency in one of our custom plugins that we can now address; it wasn't causing slowdowns for either of us but certainly could for other users in the future. I'll put you in our credits page 🙂


Edit: My buddy and I have now, largely, found the issue that VS plugins (mostly Events and Movement core) cause when in a map with a high event volume (regardless of the format of the event), and have a solid solution that can be implemented as a non intrusive plugin. We are ironing things out, and then we will make it public - it does not mess with VS code directly so it should be rule-abiding.

A big thank-you again to Aerosys for being the only person to give insightful information directly addressing a potential workaround instead of a compromise/mitigation; information which allowed us to diagnose what the VS plugin is doing. It wasn't refreshes, but knowing now how to look at stuff on bottom-up and call-tree was a game changer.
Have you used this plugin?
Running the page through google translate, the idea seems similar to what is being put together now by my buddy and I, but the scope is smaller and more contextual, with less control (and on a different function). Hang tight - he or I will publish it when it's done (maybe by the end of today), and when we are reasonably sure we're not bricking anything we don't mean to brick.


Edit:
The plugin is finished, and therefore a solution to this problem has been found (by my buddy SnakeKillerX and I)

We have made it public here, and this link (Once the thread is approved) should contain all the relevant information of what was causing this slowdown, and how we fixed it, and how YOU THE VIEWER can as well 🙂

Given how this thread went, I would encourage people to not be afraid to think outside the box, not accept that you have to put up with flaws in features you make use of, and to be stubborn about your design choices. You always have the power to make things work, if you believe you can and understand the tools at your disposal.
Given how this thread went, I would encourage people to not be afraid to think outside the box, not accept that you have to put up with flaws in features you make use of, and to be stubborn about your design choices. You always have the power to make things work, if you believe you can and understand the tools at your disposal.
Absolutely agree! Many people think that, just because a plugin is obfuscated, you are automatically stuck in a dead-end. Well, it can be true sometimes, but in many cases, you still have many options to try out first, and especially the debugging console is very powerful. Actually, I rarely read other people's code because treating it as a black-box is usually much more efficient.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-any-way-to-mitigate-the-severe-performance-issues-with-visustella-events-and-movement-core-on-large-maps-with-lots-of-events.178403/