-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Rewrite osu!taiko playfield adjustment container to keep playfield height constant #26631
Conversation
I honestly don't have much clue about this one but doing so matches master.
Children = new Drawable[] | ||
{ | ||
new Container | ||
{ | ||
Name = "Elements before hit objects", | ||
RelativeSizeAxes = Axes.Both, | ||
FillMode = FillMode.Fit, |
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.
This line alone sells me on this PR.
Y = height; | ||
Y = relativeHeight; | ||
|
||
Scale = new Vector2(Math.Max((Parent!.ChildSize.Y / 768f) * (relativeHeight / base_relative_height), 1f)); |
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 pretty sure this can be simplified, but not going to attempt that until we're first in a good state (ie. your PRs merged + #25919 is resolved).
As mentioned on discord, |
This arose from #26615 and few discord discussions.
Up until now, osu!taiko's playfield scaling was completely dependent on each component inside it, which was suboptimal for essential components like the "input drum", requiring to set a fill aspect ratio to appear correctly across different game resolutions.
Not only was it an issue with sizing, but also with offsetting components. To properly have a constant gap applied between the input drum and the hit target position, the hit target would have to have an X position that's proportionate to the input drum's width (because the input drum's width changes based on the game resolution, because the playfield height changes based on the game resolution, etc.).
Not to mention
TaikoPlayfield
having to apply the container paddings per update andLegacyInputDrum
needing to scale itself.All of this is now gone and simplified by simply making
TaikoPlayfieldAdjustmentContainer
directly upscale the playfield instead of changing its height.Worthy of note that despite everything seemingly working well, there are changes like fa2c33c which I'm frankly not 101% sure how they contribute to the correctness of the new logic, but it makes this PR match master on all different aspect ratios, therefore I pushed it.
Comparison with no mod (
osu!
is latest release,osu!development
is this PR):CleanShot.2024-01-20.at.00.29.50-converted.mp4
Comparison with classic mod:
CleanShot.2024-01-20.at.00.31.37-converted.mp4