-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Native Tick Timers #1633
Copy link
Copy link
Open
Labels
A-TimeInvolves time keeping and reportingInvolves time keeping and reportingC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useX-Needs-SMEThis type of work requires an SME to approve it.This type of work requires an SME to approve it.
Description
What problem does this solve or what need does it fill?
Tick based timers are timers that operate not on real time, but on the number of state updates that occur. Each state update constitutes a "tick".
For any timer that does not update outside a game session, a tick based timer is preferred. This makes games more consistent and replayable (which also means they are easier to debug).
From the bevy_tick_timers crate.
There are three arguments for moving this in-tree IMO:
- Ensure API consistency and stability.
- Encourage beginners to use tick-timers for most gameplay, rather than more complex and flaky real-time timers.
- Allow us to use tick-timers internally, such as for delayed state chart transitions (see Add remaining State Chart functionalities to States #1597).
What solution would you like?
Borrow from @maplant's solid foundation and create a Bevy drop-in-replacement for ordinary real-time timers.
What alternative(s) have you considered?
Continue to rely on a third-party library. I've argued above why I think this is inferior.
Additional context
None.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-TimeInvolves time keeping and reportingInvolves time keeping and reportingC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useX-Needs-SMEThis type of work requires an SME to approve it.This type of work requires an SME to approve it.