-
Notifications
You must be signed in to change notification settings - Fork 390
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
Add support for "freestyle" in multiplayer #11760
Conversation
From a schema design standpoint, as far as I can see,
Similarly, Thoughts? I know this entire series was prefaced as "bare minimum" / "make-work", but my feeling is that at present this change on its own is going a bit too far in that regard. |
i'd prefer this one as it's the most clear as to what's happening. |
One of the things I was going to do is exactly that, but as you might expect, the effects of doing so will run very deep. I'll leave it to the osu-web team to understand the full scope of what that will break, but be aware that it already guides what's shown in the lounge screen, the initial selection within the room, and also the playlist items in the queue which are incompatible with plain sets without an attached difficulty. The flow as it currently is "just works", but it will have to change dramatically if users are to be required to set an appropriate difficulty for themselves. Finally, I would have done that if song select allowed me to select sets. Doing that is a whole other can of worms, but the current state is such that song select must always display sets and difficulties, not one or the other. |
As a compromise couldn't/aren't you just allowing a difficulty selection and pulling the set ID out? I'm having a bit of a hard time understanding how song select display limitations would affect server-side implementation. |
It looks very silly to select a difficulty when the difficulty isn't used. The current form is already what I'd call a compromise, but it gives some purpose to the difficulty that hides what is otherwise possibly an imperfect UX. If you want a nullable
I think having a default difficulty is good. As I mentioned before, nothing really supports "sets". It's all based on whether you have the difficulty and of displaying the difficulty. This affects even internal components unseen to the user like Changing all of this is a monumental task, and gIven the above, I strongly feel having it as it is is a better direction. |
Hmm I see.. I can agree that having a default difficulty is probably going to make things easier to get this live (ie. it doesn't add another step where each user in the room needs to have a difficulty assigned, either by client or server) but it's also generally not how arcade games handle this (where difficulty selection is always explicit). But probably okay. If we go with this direction, I think there needs to be a way to mark that "freestyle" is turned on for an item, and that mark shouldn't be whether @bdach interested in your thoughts too |
As far as this concern goes, I don't think it's such a huge deal even if it looks imperfect.
I admittedly hadn't considered that part of it. I guess it'd need to be either what you have here which is an explicit choice by the playlist creator, or using the recommender as you say to just pick something. To that end I'm now a bit more convinced by what this PR is doing.
One concern I have is that the fact that the difficulty is default should probably somehow be conveyed to the user. I'm not sure how it would be done without annoying "tutorial" style popups, but the user should know what is happening when they pick a particular difficulty to avoid situations wherein someone thinks "hmm why should the difficulty matter" and then ends up picking a 1* slog nobody wants to play off of that logic alone. There is also stuff client-side like this, wherein the choice of the default difficulty effectively constrains the "freestyle" because some difficulties cease to be selectable due to discrepancy in gameplay duration. It's probably an edge case all things considered, but to me it is a very non-obvious interaction - when watching the video you posted in the OP I was completely baffled as to why other users couldn't actually switch to another difficulty (and it is - as far as I can tell - exactly due to this duration filtering).
I tend to agree with this. If the beatmap id being present is intended, then the beatmapset id is half-redundant and exposes us to data integrity issues (think beatmapset id not pointing at the set that beatmap with that beatmap id belongs to). I'd prefer a boolean flag as well if we're going with explicit default selection. |
I agree it's not the most intuitive interaction. Several options were brought up IRL:
Something brought up is that beatmaps these days apparently don't require all diffs to be of similar lengths, but outside of marathons/compilations I don't recall this being a thing and I hope it doesn't become a thing. Would like @peppy to confirm. Maybe I've missed other options...
Sure, I agree that this makes sense, and I'm not sure why I didn't go with that from the start. Will see how it goes and report back. |
I've applied modifications to use a Still awaiting @ppy/team-web to handle the TODO items in this PR's changeset, which I'm not immediately sure of how to change. |
I'd start with fixing/refactoring the score token validation, moving ruleset and beatmap checksum validation to the score token model itself instead of in two places (their respective multiplayer and solo controllers)... |
Ruleset id validation is done in ScoreToken.
Easier to understand.
I think the base todo is done.
This is currently a bit difficult due to how also consider that the whole data can be obtained from single beatmapset endpoint request... |
Yeah, ignore that feature request. The client results screen flow isn't really structured to support that right now but makes sense to do in a separate request as you suggest. |
@@ -171,6 +171,10 @@ private function assertValidRuleset() | |||
|
|||
private function assertValidMods() | |||
{ | |||
if ($this->freestyle && (count($this->allowed_mods) === 0 || count($this->required_mods) === 0)) { |
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.
Shouldn't these be !== 0
?
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.
yes indeed 🤨
The client currently doesn't post a That said, after adding it (and applying a fix for the comment above), I created a room and upon trying to start a play received:
This is on a playlist item with |
the beatmap_id is in line with solo play token requirement though. I can change it for multiplayer if you think it's not needed here. |
Ah, I missed that. In that case we can keep it, though I'm not sure about the above error... Do I need to change the request in any way? I noticed for solo scores it's part of the request URL: |
Hmm, I'm not sure about the above error, different (better) one this time:
|
no it's just different like that...
oh yeah that was my bad 👀 pushed a fix |
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.
All looks to work correctly now 👍
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.
migration can use a redate
@@ -21,6 +21,7 @@ | |||
* @property int $owner_id | |||
* @property int|null $playlist_order | |||
* @property json|null $required_mods | |||
* @property bool $freestyle |
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.
needs to be added into $casts
as well.
(unrelated to this, why is the mods
cast of this object
but DailyChallengeQueueItem
array
🤔 )
This is an MVP. @ppy/team-web please take this over.
I've added a new column
freestyle
, which, when set, indicates that players in the room are able to individually select their own choice of beatmap and ruleset.I've added some TODO comments in areas that need validation. Importantly:
multiplayer_playlist_item.beatmap_id
. (See here).osu_beatmap.playmode
or 0-3 for whenosu_beatmap.playmode == 0
). (See here).required_mods
/allowed_mods
should be kept empty for now.Feature request: The score controller (
rooms/{roomId}/playlist/{playlistItemId}/scores/{scoreId}
) should return a beatmap model for each score rather than just abeatmap_id
.