Event-driven execution of a schedule
tigregalis opened this issue · 0 comments
In addition to Fixed and Always ScheduleRunners, provide an EventDriven variant, which could make use of Bevy's Events system to determine when it should run.
Main use-cases: turn-based games of various types, such as rogue-likes. In a turn-based game, the "game tick" is not time-based but event-based, i.e. it is in response to some action taken by a player. The idea here is that you could write gameplay code that simply advances the game state from turn N to turn N+1, no different to advancing from frame N to frame N+1 for rendering, or simulation tick N to simulation tick N+1 for physics, but this would be decoupled from the rendering / input itself so it would be fully interactive.
Looking through your code, I believe there may be some overlap between this approach and the manual runner approach you're looking into. Although I believe both would be useful to have, I believe an event-driven approach may cover a great many of the use-cases that a manual runner approach would be useful in. As events are a first-class Bevy system, this event-driven approach could be fairly easy not only to implement, but especially for end-users to make use of in their games.