1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 14:27:51 +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
..
Audio Remove the nullable disable annotation in the test project. 2022-07-31 22:02:07 +08:00
Beatmaps Bring realm library up-to-date 2023-07-06 13:37:43 +09:00
Chat Add some extra text coverage against potential emoji-to-link misparses 2023-07-13 20:51:52 +02:00
Collections/IO Automated pass 2023-06-24 01:00:03 +09:00
Database Rename new flag and update xmldoc to match 2023-08-21 19:36:22 +09:00
Editing Rename SliderVelocity to SliderVelocityMultiplier to distinguish from Velocity 2023-09-06 19:01:08 +09:00
Extensions Add own fixed copy of defective Humanizer methods 2022-07-18 21:37:31 +02:00
Gameplay Add test coverage of Judged state 2023-07-05 18:44:27 +09:00
Input Automated pass 2023-06-24 01:00:03 +09:00
Localisation Automated pass 2023-06-24 01:00:03 +09:00
Models Make ScoreInfo.BeatmapInfo nullable 2023-07-04 14:50:34 +09:00
Mods Add test coverage for mod equality with multiple settings 2023-05-04 20:46:27 +02:00
NonVisual Add test cases covering full phrase case insensitivity 2023-06-27 21:50:39 +02:00
Online Automated pass 2023-06-24 01:00:03 +09:00
OnlinePlay Automated pass 2023-06-24 01:00:03 +09:00
Resources Update framework and apply changes to support masking SSBO 2023-08-22 12:50:13 +09:00
Rulesets Remove redundant nullable suppression directives 2023-06-07 08:20:41 +03:00
Scores/IO Automated pass 2023-06-24 01:00:03 +09:00
ScrollAlgorithms Automated #nullable processing 2022-06-17 16:37:17 +09:00
Skins Merge branch 'master' into hud/kc-skinnable 2023-06-25 15:42:08 +02:00
Testing Add missing ruleset shader tests 2023-05-02 11:55:05 +03:00
Utils add tests for GetNextBestFilename() 2022-12-01 18:48:25 +01:00
Visual Fix Score V1 simulation in scoring test scene incorrectly applying multiplier 2023-09-12 21:33:26 +02:00
ImportTest.cs Automated pass 2023-06-24 01:00:03 +09:00
osu.Game.Tests.csproj Re-centralise BannedApiAnalysers nuget package 2023-02-11 19:36:40 +09:00
tests.ruleset Exclude tests from ConfigureAwait rule 2021-03-08 14:36:35 +09:00
WaveformTestBeatmap.cs Refactor IWorkingBeatmap.Background to GetBackground() 2023-06-08 16:19:32 +09:00