Good Anti-Lag for parellel processes?

Ok intersting you 2.

I thought the Interpreter irretates through all the Events Every Frame in any case?

If that is true an extra update while switch change would be strange, because it would be checked in the next frame anyways!(?).
While that would be ideal, the engine doesn't know about that.

The logic is simple

1. Change Switch Value2. Tell engine that things need to be refreshedIt doesn't know anything about whether it's going to be called again in the near-future.As far as the engine is concerned, if a switch has changed, it wants to know that ASAP so it can update things accordingly so things are consistent for the player.
So if i change one switch value in 1Frame i have less updates

than when i Change 100?

Because if just one need to be changed to cause the update function to run before the next Frame, it would not matter if 1 or 100 Values are Changed, it would iterate through all anyways(?)

But

If every change switch command would call the update methode the moment it is running, than i understand you. (Is it this Case?)
So if i change one switch value in 1Frame i have less updates

than when i Change 100?

Because if just one need to be changed to cause the update function to run before the next Frame, it would not matter if 1 or 100 Values are Changed, it would iterate through all anyways(?)

But

If every change switch command would call the update methode the moment it is running, than i understand you. (Is it this Case?)
Simple test:

Code:
# Switch 1 is currently OFFChange Switch 1 = ONif Switch 1 is ON  # do somethingelse  Switch 1 is not ONend
Dont play Games with me, you quoted my question, so please answer it if you want to help someone who wants to understand 🙂
So if i change one switch value in 1Frame i have less updates

than when i Change 100?

Because if just one need to be changed to cause the update function to run before the next Frame, it would not matter if 1 or 100 Values are Changed, it would iterate through all anyways(?)

But

If every change switch command would call the update methode the moment it is running, than i understand you. (Is it this Case?)
Hello. You are correct in the first example, it doesn't matter if you change 1 or 100. When you change the state of a switch or a variable, the "need refresh" flag from $game_map is set to true. That flag is used in the update method from Game_Map to know if events must be refreshed before updating them:

def update(main = false) refresh if @need_refresh update_interpreter if main update_scroll update_events update_vehicles update_parallax @screen.update endThen, the flag is set to false in the refresh method:

def refresh @events.each_value {|event| event.refresh } @common_events.each {|event| event.refresh } refresh_tile_events @need_refresh = false endThat ensures that the method will only be called one time when needed, until a change of state for any switch or variable makes it necessary to call it again.
Thanks for the answer. I will get back to Codecademy starter workshop again, after that i hope they teach such stuff there too.
Also if you want to test performance issues, get a low end PC with crappy specs. That way you will see every little performance issue easily. On a high specs PC you might not see every issue.

I know, I have a crappy laptop, after all. 😀
Soooo...... the one i'm using now? 🙂

Spoiler

Original thread: https://forums.rpgmakerweb.com/threads/good-anti-lag-for-parellel-processes.36622/