-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 star rating to the beatmap metadata in player loading screen #12717
Conversation
Follows the way working beatmap is passed, not sure why mods are passed as a bindable though, don't wanna bother too much with that.
the test scene is showing a one-frame flicker when the mods are starting to display. 2021-05-08.14-34-06.mp4you can slow down to 0.1x or something to see it better. |
osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapMetadataDisplay.cs
Outdated
Show resolved
Hide resolved
osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapMetadataDisplay.cs
Outdated
Show resolved
Hide resolved
background.Colour = difficulty.DifficultyRating == DifficultyRating.ExpertPlus | ||
? ColourInfo.GradientVertical(Color4Extensions.FromHex("#C1C1C1"), Color4Extensions.FromHex("#595959")) | ||
: (ColourInfo)colours.ForDifficultyRating(difficulty.DifficultyRating); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not super sure about the lack of any sort of fade out transition here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to clarify, you mean fading colours of the background?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that, and the text sprites
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added proper transitioning along with rolling counter for the star rating display, I can imagine cases where the difficulty would need time to calculate before its shown, which would look bad on the player UX if it hides and shows back, moving the entire metadata flow back and forward.
CleanShot.2021-05-08.at.23.10.03.mp4
Not sure on the design of the placeholder though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this was added in this PR, but it's weird due to the font being right aligned and not fixed width.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using fixed-width made it look really weird so I refrained from doing that, and I thought it wasn't that big of a change to split it, but can do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it's affecting a global component and you've updated it in a local usage. There's nothing to say you actually checked how this works in every other usage.
I'm not saying it should be fixed width, but if anything it should not be right aligned and should definitely not affect the size of the parent container to the point it's bouncing around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure about how to fix this, I've checked fixed-width one more time to record a video of it and the results are indeed not appealing: (especially with 1.23
due to font being right-aligned as you mentioned)
CleanShot.2021-05-10.at.07.37.51.mp4
Also fixing the width of the star rating display to 60px makes it look a bit questionable:
CleanShot.2021-05-10.at.07.49.16.mp4
The StarRatingDisplay
in general looks to be designed to not be changeable and make the numbers roll around, not sure how to proceed forward without leaving this as-is (or going with the second option of fixing width to 60px).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed width looks okay I think. If it's decided it doesn't then the numbers should not roll in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't update all the time, only when the difficulty calculation is heavy, so I think it's fine to remove the rolling altogether and call it a day for this design.
Avoids first frame discrepancies from appearing in the test scene, those can be delt with later on, if needed.
Resolved with initial fade in on test scenes, the underlying issues can be dealt with later on. (if I were to suggest a temporary resolution, the fading container in |
} | ||
|
||
[Test] | ||
public void TestRandomFromDatabase() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really not sure about adding more test scenes which depend on the local beatmaps to function correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added it to check how metadata would look on real local beatmaps, and I imagined it to be useful for others (especially when it comes to tweaking the design).
unless you think it's better not to rely on local databases all the time and always go with the option of adding programmatically written beatmaps.
Makes no sense to add a test intended to test visual behaviour with one of the main elements missing. Not sure how you would be able to test the flow with the logo's presence.
I've made some preliminary changes to the test scene to make it behave more like how it does within the game. Also added back the logo. |
FWIW I've added the ruleset steps to be able to see the difficulty changing in the beatmap metadata display, simulates the case where star difficulty for a certain beatmap may take some time before the calculation finishes. But it's a small benefit and can only be useful in the |
Make a test specifically for the star difficulty display, in the same PR where you split that functionality out. Also make sure it's done in a way it doesn't cause the test scene to display nothing on first load. You probably want one |
Just to be extra clear, can you elaborate more on that? do you mean writing a new test scene that hooks up a star rating display to a bindable difficulty from the cache, on a written beatmap, to ensure it works? |
That's the same thing as not setting difficulty initially and then setting it later after a delay, right? In that case, why not just skip interfacing with any beatmaps or difficulty caches whatsoever - or am I misunderstanding the intent? |
That is right, but I don't want to hack around with the |
It's fine as is, but this PR still needs the removal of the animated counter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine for now
Shouldn't guard against that here.
Closes #12414
StarRatingDisplay
#12747Went with the simplest way of adding a
StarRatingDisplay
, as desired in the issue thread, looks harmonious enough.CleanShot.2021-05-08.at.11.33.54.mp4
(in case it isn't obvious, this is from a test scene, not from game)