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

Use room watching functionality to receive realtime daily challenge updates #28659

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Jun 28, 2024

2024-06-28.12-59-38.mp4

Also contains some drive-by fixes to issues I didn't spot before (music not playing, crash in breakdown on all initial zero counts, etc.)

Known deficiencies:

  • Showing score in the feed doesn't work - I need to do some results screen restructurings for this, will come in a separate pull
  • Leaderboard doesn't update. This is fixable using the following crude diff:
commit 535c8583f212bb750f043c11facc009107995ea7
Author: Bartłomiej Dach <dach.bartlomiej@gmail.com>
Date:   Thu Jun 6 11:06:22 2024 +0200

    leaderboard refetch (sponsored by "it's stupid but it works")

diff --git a/osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallenge.cs b/osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallenge.cs
index 933ab95ff5..65531aa174 100644
--- a/osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallenge.cs
+++ b/osu.Game/Screens/OnlinePlay/DailyChallenge/DailyChallenge.cs
@@ -345,6 +345,10 @@ private void onRoomScoreSet(MultiplayerRoomScoreSetEvent e)
                 {
                     breakdown.AddNewScore(ev);
                     feed.AddNewScore(ev);
+
+                    // TODO: this may not be the best idea.
+                    if (e.NewRank <= 50)
+                        Schedule(() => leaderboard.RefetchScores());
                 });
             });
         }

but (a) it probably needs a stagger lest we DDoS osu-web by doing this the naive way as above, and (b) I kinda do want to see if I can figure out a way to do this better in general because the leaderboard is by far the worst part of this screen (visually even) after these changes, so maybe I'll give it some time next week to see if I can steal a leaderboard design from somewhere else that could perhaps also enable dynamic updates without refetching the entire leaderboard.

If wanting to test locally, you must have osu-web, osu-server-spectator, and osu-queue-score-statistics (on queue watch) running in tandem.

@peppy peppy merged commit aa72c09 into ppy:master Jul 4, 2024
10 of 16 checks passed
@bdach bdach deleted the daily-challenge/integration branch July 5, 2024 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants