1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 02:17:46 +08:00
osu-lazer/osu.Game.Tests/Visual
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 Rename NormalSliderBar.cs to RoundedSliderBar.cs 2023-02-02 17:24:45 +01:00
Background Ensure background of gameplay is black when storyboard is overriding background display 2023-08-02 15:50:15 +09:00
Beatmaps Add animation support for beatmap status pills 2023-09-06 15:04:25 +09:00
Collections Add test coverage showing commit failure in manage collections dialog 2023-06-04 12:50:30 +09:00
Colours Automated pass 2023-06-24 01:00:03 +09:00
Components Partial everything 2022-11-27 00:00:27 +09:00
Editing Rename SliderVelocity to SliderVelocityMultiplier to distinguish from Velocity 2023-09-06 19:01:08 +09:00
Gameplay Fix Score V1 simulation in scoring test scene incorrectly applying multiplier 2023-09-12 21:33:26 +02:00
Menus Fix star fountain directions not matching stable 2023-08-21 17:59:24 +09:00
Mods Automated pass 2023-06-24 01:00:03 +09:00
Multiplayer Add more test coverage to multi spectator screen 2023-08-16 17:14:42 +09:00
Navigation Add failing test coverage of selection not being retained on song select 2023-08-28 10:05:59 +02:00
Online Adjust naming of component to give more context 2023-09-12 15:43:59 +09:00
Playlists Automated pass 2023-06-24 01:00:03 +09:00
Ranking Crudely fix crashes when switching between TestResultsWithPlayer cases 2023-07-13 19:06:02 +02:00
Settings Fix broken test 2023-07-13 22:28:26 +02:00
SongSelect Merge pull request #24723 from bdach/beatmap-carousel-split-missing-status 2023-09-06 09:35:38 +02:00
UserInterface Adjust various class naming and add some xmldoc 2023-09-12 17:15:16 +09:00
TestMultiplayerComponents.cs Partial everything 2022-11-27 00:00:27 +09:00
TestSceneOsuScreenStack.cs Rename AllowTrackAdjustments to more understandable ApplyModTrackAdjustments 2023-07-25 20:20:53 +09:00