Score Information
TheScoreInfo class represents a single score (play) on a beatmap:
Core Score Properties
Score Components
Score Components
Score Values
Score Values
- TotalScore: Total points including mod multipliers
- TotalScoreWithoutMods: Base score without mod multipliers
- LegacyTotalScore: Preserved score for legacy plays
Accuracy & Combo
Accuracy & Combo
- Accuracy: Percentage accuracy (0.0 to 1.0)
- MaxCombo: Highest combo achieved
- Combo: Current combo (during gameplay)
Performance
Performance
- PP: Performance points awarded
- Ranked: Whether PP is counted toward player ranking
Score Ranks
Scores are assigned letter grades based on accuracy and performance:Rank Display
Ranks are typically displayed as letters (D, C, B, A, S, SS) with silver variants for Hidden mod plays.
Hit Statistics
Scores store detailed hit result statistics:Hit Results
Different hit results contribute to score differently:Hit Result Types
Hit Result Types
Perfect Hits
Perfect Hits
- Great: Perfect timing
- Perfect: Exact timing (in some modes)
Good Hits
Good Hits
- Ok/Good: Slightly off timing
- Meh: Poor timing but still hit
Misses
Misses
- Miss: Missed the object entirely
- SmallTickMiss: Missed a slider tick
- LargeTickMiss: Missed a large slider tick
Slider Components
Slider Components
- SliderTailHit: Hit the slider end
- SmallTickHit: Hit a slider tick
- LargeTickHit: Hit a large slider tick
Bonus
Bonus
- SmallBonus: Small bonus points (spinner ticks)
- LargeBonus: Large bonus points (spinner bonus)
Statistics Display
The system provides formatted statistics for display:Statistics are stored as JSON in the database and deserialized on demand for performance.
Score Versioning
The scoring system has evolved over time. Scores track their version:Version Tracking
The
TotalScoreVersion indicates which scoring algorithm was used. This allows:- Recalculating old scores with new algorithms
- Maintaining historical accuracy
- Gradual migration to new systems
Mods Applied
Scores track which mods were active during the play:- Score multiplier
- Difficulty
- PP calculation
- Rank eligibility
Mod Storage
Mod Storage
Internal Format
Internal Format
Mods are stored as JSON in the database:
Accessing Mods
Accessing Mods
Mods are automatically deserialized when accessed:
User Information
Scores track the player who set them:User Data
The system maintains both realm-stored user data and API user data for compatibility.
Beatmap Association
Scores are linked to beatmaps via hash matching:Scores may have a null
BeatmapInfo if:- The beatmap was deleted
- The beatmap was modified (hash changed)
- The beatmap isn’t available locally
BeatmapHash preserves the association even when BeatmapInfo is null.Online Identifiers
Scores can have multiple online IDs for different systems:Online ID Migration
- OnlineID: Used by osu!lazer and modern web
- LegacyOnlineID: Used by osu!stable and legacy systems
Replay Data
Scores can have associated replay files:Replay Access
Hit Events
During gameplay, detailed hit events are tracked:Hit events provide frame-by-frame accuracy data for advanced analysis but are not persisted to the database.
Score State
Scores track various state flags:Pauses
The system tracks when players paused during gameplay:Client Version
Scores record which version of the client was used:- Compatibility issues
- Feature availability
- Bug investigation
Score Cloning
Scores can be deep-cloned for various purposes:Clone Use Cases
- Displaying scores in UI without modifying originals
- Simulating score changes
- Testing score calculations
Score Import/Export
TheScoreManager handles score operations:
Score Management Operations
Score Management Operations
Importing Scores
Importing Scores
Import scores from replay files:
Exporting Scores
Exporting Scores
Export scores to replay files for sharing.
Downloading Scores
Downloading Scores
Download scores from online using
ScoreModelDownloader.Legacy Score Handling
The system supports legacy osu!stable scores:Legacy Support
- LegacyScoreDecoder: Reads old replay formats
- LegacyScoreEncoder: Writes old replay formats
- DatabasedLegacyScoreDecoder: Handles database-stored legacy scores
Display Formatting
Scores provide formatted display values:Use these formatted values in UI to ensure consistent display across the game.