Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in-gameplay rank display indicating minimum/maximum achievable rank #28614

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

normalid-awa
Copy link
Contributor

I've added a feature to the rank display component that allows displaying the maximum and minimum ranks. It works similar to the accuracy display, where we have a maximum and minimum value shown for accuracy. I implemented this feature in the rank display, so now it can show both the minimum-achievable and maximum-achievable ranks.

In order to enable the rank display component to utilize this functionality, I have added two new properties, MinimumRank and MaximumRank, to the ScoreProcessor class.

sorry for the bad English :(

Preview:

2024-06-25.22-47-35.mp4
2024-06-25.21-57-35.1.mp4
Even though the new Osu! update has been implementing the rank display update but I think it's good to implement the max. and min. achievable rank display. Just like how the accuracy did.It allows players to actually see what rank they can if they mess up at the following or what rank they can achieve if they get all perfectly.

@bdach
Copy link
Collaborator

bdach commented Jun 26, 2024

Would you mind explaining what is going on with #28583 getting closed and then this getting opened?

@normalid-awa
Copy link
Contributor Author

Would you mind explaining what is going on with #28583 getting closed and then this getting opened?

I'm sorry for that, my repo master branch get out of sync and I don't know how to fix it. So that I deleted my repo, but I don't know it will cause the pr getting close, so I copy all the change and make a new pr

@bdach
Copy link
Collaborator

bdach commented Jun 26, 2024

@normalid-awa
Copy link
Contributor Author

normalid-awa commented Jun 26, 2024

Please read https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

It seems that my master branch is currently ahead of the osu! branch. But I accidentally merged my feature branch into the master branch, and it appears that the action to undo was not explicitly outlined in the documentation. sorry again for causing confusion.

osu.Game/Rulesets/Scoring/ScoreProcessor.cs Outdated Show resolved Hide resolved
osu.Game/Rulesets/Scoring/ScoreProcessor.cs Outdated Show resolved Hide resolved
osu.Game/Screens/Play/HUD/DefaultRankDisplay.cs Outdated Show resolved Hide resolved
@normalid-awa
Copy link
Contributor Author

+        private Bindable<ScoreRank> rankBinding = new Bindable<ScoreRank>();

this binding was added to the rank display component, as they handle the rank display update.

@normalid-awa normalid-awa requested a review from bdach June 27, 2024 13:47
@normalid-awa normalid-awa marked this pull request as draft June 29, 2024 10:07
@normalid-awa normalid-awa marked this pull request as ready for review June 29, 2024 10:24
@normalid-awa normalid-awa requested a review from bdach July 3, 2024 13:03
@normalid-awa normalid-awa marked this pull request as draft July 3, 2024 14:01
@normalid-awa normalid-awa marked this pull request as ready for review July 3, 2024 14:24
@frenzibyte frenzibyte changed the title Enhance Rank Display: Showing Maximum and Minimum Achievable Ranks Add in-gameplay rank display indicating minimum/maximum achievable rank Jul 9, 2024
@frenzibyte frenzibyte self-requested a review July 9, 2024 11:13
Copy link
Member

@frenzibyte frenzibyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest is fine, all previous concerns look to be correctly resolved now.

osu.Game/Rulesets/Scoring/ScoreProcessor.cs Outdated Show resolved Hide resolved
@frenzibyte
Copy link
Member

I get notifications for any change you make, there's no need to request review, it's adding more noise to my end.

@normalid-awa
Copy link
Contributor Author

I get notifications for any change you make, there's no need to request review, it's adding more noise to my end.

sorry for that, I didn't know the changes can trigger the notification

It's made to work for a single specific case, it shouldn't be scattered
all over the class.
frenzibyte
frenzibyte previously approved these changes Jul 10, 2024
Comment on lines +407 to +410
// this arbitrarily only fills HitResult.Miss because it's the only hit result that can affect the state of RankFromScore in the main rulesets (see OsuScoreProcessor).
// eventually (whenever it's needed), other miss result types should be correctly filled and this dictionary should be updated regularly next to ScoreResultCounts,
// but this is sufficient for now.
minimumAccuracyResultCounts[HitResult.Miss] = MaxHits - JudgedHits + ScoreResultCounts.GetValueOrDefault(HitResult.Miss);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppy/team-client requesting review for the addition of this part in particular to resolve #28614 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too hacky to live imo. The remaining results should be populated so that this is in a sane state.

Also I'm not even convinced this is right - what if some of the remaining judgements are IgnoreMiss, for example?

@frenzibyte frenzibyte requested a review from a team July 10, 2024 21:37
@frenzibyte
Copy link
Member

Please do not merge master branch, it adds unnecessary noise to our notification inbox.

Comment on lines +407 to +410
// this arbitrarily only fills HitResult.Miss because it's the only hit result that can affect the state of RankFromScore in the main rulesets (see OsuScoreProcessor).
// eventually (whenever it's needed), other miss result types should be correctly filled and this dictionary should be updated regularly next to ScoreResultCounts,
// but this is sufficient for now.
minimumAccuracyResultCounts[HitResult.Miss] = MaxHits - JudgedHits + ScoreResultCounts.GetValueOrDefault(HitResult.Miss);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too hacky to live imo. The remaining results should be populated so that this is in a sane state.

Also I'm not even convinced this is right - what if some of the remaining judgements are IgnoreMiss, for example?

public partial class TestSceneOsuScoreProcessor : OsuTestScene
{
[Test]
public void TestMinimumRankNeverReachesSRank()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should read "never reaches S rank before completion". That should have test coverage too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe should make the minimum rank calculations separate into a virtual method, and can be overwritten when needed, (e.g. the situation that misses or others can affect the rank)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants