Closed flyxiv closed 1 month ago
-> All skill, player, ticker, status are event producers - When these event entities are used, they produce lists of events tha to the event queue, with the time that each event is scheduled to execute.
The queue is a sorted array that always gets the first(= earliest) happening event in the queue and makes the entity responsible for the queue to handle the event.
The entity produces new events as they handle the current event.
While combat_time < finish_time {
next_event = event_queue.pop();
// the event adds new events to the queue as they are executed.
execute_event(next_event);
}
All the instance/partywise events that affect the combat. Player GCD, Skill usage, Skill Damage Infliction, Tickers, etc.
To properly simulate this game, we need to change from turn-based design to event-driven design