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

Refactor classic osu!catch combo counter and place it in HUD overlay #26253

Closed
wants to merge 27 commits into from

Conversation

frenzibyte
Copy link
Member

@frenzibyte frenzibyte commented Dec 30, 2023

Also adjusted vertical position of legacy catch combo counter to roughly match stable (basically center).

"Closest" anchor is disabled for the combo counter since using an anchor that's not on the left side will break the calculation of the X position (also X position is calculated automatically so it doesn't make sense to change the anchor rather than locking it).

Preview:

CleanShot.2023-12-30.at.06.38.43-converted.mp4

@frenzibyte frenzibyte changed the title Refactor legacy catch combo counter and place it in HUD overlay Refactor classic osu!catch combo counter and place it in HUD overlay Dec 30, 2023
if (drawableRuleset != null)
{
var catchPlayfield = (CatchPlayfield)drawableRuleset.Playfield;
X = Parent.AsNonNull().ToLocalSpace(catchPlayfield.Catcher.ScreenSpaceDrawQuad.Centre).X;
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not 100% sure about this performance-wise, but it looks to work seamlessly.

Copy link
Member

@peppy peppy Aug 19, 2024

Choose a reason for hiding this comment

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

Probably okay. Minor refactor applied for legibility.

@peppy peppy self-requested a review August 9, 2024 06:55
@peppy peppy force-pushed the refactor-catch-combo-counter branch from 8125428 to 8fd296d Compare August 19, 2024 08:46
@peppy peppy force-pushed the refactor-catch-combo-counter branch from eacb0d0 to a982519 Compare August 19, 2024 10:07
peppy
peppy previously approved these changes Aug 19, 2024
@frenzibyte frenzibyte force-pushed the refactor-catch-combo-counter branch from 80b5a7e to f944ac5 Compare August 19, 2024 11:16
Fixes catch editor saving test scene dying to the project referencing
`osu.Game.Tests` which entails referencing all rulesets at once
@bdach
Copy link
Collaborator

bdach commented Aug 20, 2024

Android project compile failures here

@peppy peppy self-requested a review September 30, 2024 10:13
@peppy
Copy link
Member

peppy commented Sep 30, 2024

I've brought this up-to-date. Probably needs second eyes at some point (low priority I guess), since I was involved in making this bearable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is back again? I nuked it previously in #29838 because it was bugged... (see #29727)

Copy link
Member

Choose a reason for hiding this comment

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

That is going to make this PR harder to fix up, yeah.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in 85f0134

Comment on lines 69 to 70
var catcher = ((CatchPlayfield)drawableRuleset.Playfield).Catcher;
X = Parent!.ToLocalSpace(catcher.ScreenSpaceDrawQuad.Centre).X;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do wonder about this. Maybe it's fine for now, but I do recall that people have asked for things to be easily attachable to the catcher ("things" being an accuracy counter or something). Due to that I'd be wondering at this stage whether we want to have a SkinnableContainer rooted at the catcher or something for that express purpose.

Probably not something that is required to be acted upon immediately for merge, just food for thought maybe.

Copy link
Member Author

@frenzibyte frenzibyte Oct 30, 2024

Choose a reason for hiding this comment

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

Pretty interesting suggestion. It can't be applied at the moment however, as the available skin layers are defined at a ruleset-agnostic level (see GlobalSkinnableContainers).

@peppy peppy added the blocked Don't merge this. label Oct 23, 2024
@frenzibyte
Copy link
Member Author

I've removed LegacyComboCounter again, but I've stumbled across a very harsh bug caused by "floating fruits" mod.

Since the combo counter is no longer tied to the drawable ruleset, it will not be flipped alongside the catcher and all other components without hacks implemented. I've tried to handle this in cfc8b78 but the implementation is quite unbearable, especially since I've came to realise this PR is purely a code-quality refactor with the small addition of allowing the combo counter to be moved vertically.

I personally think it is a better choice to close this PR and revisit it later when rulesets are allowed to create their own skinnable containers (so that we can have a "Catcher" layer that moves alongside the catcher and is flipped accordingly, combined with UprightAspectManintaingContainer to keep the content of the counter upright).

Closing as such. Can be reopened if anyone thinks otherwise.

@frenzibyte frenzibyte closed this Nov 3, 2024
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