Skip to content

bug: Lobby countdown displays wrong time — ticks vs seconds mismatch #101

@TheMeinerLP

Description

@TheMeinerLP

Description

The lobby HUD displays "02:00" (120 seconds) when only 6 real seconds pass. The root cause is a ticks-vs-seconds unit mismatch: the phase duration is stored in ticks (e.g. 120 ticks = 6 seconds at 20 TPS) but the HUD formats it as if it were seconds.

Acceptance Criteria

  • The countdown displays the correct wall-clock time remaining (e.g. "0:06" for 120 ticks at 20 TPS)
  • The conversion `ticks / 20 = seconds` is applied before formatting
  • A shared utility method `TickUtils.toSeconds(long ticks)` is introduced to prevent future mismatches
  • Unit test covers the conversion and the display formatting

Technical Details

  • Bug is in the `GameHud` countdown formatter or the value passed to it from `LobbyPhase`
  • Check all phase duration constants for unit consistency (ticks vs seconds vs milliseconds)
  • `TimedPhase` (if used) stores duration — verify its unit contract

Dependencies

None

Estimate

S

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions