How map/events affects performances?

Hi!
Very general questions here, today;
I have read several times that, in some cases, the size of the map and the number of events can affect performances.
I would learn something more about this:

1) Approximately at what size of the map can problems begin?

2) At what number of events?
Normal events linked together by CallEvents (that activate them only when needed) will give me problems or is it mainly related to parallel processes?

3) Is it a problem strictly related to rpgmaker or does it depend on the power of the pc?
It all depends. The easiest way to get performance problems is to let a parallel process run wild.
A parallel process will repeat its code every 16 milliseconds. Unless you're checking player input, you don't need to repeat it that often, so always make sure to always include a "wait" command on the beginning or end of the event, so it won't repeat as often.
(Even if you are dealing with input, find some place to put the wait command there too)

Then there's the problem of event numbers. In RM, every event you add to the map is a multi feature behemooth. It can have a sprite or not, it can have multiple pages or not, it can have trigger conditions or not.
RM always assume every event has all of it. So every 16 milliseconds it will check every event on the map to determine if it needs to change the page, if it needs to trigger its code, if it needs to update a sprite on screen and so on. So yes, adding too many events can slow down your game. Its a much smaller impact than one caused by wild parallel events, but its still significant. How much it affects will really depend on the PC its being played at.

If you need to have a lot of events on a single map, what I recommend is to create a single autostart event on the map that uses a plugin command to copy the events from a different map, but only if their conditions are met. For example: if you have an NPC that only shows up in a certain map after the player has defeated a certain boss. You can use this autostart event to only copy the NPC event if the boss was defeated. That way the event won't event exist in the map unless its needed.
When going too general the answers don't give too much information

1) Any size
2) Any number of events
3) It depends on the power of the PC and on the default code of rpg maker

You have to consider that the performance requirements depends on how much code needs to be executed every frame. The whole system plays into this.
For example having a lightning system will typically reduce the budget of computational power left for the events.

The experiences others encountered in terms if map size, number of events, number of events of a particular type and etc. is really valuable information to help you gain a good gut feeling of how much you can normally get away.
Please keep in mind that optimizing particular aspects is a possibility though it might not be too feasible if you are not a programmer yourself. For example. In RMXP having a 99x99 map with 50-100 events with a sprite and move routes was typically about the point where I started noticing FPS drops. By abusing some special traits of my events I managed to have a 499x499 map with 20k events run smoothly.

When you go too general the answer really is: It depends
It all depends. The easiest way to get performance problems is to let a parallel process run wild.
A parallel process will repeat its code every 16 milliseconds. Unless you're checking player input, you don't need to repeat it that often, so always make sure to always include a "wait" command on the beginning or end of the event, so it won't repeat as often.
(Even if you are dealing with input, find some place to put the wait command there too)

Then there's the problem of event numbers. In RM, every event you add to the map is a multi feature behemooth. It can have a sprite or not, it can have multiple pages or not, it can have trigger conditions or not.
RM always assume every event has all of it. So every 16 milliseconds it will check every event on the map to determine if it needs to change the page, if it needs to trigger its code, if it needs to update a sprite on screen and so on. So yes, adding too many events can slow down your game. Its a much smaller impact than one caused by wild parallel events, but its still significant. How much it affects will really depend on the PC its being played at.

If you need to have a lot of events on a single map, what I recommend is to create a single autostart event on the map that uses a plugin command to copy the events from a different map, but only if their conditions are met. For example: if you have an NPC that only shows up in a certain map after the player has defeated a certain boss. You can use this autostart event to only copy the NPC event if the boss was defeated. That way the event won't event exist in the map unless its needed.

Mhm, interesting tip, so.... If I put all these events in an unused map created just to contain them and then I call them by just one event on another map it will help?

When you go too general the answer really is: It depends
Yeah, I can understand this! 😅
I don't still have issues so I just thought of ask if there is a common "starting point" for these kind of problems.
I prefer to try to prevent rather than cure so I asked even if I haven't first hand's data 😢
If I put all these events in an unused map created just to contain them and then I call them by just one event on another map it will help?
no, because those other events will not exist.

there is only ONE map in memory. if you leave that map then all events on that map will be deleted to make space for the events of whatever other map will be loaded instead. Only common events in the database will be accessable at all times, and those have other limits.

I strongly suggest you learn more about the engine before making assumptions on how it works.
The starting point tutorial linked in my signature will point you to some of the tutorials for that.
no, because those other events will not exist.

there is only ONE map in memory. if you leave that map then all events on that map will be deleted to make space for the events of whatever other map will be loaded instead. Only common events in the database will be accessable at all times, and those have other limits.

I strongly suggest you learn more about the engine before making assumptions on how it works.
The starting point tutorial linked in my signature will point you to some of the tutorials for that.
I know that.
I specified in the first post that I use a CallEvent plugin to link map events.
Well, I didn't say it can even call events from a map not in use at the moment.

I.e. Player is on map 001.
Event 001 (map001) calls Event 004 from map 002.

This is what I meant...
What is this CallEvent plugin? Do you have a link?

Remember that just one event can cause lag. If you don't know how to design events well, even using the method you and Hudell mentioned (and I'm not sure if you are talking about the same thing - what he's referring to is quite advanced) isn't going to leave you any better off.
What is this CallEvent plugin? Do you have a link?

Remember that just one event can cause lag. If you don't know how to design events well, even using the method you and Hudell mentioned (and I'm not sure if you are talking about the same thing - what he's referring to is quite advanced) isn't going to leave you any better off.

That plugin you linked doesn't do what you want it to do. It erases everything on Game Over, not calls an event from another map onto the current map.
That plugin you linked doesn't do what you want it to do. It erases everything on Game Over, not calls an event from another map onto the current map.
It was a wrong link, already corrected
Sorry~
I'm not sure that plugin does what you think it does.

Hudell is talking about copying events from one map to another via a plugin - a kind of cloning/spawning thing, where the whole event (pages, conditions, graphics, etc) are all brought in.

The description on that plugin appears to indicate it only copies in the list of event commands, not multiple pages and not the sprites, conditions, etc. It likens them to having more common events, which again are just lists of commands.

Anyway, my point is still valid - even if it's ONLY copying in the list of event commands, it can still cause the same issues you'd have if you just used a map event instead of "calling" it from another map. In addition, you have to consider that only one map is loaded into memory at a time - if you "call" an event from another map, you have to wait for that other map to be loaded, and in MV, that isn't an instant thing, so you could even introduce lag by using a plugin like this.
I'm not sure that plugin does what you think it does.

Hudell is talking about copying events from one map to another via a plugin - a kind of cloning/spawning thing, where the whole event (pages, conditions, graphics, etc) are all brought in.

The description on that plugin appears to indicate it only copies in the list of event commands, not multiple pages and not the sprites, conditions, etc. It likens them to having more common events, which again are just lists of commands.

Anyway, my point is still valid - even if it's ONLY copying in the list of event commands, it can still cause the same issues you'd have if you just used a map event instead of "calling" it from another map. In addition, you have to consider that only one map is loaded into memory at a time - if you "call" an event from another map, you have to wait for that other map to be loaded, and in MV, that isn't an instant thing, so you could even introduce lag by using a plugin like this.
Clear, thank you for the clarification!
Then what kind of plugin can I use to do what hudell said?
Does it actually exist?
There are a few, but I'm only recommending that if you're actually having problems on a map filled with events. It should be an exception not something to do on every map as it can get a lot harder to manage.
There are a few, but I'm only recommending that if you're actually having problems on a map filled with events. It should be an exception not something to do on every map as it can get a lot harder to manage.
Ok!^^
I'll take a look if I can find something!
Thank you all for your answers! 🙏

Original thread: https://forums.rpgmakerweb.com/threads/how-map-events-affects-performances.126120/