1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 18:12:56 +08:00

Reimplement Exponential scoring with a simpler and more intuitive calculation

Default for all rulesets for now.
This commit is contained in:
smoogipooo 2017-09-12 21:46:54 +09:00
parent d0774c7bc6
commit cc6bb81a73
2 changed files with 18 additions and 12 deletions

View File

@ -17,8 +17,6 @@ namespace osu.Game.Rulesets.Osu.Scoring
{ {
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject> internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject>
{ {
public readonly Bindable<ScoringMode> Mode = new Bindable<ScoringMode>(ScoringMode.Exponential);
protected override double ComboPortion => 0.7; protected override double ComboPortion => 0.7;
protected override double AccuracyPortion => 0.3; protected override double AccuracyPortion => 0.3;
@ -100,11 +98,5 @@ namespace osu.Game.Rulesets.Osu.Scoring
break; break;
} }
} }
public enum ScoringMode
{
Standardised,
Exponential
}
} }
} }

View File

@ -139,6 +139,8 @@ namespace osu.Game.Rulesets.Scoring
{ {
private const double max_score = 1000000; private const double max_score = 1000000;
public readonly Bindable<ScoringMode> Mode = new Bindable<ScoringMode>(ScoringMode.Exponential);
protected virtual double ComboPortion => 0.5f; protected virtual double ComboPortion => 0.5f;
protected virtual double AccuracyPortion => 0.5f; protected virtual double AccuracyPortion => 0.5f;
@ -222,10 +224,16 @@ namespace osu.Game.Rulesets.Scoring
if (judgement.AffectsAccuracy && judgement.IsHit) if (judgement.AffectsAccuracy && judgement.IsHit)
Hits++; Hits++;
switch (Mode.Value)
{
case ScoringMode.Standardised:
TotalScore.Value = TotalScore.Value =
max_score * (ComboPortion * comboScore / maxComboScore max_score * (ComboPortion * comboScore / maxComboScore + AccuracyPortion * Hits / MaxHits) + bonusScore;
+ AccuracyPortion * Hits / MaxHits) break;
+ bonusScore; case ScoringMode.Exponential:
TotalScore.Value = (comboScore + bonusScore) * Math.Log(HighestCombo + 1, 2);
break;
}
} }
protected override void Reset() protected override void Reset()
@ -236,4 +244,10 @@ namespace osu.Game.Rulesets.Scoring
comboScore = 0; comboScore = 0;
} }
} }
public enum ScoringMode
{
Standardised,
Exponential
}
} }