question

ibrahimaboelsuod@gmail.com avatar image
ibrahimaboelsuod@gmail.com asked

How to terminate game server/game session?

I am new to playfab, still figuring stuff out.

  • I am using unreal + the playfab plugin.
  • Using matched making and mateched 2 players together and tried to connect them to a server.
  • Then I had a few problems that I am still debugging but during the debug process I created different game servers and now can't create any more.
  • As far as I understand my game shoudl signal game conclusion at some point.
    1- How to signal game conclusion so the server can shutdown? I used this guide in my setup: https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/playfabgsdk_guide
    2- How to terminate the currently running game/server/session?
    3- Also is it normal if I remote control inside the VM and not find my game server running?
    I am new to doker too.
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

·
Seth Du avatar image
Seth Du answered

In the common scenario, the process should be done internally on the server instance. The “signal” should be the game process is finished and all the required information has been updated and logged, then the server may use some codes like Application.Quit() in Unity. I assume it will be _Exit() in C++ (I am not very familiar with C++).

To shut down the server externally, PlayFab also provide an API ShutdownMultiplayerServer.

In terms the 3rd question, I believe we will be able to monitor any running server instance in Game Manager. Please navigate to [Multiplayer] -> [Servers] -> [Servers] and remember to select corresponding server build and region to review those instances.

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

ibrahimaboelsuod@gmail.com avatar image ibrahimaboelsuod@gmail.com commented ·

Thank you for your replay.
I figured out #1, it was like you said, in Unreal I just check number of conncted players every 10s and shutdown the sever if no one is connected.
#2 I couldn't find any example of how to get GetEntityToken as an admin, and was never able to generate one. Always get error invalid token. Could you give me any pointers please?

#3 This is how I logged in but I just see nothing running. I expected to see the game server running. Is this has to do with the Playfab server being headless?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ ibrahimaboelsuod@gmail.com commented ·

It will be straightforward if you have implemented Postman SDK. There are 2 optional property in the HTTP header of GetEntityToken request. If session ticket is configured, API call back result will give the entity token of logged in player, however, if you configure only the secret key for the header, it will return a server/title level entity token. I will suggest you to use C++ SDK to perform it because it is very complicated to implement via current version of Blueprint.

In terms of #3, PlayFab does support monitoring the server instances. What do you mean by "logged in" and "see nothing running"?

0 Likes 0 ·
ibrahimaboelsuod@gmail.com avatar image ibrahimaboelsuod@gmail.com Seth Du ♦ commented ·

I connected using RDB and found no instances running on the VM.

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.