1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-24 05:27:22 +08:00
osu-lazer/osu.Game.Tests
Bartłomiej Dach 7c65a9de75
Fix Score V1 simulation in scoring test scene incorrectly applying multiplier
`TestSceneScoring` included a local simulation of stable's Score V1
algorithm. One of the parts of said algorithm is a mysterious
"score multiplier", influenced by - among others - the beatmap's drain
rate, overall difficulty, circle size, object count, drain length,
and active mods. (An implementation of this already exists in lazer
source, in `OsuLegacyScoreSimulator`, but more on this later.)

However, `TestSceneScoring` had this multiplier in _two_ places, with
_two_ distinct values, one of which being 1 (i.e. basically off).
Unfortunately, the place that had 1 as the multiplier was the wrong one.

Stable calculates the score increase for every hit in two stages;
first, it takes the raw numerical value of the judgement, but then
applies a combo-based bonus on top of it:

    scoreIncrease += (int)(Math.Max(0, ComboCounter.HitCombo - 1) * (scoreIncrease / 25 * ScoreMultiplier));

On the face of it, it may appear that the `ScoreMultiplier` factor
can be factored out and applied at the end only when returning total
score. However, once the above formula is rewritten as:

    scoreIncrease = scoreIncrease + (int)(Math.Max(0, ComboCounter.HitCombo - 1) * (scoreIncrease / 25 * ScoreMultiplier));
                  = scoreIncrease * (1 + (Math.Max(0, ComboCounter.HitCombo - 1) / 25 * ScoreMultiplier))

it becomes clear that that assumption is actually _incorrect_,
and the `ScoreMultiplier` _must_ be applied to every score increase
individually.

The above was cross-checked experimentally against stable source
on an example test map with 100 objects, and a replay hitting them
perfectly.
2023-09-12 21:33:26 +02:00
..
2023-07-06 13:37:43 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2023-05-02 11:55:05 +03:00
2022-12-01 18:48:25 +01:00
2023-06-24 01:00:03 +09:00