question

Greggory Addison avatar image
Greggory Addison asked

PlayFab OSS for Unreal Engine Matchmaking Questions

Some questions about using the PlayFab OSS Matchmaking.

1st. If we have a lobby created (with friends) and we want to matchmake with them (which in the multiplayer api theres an array called "MembersToMatchWith") How are they included? I'm looking at the StartMatchmaking Function on the MatchmakingInterfacePlayFab.cpp and when creating a ticket it doesnt fill a Members To match with variable. But in the SessionInterface function you pass in a TArray of FUniqueIds of local players (I'm guessing this is for something like split screen).

2nd. What call back do we subscribe to in order to get the matchmaking state update notifications? I see in the function they update the state to creating ticket but I lose the trail of when the state changes to match found or searching (To update UI). Right now I have a custom function bound to the built in FOnMatchMakingComplete delegate.

3rd. When a match is found is there a function in the OSS that will get the match found and allow us to use that data to join a server instance? Or is it best to use the function bound to the delegate (FOnMatchMakingComplete) to call the multiplayer api "GetMatch" and then run the joining logic from there?

4th. Can someone write some documentation to help this process out? I would like to know which call backs I need to register to make matchmaking smooth and actually take advantage of the real time notifications because with the multiplayer api I was continuously calling "GetMatch" until the match was found then using the details from that result to join a server. I would also like to see code examples of a matchmaking system written with this plugin. Could be simple, just really need to see the flow of the code. Anyone who hasn't spent time doing this already can easily get lost and since this is my first multiplayer game I have zero experience.

apissdksunrealmultiplayerMatchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rick Chen avatar image
Rick Chen answered

Quoting our expert’s answer from Discord channel so that other users can see:

1. Yes, this flag is only used for all local players only, the scenario you are looking for cannot be acheived with Epics OSS interface definitions. The limitation of passing FUniqueIds for remote players is not supported on StartMatchmaking API. outside of the OSS, using C++/REST directly, you can acheive this using the concept defined here (https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/matchmaking/config-examples#standard-4v4-style-skill-based)
2. for OSS there is nothing you can subscribe to, as the Epic's interface only allows you to get callback when matchmaking is completed (success or failure)

3. This is the limitation of the PlayFab implementation, the SDK was recently updated to return ServerDetails from Multiplayer Server (if enabled), we are working on bringing this to PlayFab OSS.

4.For using the OSS, you will need to refer to Epic's documentation for using OnlineSubsystem interfaces, however we have a well documented usage of C++ SDK here (https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/matchmaking/quickstart-client-sdk) however not everything can be used due to Epics OSS limitation.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dylan-1 avatar image
dylan-1 answered

For #4: OSS docs are vastly different than PF's implementation. The doc link is literally a C++ SDK example doc; nothing close to the actual OSS implementation -- with different naming conventions, no comments, different behavior, different flow, different namespaces; it's more like saying "Learn React by looking at js docs!"; it does not help.

However, after tons of research, it seems like PF's OSS is incredibly limited. You can only solo queue or matchmake locally (eg: someone beside you IRL like a console game). There is 0 interaction with the marketplace SDK (since I saw you mention MembersToMatchWith).

We need to poll the status from GetMatchmakingTicket() from the marketplace plugin multiplayer::matchmaking.

More here:

https://community.playfab.com/questions/68312/oss-examples-best-practices-matchmaking-events.html?childToView=68569#answer-68569

I wish PF staff would just update the docs; it's come to a point of ridiculous nature that there are 5 APIs, 2 are obsolete, 1 is barely functional with no event callbacks like the obsolete apis, and the other 2 have strict limitations that almost no one's use-case will likely follow unless you're console only.

The docs are an absolute mess (or lacking completely).

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.