Skip to content

Native Tick Timers #1633

Open
Open
@alice-i-cecile

Description

@alice-i-cecile

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:

  1. Ensure API consistency and stability.
  2. Encourage beginners to use tick-timers for most gameplay, rather than more complex and flaky real-time timers.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TimeInvolves time keeping and reportingC-FeatureA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions