Let us suppose we are concerned with the default event triggering system, where only players can trigger events.
Suppose you have a small, 17x13 map with 20 events, each with custom event ranges. Some of them have linear line of sight, while others have circular, triangular, or various shapes.
Whenever the player is in sight, the event that sees it will activate.
Now, both the player and the events can move around, so everytime someone makes a move, checks will need to be made.
When an event moves, only that event needs to check whether the player is in sight.
However, when the player moves, all events may potentially need to perform checks.
1. Assuming we have an efficient way to determine whether the player is within an event's range, what are some ways to avoid having to update every single event?
2. Furthermore, can the solution above be generalized to a system where any event can potentially trigger any other events?