-
Notifications
You must be signed in to change notification settings - Fork 8
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
Redesign find sessions using SearchCriteria #22
Redesign find sessions using SearchCriteria #22
Conversation
The `MatchmakeSessionSearchCriteria` is intended to be compared with the original session to find valid sessions. Thus, we can remove the `SearchCriteria` field that we are storing internally and instead compare values with the session. With this, we implement comparing attributes by default, unless game-specific checks are defined, in which case the attribute search gets overriden. This allows overriding region-locked matchmaking. This also allows removing session creation that requires search criteria `CreateSessionBySearchCriteria` and instead move everything to `CreateSessionByMatchmakeSession`. We can also remove the cleanup of search criteria, since it's redundant considering we allow game-specific checks. Friends-only matches are also now supported, and requires setting the `GetUserFriendPIDs` handler on `MatchmakeExtension`. This improves accuracy finding sessions and is how Rambo's MK8 server is implemented. Tested successfully with: - Mario Kart 7 - Steel Diver: Sub Wars - IRONFALL Invasion
I will give this a deeper review later on Friday when I'm back home. However I will say now, I agree with moving the logger to the globals. Not having access to the logger in some cases is not great |
session.GameMatchmakeSession.MatchmakeParam.Parameters["@SR"] = nex.NewVariant() | ||
session.GameMatchmakeSession.MatchmakeParam.Parameters["@SR"].TypeID = 3 | ||
session.GameMatchmakeSession.MatchmakeParam.Parameters["@SR"].Bool = true | ||
|
||
session.GameMatchmakeSession.MatchmakeParam.Parameters["@GIR"] = nex.NewVariant() | ||
session.GameMatchmakeSession.MatchmakeParam.Parameters["@GIR"].TypeID = 1 | ||
session.GameMatchmakeSession.MatchmakeParam.Parameters["@GIR"].Int64 = 3 |
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.
This is more just a curiosity than anything, but do we know what purpose these serve?
The official NEX server assigns them (and the Tri-Force Heroes server assigns even more than this), but I've yet to find any client using (or requiring) them.
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.
I don't think we know the exact purpose, but they are assigned by the server when creating a session on every title I remember so far
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.
I know that Modern Warfare II uses SR
to mean "Skill Rating" which is used to determine which rank you are and get matched with. I wonder if this is something similar? I know MW2 is not a NEX, or even WiiU, game but I wonder if the terminology is the same/similar? @SR
being true
meaning that "Skill Rating" is used when match making, and @GIR
(Gathering IDK Rating?) is whatever rank?
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.
I know that Modern Warfare II uses
SR
to mean "Skill Rating" which is used to determine which rank you are and get matched with. I wonder if this is something similar? I know MW2 is not a NEX, or even WiiU, game but I wonder if the terminology is the same/similar?@SR
beingtrue
meaning that "Skill Rating" is used when match making, and@GIR
(Gathering IDK Rating?) is whatever rank?
I could buy that if the types were the same, but that isn't the case. It could be something similar though
This allows us to log inside the matchmaking globals.
Alright, the loggers have been moved to the globals! |
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.
Looks really solid from what I can tell!
No issues that I can see! (LGTM ;P) |
Yes, it should be! I'll wait if @jonbarrow has anything else to say and then it can be merged |
Merge away 👍 |
The
MatchmakeSessionSearchCriteria
is intended to be compared with the original session to find valid sessions. Thus, we can remove theSearchCriteria
field that we are storing internally and instead compare values with the session.With this, we implement comparing attributes by default, unless game-specific checks are defined, in which case the attribute search gets overriden. This allows overriding region-locked matchmaking.
This also allows removing session creation that requires search criteria
CreateSessionBySearchCriteria
and instead move everything toCreateSessionByMatchmakeSession
.We can also remove the cleanup of search criteria, since it's redundant considering we allow game-specific checks.
Friends-only matches are also now supported, and requires setting the
GetUserFriendPIDs
handler onMatchmakeExtension
.This improves accuracy finding sessions and is how Rambo's MK8 server is implemented.
Aside from that, I'm considering moving the logger to the globals, so that we can log from
globals
.Tested successfully with: