1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 04:23:14 +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>
{
public readonly Bindable<ScoringMode> Mode = new Bindable<ScoringMode>(ScoringMode.Exponential);
protected override double ComboPortion => 0.7;
protected override double AccuracyPortion => 0.3;
@ -100,11 +98,5 @@ namespace osu.Game.Rulesets.Osu.Scoring
break;
}
}
public enum ScoringMode
{
Standardised,
Exponential
}
}
}

View File

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