Refactor scoring test scene for ruleset extensibility (and move existing instance to osu! ruleset project) #24821
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation of preparation for #23763
To work with the classic scoring algorithm, I want to get all rulesets under test coverage similar to the one we already had in
TestSceneScoring
. As it turns out after some checking I did on Wednesday, rulesets do wildly diverge in scoring behaviour, so I do believe that this wasn't a fruitless endeavour.To prepare for the above, this PR refactors a base class for the scoring tests that shall live in
osu.Game
, and moves the existing instance fromosu.Game.Tests
toosu.Game.Rulesets.Osu.Tests
(since it was really ever testing osu!-the-ruleset scoring anyways).In the end I decided to implement each score calculation independently and not reuse
LegacyScoreSimulator
s. That is mostly because the two have different goals and different levels of detail; the simulators are mostly concerned with perfect scores only, but handle all object types, while the scoring-test-local implementatons are concerned with non-perfect scoring too, but generally only handle the main object types (osu! hitcircle / taiko hit / catch fruit / mania note). That's because I don't think accurate replication there matters; classic scoring isn't going to match score V1 anyhow because of the constraints we placed on it (must be derived from standardised and not reorder scores), so the goal is to get the ballpark roughly correct.Aside from the refactoring, this also adds some extra bells & whistles, such as being able to set particular scenarios via test steps, as well as adjust the
SliderMultiplier
constant on-the-fly (previously hardcoded to convenient value).Apologies for the LoC here, but this should make it much easier to review subsequent changes.
Testing resources
osu-scoring-resources.zip contains a bunch of files, namely:
.osu
files that are beatmaps with particular test cases (all containing 100 objects).osr
files that correspond to replays set on beatmaps with the same name.txt
files containing extracts of stable total score after each judgement to cross-check.Six different test cases are provided:
ScoreV1Perfect
ScoreV2Perfect
ScoreV1MissesAt25And50
ScoreV2MissesAt25And50
ScoreV1MissesAnd100s
ScoreV2MissesAnd100s
which correspond to the test steps added to the scene. For cross-referencing, set
ScoreMultiplier = 3
in the test.Stable code for reference: