Event drawing/processing distance

Hi guys! Sorry to bother with this noob question, but I've searched through the forum to find an answer to my doubt and wasn't able to find any.

Is there a way to change the distance in which events are drawn/processed?

My problem is with a rather large sprite. It's 5x5 tiles and when the user aproaches it from avobe, then the sprite kind of apears out of nowhere.

I understand that if the distance of event processing is increased that would mean that more events would be processed simultaneously and thus creating more lag, but that is a risk I'm willing to take.

Any help is welcome! And thank you on advanced!
you need to search for the so-called anti-lag scripts.

disabling event processing over a distance is an anti-lag feature, and of the five or six scripts for anti-lag that existed years ago there were several that could both exclude specific events and modify that range in general. I just don't know which of those scripts are still around because a lot of the links in the Ace Master Script List go to deleted websites.
Because this is handled by code, you will need a script to change it.

Try the following - it is untested so report back if you get any errors.

Code:
class Game_Event < Game_Character
  def near_the_screen?(dx = 17, dy = 13)
    ax = $game_map.adjust_x(@real_x) - Graphics.width / 2 / 32
    ay = $game_map.adjust_y(@real_y) - Graphics.height / 2 / 32
    ax >= -dx && ax <= dx && ay >= -dy && ay <= dy
  end

  def near_the_player?
    sx = distance_x_from($game_player.x).abs
    sy = distance_y_from($game_player.y).abs
    sx + sy < 25
  end
end

Note, because this is expanding the border around the screen within which events will become active (and visible), you may see a performance impact.
Because this is handled by code, you will need a script to change it.

Try the following - it is untested so report back if you get any errors.

Code:
class Game_Event < Game_Character
  def near_the_screen?(dx = 17, dy = 13)
    ax = $game_map.adjust_x(@real_x) - Graphics.width / 2 / 32
    ay = $game_map.adjust_y(@real_y) - Graphics.height / 2 / 32
    ax >= -dx && ax <= dx && ay >= -dy && ay <= dy
  end

  def near_the_player?
    sx = distance_x_from($game_player.x).abs
    sy = distance_y_from($game_player.y).abs
    sx + sy < 25
  end
end

Note, because this is expanding the border around the screen within which events will become active (and visible), you may see a performance impact.
Wow! This worked beautifully! Yeah, the performance dropped a bit, but that was expected. I'll have to be careful with the amount of events in my maps.

Sorry for my ignorance, but how many tiles have you increased the "range" of event processing?

Obviously I cannot thank you enough for this!
5 tiles. This is what was originally in those methods:

Code:
class Game_Event < Game_Character
  def near_the_screen?(dx = 12, dy = 8)
    ax = $game_map.adjust_x(@real_x) - Graphics.width / 2 / 32
    ay = $game_map.adjust_y(@real_y) - Graphics.height / 2 / 32
    ax >= -dx && ax <= dx && ay >= -dy && ay <= dy
  end

  def near_the_player?
    sx = distance_x_from($game_player.x).abs
    sy = distance_y_from($game_player.y).abs
    sx + sy < 20
  end
end

You could try just increasing them by 3 instead of 5 (because they already allowed 2), so change dx to 15, dy to 11, and sx + sy < 20 to 23.

I've moved this thread to RGSS3 Script Requests. Thank you.

5 tiles. This is what was originally in those methods:

Code:
class Game_Event < Game_Character
  def near_the_screen?(dx = 12, dy = 8)
    ax = $game_map.adjust_x(@real_x) - Graphics.width / 2 / 32
    ay = $game_map.adjust_y(@real_y) - Graphics.height / 2 / 32
    ax >= -dx && ax <= dx && ay >= -dy && ay <= dy
  end

  def near_the_player?
    sx = distance_x_from($game_player.x).abs
    sy = distance_y_from($game_player.y).abs
    sx + sy < 20
  end
end

You could try just increasing them by 3 instead of 5 (because they already allowed 2), so change dx to 15, dy to 11, and sx + sy < 20 to 23.
Oh I see, thank you so much Shaz! that's exactly what I was looking for! Have a great day!
Moved to: RGSS3 Script Requests
Sorry for that. Didn't know I needed a script. Will do next time!

Original thread: https://forums.rpgmakerweb.com/threads/event-drawing-processing-distance.119551/