Skip to content

Tournament Service English

LA edited this page Jul 3, 2026 · 1 revision

Tournament Service (English)

中文 | English | Architecture Overview

What It Is

The Tournament Service provides local multi-score real-time comparison. It pre-loads historical scores in the song select screen, builds timeline caches, and during gameplay drives the Three-Pillar HUD or Leaderboard to compare the current play against historical "ghosts" in real-time — no network connection, no spectate room needed.

Comparison with Official Lazer / Other Solutions

Aspect Official Lazer Traditional BMS (e.g. LR2) Ez2Lazer Tournament Service
Score Comparison Online spectate only (needs Spectator connection) Local best score side-by-side Local ghost comparison, no network needed
Timing Real-time spectate stream Replay only Pre-loaded in song select → real-time in-game
Comparison HUD Leaderboard bar (results screen only) Custom-built (hardcoded) Three-Pillar / Leaderboard dual HUD, adjustable in skin editor
Pause Awareness Spectator follows host clock None Ghost auto-freezes on game pause (via official GameplayClock)
Multiple Score Sources Other players only Local best only Mod-filterable, up to 10 entries, sortable
Sort Metrics Total score only Total score only Theoretical max / Total score / ACC / Combo / Miss count
Cache None None LRU 3 maps + timeline isolation cache

Core Concept: Ghost Comparison

Song Select
  │  EzScoreRaceService pre-loads historical scores
  │  LRU cache (max 3 maps, 300ms debounce)
  ▼
Gameplay
  │  HUD components create EzScoreRaceTimelineScoreProcessor
  │  Bind to ghost state
  │  Query timeline per frame by GameplayClock
  ▼
EzHUDScoreCompareBars  /  EzHUDScoreRaceLeaderboard
  Three-Pillar Comparison      Leaderboard List

Ghost

A ghost is "a past score play." Each ghost contains:

  • Score metadata (mods, judgement mode, etc.)
  • Pre-built timeline snapshot array
  • Bindable properties for live score/ACC/combo/miss count (updated per frame by Processor)

Processor

Per-frame flow:

  1. ReferenceClock.CurrentTime → current game time
  2. QueryAtTime(clockTime) → fetch snapshot from timeline
  3. Update Bindable values (auto-skips if value unchanged — no unnecessary event chains)

HUD Components

Component Description
Three-Pillar HUD (EzHUDScoreCompareBars) Current play + 2 comparison ghosts, BMS-style vertical bar comparison
Leaderboard (EzHUDScoreRaceLeaderboard) Multi-ghost list (up to 10), supports sorting and mod filtering

See HUD Widgets - Tournament Components.

What This Means for Players

  • No network needed for comparison: Enable Three-Pillar HUD or Leaderboard in settings to compare current play against historical best or same-mod best
  • Three bars: Current play ("Now") plus two historical ghosts selected by criteria (highest ACC, highest score)
  • Mod filtering: Only shows ghosts matching the current mod combination — Easy mode scores won't mix with NoMod
  • Flexible sorting: Sort by total score, ACC, Combo, Miss count, or theoretical max

Key Concepts for Developers

  • EzScoreRaceService: Global background service, Component lifecycle = process-level, exposes state via IBindableDictionary<string, EzScoreRaceState>
  • EzScoreRaceState: Complete state snapshot of one ghost, containing ScoreInfo, Timeline, Bindable live values
  • EzScoreRaceTimelineScoreProcessor: Created per HUD component, binds to one ghost state and drives updates against reference clock
  • EzScoreRaceGhostTimelineMode: Available comparison modes: None / HitEvents(legacy) / ManiaSession(primary)
  • Data flow: EzScoreRaceService → States → Processor → HUD Bindable, all on game main thread

Access Points

  • Settings → HUD to enable Three-Pillar HUD or Leaderboard
  • Skin editor to adjust position and appearance
  • Press Ctrl+F10 in-game to open skin editor for real-time adjustment

Related Links

Clone this wiki locally