Like say I have an event that just moves around, or maybe a blank even that is meant for something else. Should I set them to parallel? Or would an empty parallel event cause lag?
Should I set empty events to parallel?
RPG Maker MZ SupportIf there's nothing in the event, why would you need to make it a parallel process?
if it should move around otherwise, use "Action Button" and custom move route.
Move Routes are some kind of parallel on its own, but doesn't run the page.
Move Routes are some kind of parallel on its own, but doesn't run the page.
It feels neater to me. I figure using "action button" could cause some sort of issue if a player tries to activate an event with no actions. I prefer it for my own workflow. But if it causes lag then I don't want to do it, obviously.
So instead, your solution is to have it run automatically by using parallel, not even requiring the player to possibly hit the action button? If the event is blank, pressing the action button won't do anything. Parallel however will try to run the event 60 times per second. It's not much, but it's still using some processing power.
it will cause some lag.
If a process is set to parallel process, then the contents are triggered every frame of the game loop - that is sixty times per second.
even if the content is empty, the interpreter will have to check that before abandoning the event again.
an action button event on the other hand is only triggered if the player actually presses the action button from a trigger position instead of every frame.
and as said above, autonomous movement is independent of the content. Only if there is content to be processed the autonomous route will reset after the content.
Edit: ninja'd
If a process is set to parallel process, then the contents are triggered every frame of the game loop - that is sixty times per second.
even if the content is empty, the interpreter will have to check that before abandoning the event again.
an action button event on the other hand is only triggered if the player actually presses the action button from a trigger position instead of every frame.
and as said above, autonomous movement is independent of the content. Only if there is content to be processed the autonomous route will reset after the content.
Edit: ninja'd
How? If it has no commands to be executed, then necessarily nothing will happen when the player presses the action button.
But if you set it to parallel, then you're specifically telling the game to load it up 60 times a second. And then nothing will happen, but you're making your game do work that's unnecessary.
Edit: Double ninja power!
I want to be a ninja! But I'm too late to the game.
I am still new, but I only use a Parallel event when I want that event to run on its own and do something while other stuff is happening.
I can't think of a time when I would make an empty event a parallel. But maybe my old age has hindered my imagination.
I am still new, but I only use a Parallel event when I want that event to run on its own and do something while other stuff is happening.
I can't think of a time when I would make an empty event a parallel. But maybe my old age has hindered my imagination.
Don't do it
Oh, ok. Well I guess I just didn't fully understand how parallel events worked. I thought that if the event was blank the parallel just did nothing. But so it's actually like activating 60 frames a second?
yes, because the engine doesn't know that it is empty - it has to open it every time to learn that it is empty.
All RMs are interpreted engines, not compiled ones - only a compiler can analyse and shortcut code, an interpreter can only work step by step and doesn't remember that it did the same steps before.
It is actually exactly the opposite of what you thought.
If the trigger is Action Button, the interpreter will only check for commands to run if the player interacts with it.
If the trigger is Parallel, the interpreter will check on every frame to see if there's a command to run, and when it reaches the bottom of the command list (which it will do every frame if there are no commands), it tells it to start over at the top.
You SEE nothing, but the event is very busy behind the scenes. Not so with an Action Button event.
So only use Parallel (and Autorun) if you actually have commands that you want run the moment the event becomes active (via its conditions, or as soon as the player enters the map if there are no conditions).
If you just want an event to move around, set it to Action Button and give it a Move Route (in the panel on the left side, not in the event commands).
I've even seen people set an event to parallel process for smoke coming out of a chimney. If you just want an event to animate but not move, set it to Action Button and turn on Stepping Animation (assuming the animation is from left to right).
Ok, thanks y'all :] I'm glad I asked before I was months into making every blank event a parallel event XD
Original thread: https://forums.rpgmakerweb.com/threads/should-i-set-empty-events-to-parallel.156986/