question

dylan-1 avatar image
dylan-1 asked

OSS SDK: Bare minimum flow?

PF staff made it clear that there are no docs for the OSS SDK beyond installing the plugin for best practices, entry points, examples, etc. However, it would at least be great to know what the bare minimal flow is since we are forced to make [possibly incorrect] assumptions --

Say, to init and sub to a match found delegate? I already found the entry point for a start:

  1. Do I need to init the SDK? Call what NS::Func()?

  2. For matchmaking, seems like we can use FOnlineSubsystemPlayFab::Get()->GetSessionInterface() to get IOnlineSessionPtr type. Within here, what do the callback names map to? The names are completely different than the C++ example. For example, what is the OSS Function called that represents PFMatchmakingTicketGetMatch?

Perhaps if I had only the answer to these 2 questions, I can figure out the rest; plus, because there are no docs, it would also be nice to have the basic OSS questions answered here to exist for someone else to Google later; better than nothing!

apissdksunrealdocumentation
10 |1200

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

Neils Shi avatar image
Neils Shi answered

Do I need to init the SDK? Call what NS::Func()?

Initialization is still needed. However, this will be done by PF OSS. After adding below code (details please view PlayFab Online Subsystem (OSS) Quickstart - PlayFab | Microsoft Learn)

 [OnlineSubsystem]
 DefaultPlatformService=PlayFab

UE OnlineSubsystemModule will create online subsystem instance for PlayFab and initialize SDK. All you need to do is get the IOnlineSessionPtr with GetSessionInterface method. Then you can refer to Online Subsystem Session Interface in Unreal Engine | Unreal Engine 5.0 Documentation to learn how to use OSS. PF OSS layer works seamlessly on top of the existing base platform OSS layers (such as the base GDK OSS layer provided by Epic for Xbox and PC Game Pass). It's designed to be used behind the IOnlineSession interface provided by Epic.

For example, what is the OSS Function called that represents PFMatchmakingTicketGetMatch?

Epic doesn't provide such interface. Thus, there is no OSS Function represents PFMatchmakingTicketGetMatch. And with OSS, there is no need to call PFMatchmakingTicketGetMatch. As Epic's doc said,

The OnMatchmakingComplete delegate is fired when matchmaking is complete. This provides a bool specifying whether the process was successful and the name of the session to join in that case.

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

[Comments won't allow a lengthy body, for some reason]

rnvZN7G.png

(1) Unfortunately, the init solution you guided me to seems to call a private member - perhaps this can be called in the C++ SDK, but not the OSS SDK; again, these are very different SDKs and reinforces the fact that we need separate PF docs.

This is only the beginning of the rabbit hole - it's just infinite research due to lacking docs and mismatching naming -- PF OSS is a wrapper of the C++ SDK that has completely different naming/conventions/init/behavior/flow than your raw C++ SDK.

(2) According to your C++ SDK - vastly different from the OSS SDK variant of C++ - we were instructed to call PFMultiplayerInitialize and PFMultiplayerSetEntityToken.

To further add to the Init issues, PFMultiplayerSetEntityToken doesn't seem to exist at all within the SDK, if following your C++ doc as you say.

Again, not only the naming is different, but the behavior is different: Where do we need to PFMultiplayerSetEntityToken()? If we don't need to, again - that's something you need to let us know. Need it? How do you expect your users to find it if the name doesn't match even similarly? You ask us to follow the docs -- the Init was named differently, so we assume the SetEntityToken is named differently too. Once again, you send your users on a wild goose chase; an infinite spiral of undocumented code.

(3) Again, there is no PFMatchmakingTicketGetMatch() call in the OSS: This is buried in HandleMatchmakingTicketCompleted (where completed can have multiple meanings). This isn't even an OSS call we personally make, but PF handles, so we have to dive deeper into the rabbit hole to find what this actually calls. Turns out to be a similar-named Completed OSS call that returns a Session name that could be anything. Apparently it's a static_cast<const PFMatchmakingTicketCompletedStateChange&>(StateChange).

From here, we need to dive into HandleMatchmakingTicketCompleted to see what the callback param actually includes since you didn't rename or comment it; it's just SessionName, which is what when referring to PF? MatchmakingTicketId? MatchId? Something else? We need to dive deeper.

[...] or TL;DR: You folks are forcing your users to dive down an infinite rabbit hole to avoid any form of responsibility of docs or knowledge about how this works in the OSS; just the C++ SDK. There are no online docs, no inline docs, no name maps for PF:OSS terms, no online. Again, it would be like if the docs to React (a JS wrapper) were merely a link to JavaScript if their SDK stripped any and all docs/comments. "Just look at the JavaScript docs if you want to learn React" would have had quite the reaction.

You folks represent Microsoft, now: If an actual Microsoft rep inspected this (I'm MCA/MCP certified, myself - documenting and commenting is emphasized anytime and always), they would absolutely scold the person that made that repo and tried to pass off the internal C++ SDK docs as the OSS SDK docs without even considering the lack of inline documentation.

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

Here's an alt answer:

The matchmaking docs suggest you implement the marketplace sdk then add OSS for event callbacks to prevent polling, but this is actually (once again) a stale doc that's incorrect:

https://discord.com/channels/684463257276121192/803421812352090112/1072941704744796320

The marketplace sdk and the OSS sdk have 0 interactions together; callbacks won't work. Even if you implement OSS, the big caveat no one seems to tell you is that it's for local matchmaking (solo queue) only! If you plan to have premades, OSS will not work for you, from what I can tell.

Stick with the marketplace SDK and poll with the Multiplayer::Matchmaking API.

(!) To clarify further: Client/Matchmaking API is obsolete/broken (since there is no GameMode, so it will never work on newer accounts). The docs don't tell you this.

(!) To clarify further: Matchmaker API is obsolete/broken (since there is no GameMode, so it will never work on newer accounts). The docs don't tell you this.

(!) To clarify further: The entire Client/ API is deprecated ("v1"), even though the Unreal quickstart starts you here (at immediately-deprecated APIs). The docs don't tell you this.

[There are a few related posts I'm going to copy+paste this to; hope that's ok -- clarifies so much]

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.