Performance and number of events in a map

Hello,

(firt : sorry for my english. i hope my question will be clear enough...)

Is there a relation between performance (no lags/slowdowns) of a game and :
- the number of events in a map (or in a project in general) ?
- the number of common events in a project ?
- the size of a map

I have noticed that in previous games i'have developped "lag" could appear (the walking animation of the main character was not fluid) in certain cases and i always wonder why. One day, i tried to supress a lot of events in a map, just to see the difference, and i could seen the game flow returned to normal. So... i wonder if there is a recommended limit to the number of event (+ common event) in games.
Must I limit my use of common events ou events ? Is there a recommended "limit" by maps, in the number of common event included ?

My situation for my current project :
I'm developping a game with nearly no plugin, except for a call to a custom menu (the plugin is only here to call a common event with the mouse right clic, Y button or escape key).
I'm using a lot of Common Event to handle my custom inventory system but all of these comon event are called by other events (no use of parallel or automatic common event).
For now, i have around 30-40 common events.
In my maps, i don't use parallel events, and rarely (but occasionaly) use automatic.
My maps size varie from 13x17 to 100+x100+ and i change the screeenresolution to 1920x1024.
I have in general around 20-30 events by maps.


Thank you for your help ! 🙂
- the number of events in a map (or in a project in general) ?
No
- the number of common events in a project ?
No
- the size of a map
No



Technically speaking, yes, for every single event there is a small amount of RAM that needs to be allocated, but this amount of ram is negligible. Same goes for the size of the map (assuming you are using the standard tile method of map making and not parallax maps).
So in a technical sense, I am incorrect to say no to all of your questions, as yes there is a performance impact. However, in a more practical sense, the answer is no due to how negligible the performance impact is.

How you use the events is more pertinent to the performance.
Depending on the logical structures of your event it can have a performance impact, however the biggest impact is going to be parallel events without wait frames.

You see....
RPG Maker is a single core/single threaded process. So every calculation is running on that single core/thread. The result is that things can begin to bottle neck quickly.
Using wait frames, will help the interpreter stop running for that event, making room for it to process other events, reducing the bottle neck in performance.
Ideally, you should set wait times to match the priority of "necessity of frequency of check" or in other words: how often does the event need to be checked? Does that data really need to be checked every single frame? Probably not, it can probably wait 1 or 2 frames before needing to update that data.
If the events are static and don't do anything it shouldn't affect performance much. It could add to load time though. It's when a lot of events are firing off processes simultaneously that things start to lag.
Thank you ! As always, this community is so great and helpful ! Thank you again !

Original thread: https://forums.rpgmakerweb.com/threads/performance-and-number-of-events-in-a-map.163839/