Skip to content

Conversation

@smoogipoo
Copy link
Contributor

@smoogipoo smoogipoo commented Oct 27, 2025

Fixes #35355

The code may look a bit hacky, but it is necessary due to the avatar proxying thus requiring two buffered containers.

2025-10-27.18-55-25.mp4
2025-10-27.19-09-08.mp4

@smoogipoo smoogipoo changed the title Show quit quick play users rather than removing them Show quick play users as quit rather than removing them Oct 27, 2025
@smoogipoo smoogipoo changed the title Show quick play users as quit rather than removing them Show quit quick play users rather than removing them Oct 27, 2025
@smoogipoo smoogipoo requested a review from a team October 27, 2025 10:27
@smoogipoo smoogipoo self-assigned this Oct 27, 2025
@bdach
Copy link
Collaborator

bdach commented Oct 27, 2025

You're probably not going to like me pointing this out, but visually it's a bit of a step down with buffered containers...

Screen.Recording.2025-10-27.at.12.11.37.mov
  • The major one is that the local player(?)'s yellow border is very looking very... square - I think this one is blocker tier
  • The scale transform effect on hover pretty clearly shows that this is a buffered container and not in a good way (downsampled avatars getting upsampled / blurry again) - maybe passable

bdach

This comment was marked as resolved.

Co-authored-by: Bartłomiej Dach <[email protected]>
@smoogipoo
Copy link
Contributor Author

I like your fix better than what I was going to do to fix it 👍

@smoogipoo
Copy link
Contributor Author

smoogipoo commented Oct 27, 2025

The scale transform effect on hover pretty clearly shows that this is a buffered container and not in a good way

We can possibly render the framebuffer at a higher scale. How does this look to you (visually)?

diff --git a/osu.Game/Screens/OnlinePlay/Matchmaking/Match/PlayerPanel.cs b/osu.Game/Screens/OnlinePlay/Matchmaking/Match/PlayerPanel.cs
index 6884312f3d..5c672828e5 100644
--- a/osu.Game/Screens/OnlinePlay/Matchmaking/Match/PlayerPanel.cs
+++ b/osu.Game/Screens/OnlinePlay/Matchmaking/Match/PlayerPanel.cs
@@ -137,6 +137,7 @@ private void load()
             Child = backgroundQuitTarget = new BufferedContainer
             {
                 RelativeSizeAxes = Axes.Both,
+                FrameBufferScale = new Vector2(1.5f),
                 Children = new[]
                 {
                     solidBackgroundLayer = new Box
@@ -189,6 +190,7 @@ private void load()
                                             Child = avatarQuitTarget = new BufferedContainer
                                             {
                                                 RelativeSizeAxes = Axes.Both,
+                                                FrameBufferScale = new Vector2(1.5f),
                                                 Child = new MatchmakingAvatar(User, isOwnUser: User.Id == api.LocalUser.Value.Id)
                                                 {
                                                     Anchor = Anchor.Centre,

@peppy
Copy link
Member

peppy commented Oct 28, 2025

I thought buffered containers will re-render on draw scale changes by default 🤔

@smoogipoo
Copy link
Contributor Author

It does... Could be pixel alignment maybe? Not sure.

@peppy
Copy link
Member

peppy commented Oct 28, 2025

The blurriness of all the text is from pixel alignment:

Before After
osu Game Tests 2025-10-28 at 06 21 00 osu Game Tests 2025-10-28 at 06 21 46

Enabling pixel alignment makes the positional changes look really bad, so it's not a solution.

The buffered container may not be redrawn at correct resolution DrawScale is not changing, since the scale is adjusted at a parent. Not 100% on this one.

@peppy
Copy link
Member

peppy commented Oct 28, 2025

@smoogipoo is there a reason why the avatar needs its own greyscale effect applied even though it's within the out buffered container?

@smoogipoo
Copy link
Contributor Author

@peppy The avatar needs its own buffered container because it's proxied out of the buffer and into a container that doesn't mask. And proxies follow the final draw tree.

@peppy
Copy link
Member

peppy commented Oct 28, 2025

🙈

peppy
peppy previously approved these changes Oct 28, 2025
@bdach
Copy link
Collaborator

bdach commented Oct 28, 2025

A few other things:

  • Maybe not relevant, but the "quit" state doesn't look right when the panel is in "avatar only" mode:

    Screen.Recording.2025-10-28.at.08.43.34.mov

    Said mode seemingly isn't used anywhere, though, so as I said, possibly irrelevant.

  • Avatar fades out instantly when PlayerPanelOverlay is transitioned to hidden state:

    Screen.Recording.2025-10-28.at.08.44.01.mov

    Not exactly sure why this is failing, but can be hacked around with

    diff --git a/osu.Game/Screens/OnlinePlay/Matchmaking/Match/PlayerPanel.cs b/osu.Game/Screens/OnlinePlay/Matchmaking/Match/PlayerPanel.cs
    index 0d5f36585c..dd012555f6 100644
    --- a/osu.Game/Screens/OnlinePlay/Matchmaking/Match/PlayerPanel.cs
    +++ b/osu.Game/Screens/OnlinePlay/Matchmaking/Match/PlayerPanel.cs
    @@ -368,6 +368,13 @@ private void updateLayout(bool instant)
                 }
             }
     
    +        protected override void Update()
    +        {
    +            base.Update();
    +
    +            avatarQuitTarget.Alpha = Alpha;
    +        }
    +
             protected override bool OnHover(HoverEvent e)
             {
                 Content.ScaleTo(1.03f, 2000, Easing.OutPow10);
    

@peppy
Copy link
Member

peppy commented Oct 28, 2025

Not exactly sure why this is failing, but can be hacked around with

I feel we may be taking these hacks to a level of too-hacky...

@peppy peppy self-requested a review October 28, 2025 09:26
@peppy
Copy link
Member

peppy commented Oct 28, 2025

@bdach have fixed the remaining two issues you found, will leave to you for final testing.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

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

:shipit:

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.

Quick play: "holes" in the leaderboard

3 participants