Simple question about "Too Many Events"

Good evening folks, I have a pretty simple question that I wanted to ask before I set forth on working tonight.

I have a map which is a maze with walls that shift at particular moments. These walls were made of of individual events that just switched on and off. Each event had a graphic with a stepping animation. Across a couple hundred events, the map got extremely laggy. I ditched it and looked for a new solution.

Instead of creating walls made up of ~12 events each, I designed bigger animated sprites and built the walls out of four events, effectively cutting my event count by 2/3. Unfortunately the only impassable part of the wall is where the event is actually placed, so I still have to place empty events where the wall is impassable. This pretty much raises my event count to where it was before.

My question is, even if the event count is the same, does the fact that a majority of these events are completely empty and just act as invisible barriers reduce the lag versus a map where an animation is occurring in each and every one?

I'd like to find out before I rebuild this whole maze. If there's no lag reduction then I'll go back to the drawing board and find a different solution.

Thanks!
The events lag would have been reduced; however, you would have gained a small amount of lag from showing a larger image. so its swings and roundabouts - so to speak.

Your best solution would be to use some kind of anti lag script, that doesnt update events unless you are within [x] range. This would stop events from running when they are outwith the screen etc and should dramatically reduce lag.

Edit::

To answer your question, the events would still be updating, so yes, they still use processing power and cause lag if too many are used.
Hey Valamore.

You might want to consider looking into region tag/terrain tag scripts. I haven't used them myself, but from what I've seen that they are capable of, then I am sure they could simply make a tile impassable along with there numerous other possible effects.

You could set a region to impassable using some of these scripts and that would take out the empty events for the sole purpose of making something impassable.

I believe (but I'm not sure) that some of the scripts allow for switch requirement for their effects to take place if the passability changes during the events.

Hope that can help reduce the lag man!

~ Dinhbat
Thanks for the replies! I'm currently building the new version with the larger animated sprites and... so far it looks like there MIGHT be a reduction in lag. I'll definitely look up the anti-lag script, as that sounds like it could come in handy.

I considered using some regions or terrains, however my knowledge base doesn't cover how to use those effectively yet, especially with the minimal amount of scripting know-how I have. I'll have to hit the books on that one.
Here are a few scripts that seem pretty plug and play friendly. Their uses vary but check them out =D

Yanfly's Common Event Tiles

Shaz's Region Common Events

Galv's Region Effects

Neon Black's Terrain Tags

They all have the ability to call common events which will take events off your map.

~ Dinhbat
Thanks for the links! I looked through these scripts - most of them have to do with calling common events that occur when you step ON a tile in a region ID. I'd like to find a solution that just sets a region ID to impassable. This sounds simple enough but I guess I'm having a hard time putting two and two together on this one.
yanfly done a script like that, that enables restrictions on event / player passability via region tags.
I think this is the script you're referring to:

http://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/

This does exactly what I want it to, however it seems to be absolute. "This region ID is always impassable." As I have walls turning on and off, I need to be able to change the passability of a region on the fly. The cheap way of doing this is to just make two maps, one for each phase of the maze, and keep transferring back and forth between them. It's kind of a cheap trick though. Alas, at my current skill level, this is probably how I'll have to tackle it. 🙂

EDIT: Used this script and split the map into two maps with seamless transfers when I needed the maze to "shift". Drastically reduced my event count and the map is now lag-free and operational! Huzzah! Thanks for pointing me in the right direction.
one more alternative would be Tsukihime's tileswap script, that allows you to modify the tile in the map itself during the game.


No more need for events to change a wall to a floor, and if you use a few tricky options with a special tileset you can even reduce the number of script calls neccessary...

Original thread: https://forums.rpgmakerweb.com/threads/simple-question-about-too-many-events.26147/