question

eswitzer07 avatar image
eswitzer07 asked

Using NotifyMatchmakerPlayerLeft and RedeemMatchmakerTicket

Just looking to get some clarification on the NotifyMatchmakerPlayerLeft and RedeemMatchmakerTicket functions when using a playfab hosted server (non-external)

For both of these functions, the LobbyID is required, but AFAIK there is no way to get the lobbyID from within Unreal without registering the game (which seems to be done automatically when hosting through playfab).

Am I mistaken here? Should Playfab hosted servers be registered as well? How would I pass in relevant data for Region and Server Host (since those are handled by playfab)

Right now I've been using the matchmaker without taking player counts into notice, and would like to shift over to properly tracking players joining / leaving the instance.

Thanks in advance for any clarification.

Cheers!

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

·
joehot200 avatar image
joehot200 answered

my understanding was that playfab custom game servers didn't need to be registered, only external servers needed registering.

When you upload a custom server build, you have tick boxes in the playfab web interface where you can select the regions the server runs in.

As soon as you tick a tick box, a server will start running. For example if you tick euwest, a server on the EU west region will automatically start running.

Edit: did you mean, how do you know the region within your game code? The answer to that is that it is passed through with the launch parameters.

2 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.

eswitzer07 avatar image eswitzer07 commented ·

This is my assumption too. My question is more of the use of NotifyMatchmakerPlayerLeft and RedeemMatchmakerTicket for use in player lobby tracking since a server autohosted by playfab won't return a lobbyID and thus those functions can't be used.

Looking for clarification around that. Good to know I'm not the only one not registering servers when hosting through playfab.

Cheers!

0 Likes 0 ·
brendan avatar image brendan eswitzer07 commented ·

Have a look at this tutorial: https://api.playfab.com/docs/tutorials/landing-tournaments/custom-game-servers. The Lobby ID is passed into the server as the "game_id" by default. That is the ID you should pass into those calls (which, yes, should be used to add the player to the session and then remove them).

0 Likes 0 ·

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.