question

martinliu1993 avatar image
martinliu1993 asked

What API calls are needed in PlayFab hosted server vs self hosted server?

From what I understand, these are the calls required for a self hosted server on client and server side:

-Register Server

-Deregister Server

-RefreshHeartbeat

-Matchmake (Client)

-RedeemMatchMakerTicket

-NotifyMatchmakerPlayerLeft

It seems that if I were to have PlayFab host the server, I don't need to call Register/DeregisterGameServer, and also I don't need to send heartbeats.

But server still has to call RedeemMatchMakingTicket. Since the server doesn't call RegisterGame, there is no LobbyId. Where would I get the LobbyID I need to redeem the ticket?

apisMatchmakingCustom Game Servers
10 |1200

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

1 Answer

·
martinliu1993 avatar image
martinliu1993 answered

On a 2nd look, it seems that the client needs to pass both the ticket and the lobbyId from the client to the server when redeeming match making ticket. the client receives both from the result of the MatchMake call

7 comments
10 |1200

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

brendan avatar image brendan ♦♦ commented ·

The client must pass up their ticket, but the LobbyId is actually part of the command line info sent to the server when it is started (have a look at the "game_id" parameter - https://api.playfab.com/docs/tutorials/landing-tournaments/custom-game-servers).

0 Likes 0 ·
martinliu1993 avatar image martinliu1993 brendan ♦♦ commented ·

Suppose I were using a self hosted server, then do I just pass up the lobbyId to the client that I got on the server from the result of "RegisterGame"?

0 Likes 0 ·
brendan avatar image brendan ♦♦ martinliu1993 commented ·

Oh! Sorry, yes - I was obviously thinking of servers hosted with us. For externally hosted servers, you do get the LobbyId back from the call to RegisterGame. So that would indeed be the one to use.

0 Likes 0 ·
Show more comments

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.