Anti-lag for on-screen events?

We all know an anti-lag script for off-screen events is quite common. But what if the lag is coming from events that are ON screen?


A lot of my players are experiencing lag in two points of the game. Both feature perhaps 20-30 events on-screen at the same time. Most of them don't move, so I'm thinking there should be a way to reduce the lag, right? Perhaps we can stop the re-drawing of events that don't move (if such a thing is happening)?


The lag for me is very small, but still noticeable. I can imagine that for people with a slower PC these two parts would lag a lot.
If so few Events bring your FPS down than some other things we dont know about, are sucking away your performance reserves.


You should adress them maybe first.


This is for Windows Games? Or are you talking about lag in a APP Game for Phones?
You need to invest more time into understanding what lag is and how it is created - what you ask for does not exist, and it cannot be created.


The off-screen anti-lag scripts work in cases where there are hundreds of mostly lag-free events on a map, that add together tiny amounts of lag to become noticable due to the hundreds of events creating that. And they solve this by completely stopping the off-screen events.


Theoretically you could create an anti-lag script that reduces lag by stopping on-screen-events as well, but then you won't have a game but a picture only.


If only 20-30 events create noticable lag, then the lag is NOT tiny per event - it is a massive lag per event when talking about computer capacity.


And such a massive lag can only be created by bad logic in parallel processes.


As a result, the only way to optimize that map is to optimize the parallel processes you use - and if you got that much lag, then your events are very badly designed.


I suggest you give us screenshot of all the parallel processes, then we can tell you where you made mistakes.
If so few Events bring your FPS down than some other things we dont know about, are sucking away your performance reserves.


You should adress them maybe first.


This is for Windows Games? Or are you talking about lag in a APP Game for Phones?

 


It's for Windows (trying to make an app with the engine's current state is a joke, even an empty project barely runs on a new phone lol).


 


I wonder why there is no considerable lag in other places. These two maps have nothing special or in common other than a larger amount of events on-screen. It seems logical to me that would be the cause? 


 


I could send over an unencrypted version of that part of the game if you happen to be available and in the mood for checking it out? ^^;


 


@Andar


 


There are no active parallel process events, and even if there were, I know how to design them properly. *shrugs* The problem is not always the easiest one ("turn off plugins one by one", "your parallel process events are badly designed", etc.). We all know there are plenty of issues with the current version of RMMV.
Say.... this is MV, right?


Try searching for JavaScript Profiler or JavaScript Profiling.


Unlike the previous makers where we pretty much had to shoot in the dark, we can now use nice tools to give us additional information.


Check if there are particular methods that draw the majority of the processing.


*hugs*


 - Zeriab
I just had the MV Demo, but i can think of atleast one other case that could cause the lag.


You used the Eventcommand Loop and you somehow deactivated the Eventpage without breaking the Loop properly with Eventcommand break Loop.


In Ace nothing happens, but in MV this leads to drastically Lag under some circumstances. Seems to be a Bug of the Engine.


Paralell Common Events also count for your 2 Maps, not just the Map events.


And than i would list the plug inns, maybe incompatibnility between 2 or more.


Edit: Because you think your Paralell Events are not Active does not mean that is true.


Dont ignore a possible cause. Human failure is the case in most cases, so lets check your paralell Events stuff.


Edit2: You say you know how to design the paralell stuff properly?


Did you know that it doesnt matter if you ask for 200 switches 60 times in a seccond but that a change player graphic


executet just a few times a seccond would bring your fps down to 30 to 40 as soon you have some stuff ongoing on your map.
Have you been able to replicate the issue in a new project where you duplicate the scenario?


It would also make things easier if you want others to take a look at the issue.

Original thread: https://forums.rpgmakerweb.com/threads/anti-lag-for-on-screen-events.68815/