-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28636 from bdach/daily-challenge/watch-room
Add client/server models for allowing clients to receive realtime playlist updates
- Loading branch information
Showing
8 changed files
with
139 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using MessagePack; | ||
|
||
namespace osu.Game.Online.Metadata | ||
{ | ||
[MessagePackObject] | ||
[Serializable] | ||
public class MultiplayerPlaylistItemStats | ||
{ | ||
public const int TOTAL_SCORE_DISTRIBUTION_BINS = 13; | ||
|
||
/// <summary> | ||
/// The ID of the playlist item which these stats pertain to. | ||
/// </summary> | ||
[Key(0)] | ||
public long PlaylistItemID { get; set; } | ||
|
||
/// <summary> | ||
/// The count of scores with given total ranges in the room. | ||
/// The ranges are bracketed into <see cref="TOTAL_SCORE_DISTRIBUTION_BINS"/> bins, each of 100,000 score width. | ||
/// The last bin will contain count of all scores with total of 1,200,000 or larger. | ||
/// </summary> | ||
[Key(1)] | ||
public long[] TotalScoreDistribution { get; set; } = new long[TOTAL_SCORE_DISTRIBUTION_BINS]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using MessagePack; | ||
|
||
namespace osu.Game.Online.Metadata | ||
{ | ||
[Serializable] | ||
[MessagePackObject] | ||
public class MultiplayerRoomScoreSetEvent | ||
{ | ||
/// <summary> | ||
/// The ID of the room in which the score was set. | ||
/// </summary> | ||
[Key(0)] | ||
public long RoomID { get; set; } | ||
|
||
/// <summary> | ||
/// The ID of the playlist item on which the score was set. | ||
/// </summary> | ||
[Key(1)] | ||
public long PlaylistItemID { get; set; } | ||
|
||
/// <summary> | ||
/// The ID of the score set. | ||
/// </summary> | ||
[Key(2)] | ||
public long ScoreID { get; set; } | ||
|
||
/// <summary> | ||
/// The ID of the user who set the score. | ||
/// </summary> | ||
[Key(3)] | ||
public int UserID { get; set; } | ||
|
||
/// <summary> | ||
/// The total score set by the player. | ||
/// </summary> | ||
[Key(4)] | ||
public long TotalScore { get; set; } | ||
|
||
/// <summary> | ||
/// If the set score is the user's new best on a playlist item, this member will contain the user's new rank in the room overall. | ||
/// Otherwise, it will contain <see langword="null"/>. | ||
/// </summary> | ||
[Key(5)] | ||
public int? NewRank { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters