Skip to content

feat(race): synchronized countdown start and live position/timer HUD #169

@TheMeinerLP

Description

@TheMeinerLP

Description

All players in a Race Mode session must start simultaneously via a shared 3-2-1-GO countdown. Movement and ring collision are suppressed before the GO signal. The HUD gains a live elapsed-timer action bar and a race position display.

Acceptance Criteria

  • A 3-2-1-GO countdown is broadcast to all players in the lobby phase before map start
  • Player movement and elytra launch are blocked until the GO signal fires
  • Ring collision events are ignored until the GO signal fires
  • After GO, an elapsed timer displays in the action bar (format: `MM:SS.ms` or `SS.ms`)
  • A race position display shows each player's current place (e.g. `1 / 4`) and gap to the leader
  • `HudComponent` is extended to carry timer and position state
  • Countdown is implemented in `MinestomLobbyPhase` or a dedicated `CountdownPhase`
  • Timer starts at the exact tick the GO signal fires (consistent across all players)
  • Unit tests cover countdown sequence and freeze/unfreeze transitions
  • Minestom testing framework used for phase-level tests

Technical Details

  • The freeze mechanic must not interfere with camera movement (look direction remains free)
  • Position ranking is recomputed every tick based on rings completed, then elapsed time as tiebreaker
  • `HudComponent` is a Java record; use a builder or `with*()` pattern for updates
  • The GO signal is a server-side event dispatched via the phase system, not a client packet race

Dependencies

Estimate

M

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgameplayGameplay mechanicsplayer-feelGame feel, feedback timing, or player experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions