The PlayFab Multiplayer SDK also provides APIs for PlayFab Matchmaking. * For more information on C++ APIs, see the Matchmaking SDK quickstart. * For more information on Unity APIs, see the Quickstart for Unity * For more information on Unreal APIs, see the Quickstart for Unreal
Prerequisites
You need a PlayFab account to use PlayFab Lobbies. For instructions to create an account, see Quickstart: Game Manager.Download and set up the PlayFab Multiplayer SDK
Download the C/C++ SDK for your platform and integrate the provider header and library files into your build.This quick start focuses on using the C/C++ SDK. For Unity and Unreal interfaces, see the following articles: * Quickstart for Unity * Quickstart for Unreal
Log in a PlayFab entity
To use the PlayFab Lobby SDK, you need to authenticate your client using PlayFab entity keys and entity tokens. Acquire a PlayFab entity key and token pair by logging in with LoginWithCustomId REST API. This API is also available as a C/C++ projection via the PlayFab Services SDK.LoginWithCustomId is a quick way to get started with PlayFab features but is not intended to be the login mechanism you ship with. For login guidance, see Login basics and best practices.
Initialize the PlayFab Multiplayer SDK
Initialize the PlayFab Multiplayer SDK by following these basic steps:- Initialize the SDK by calling PFMultiplayerInitialize
- Set the entity key and token used by the library on behalf of your players by calling PFMultiplayerSetEntityToken.
Create a lobby
Finally, we’ll create a lobby by following these basic steps:- Call PFMultiplayerCreateAndJoinLobby
- Check for asynchronous completion by periodically polling PFMultiplayerStartProcessingLobbyStateChanges for a PFLobbyCreateAndJoinLobbyCompletedStateChange.
Next steps
- Find and join a lobby
- Invite another player to a lobby
- Use lobby properties to coordinate a game session
