question

innova3di avatar image
innova3di asked

Remaining Steps for Unity+Mirror Game Server Deployment (Process Type)

I've been having confusion with the doc that provides code samples about obtaining the port number from GSDK.

While the doc provided a link to the full script, the code sample is nowhere to be found in the script. I found the same script in another repo naming MpsSamples that also doesn't contain the code sample. I also have the same local script as MpsSamples in my project from GSDK/MultiplayerAgent folder and the code sample is also non-existent. I tried pasting the code sample to the local script I have in my project and the class written in the sample does not exist. So, I assume the sample provided is either just a pseudo-code or the repos that contains the script is not yet updated.

Question 1: GamePort

I have GSDK and PlayFabSDK in my project so I already have the script "GameServerConnectionInfo.cs" that captures the gameport. Is this script enough or do I need to write anything like the code sample by the doc?

Question 2: Required DLLs

Is this step really required? My server type is Process that I suppose will run on Windows VM by PlayFab. Isn't it that VMs already have the DLLs to run the Game Server?

Question 3: Local Debugging of Game Server

I'm using "LocalMultiplayerAgent" PlayFab's Local Debugging Tool. And with MultiPlayerSettings.json in place, my Local Game Server becomes active and runs fine with local clients. Now, I am wondering how will my Android APK Build will communicate with the deployed server. Can someone here shed me some light about this please?

Custom 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

·
Xiao Zha avatar image
Xiao Zha answered

Question 1: GamePort

Since you are referring to Unity and Mirror sample, in the AgentListener.cs, we already provide the code to obtain the port. So you don’t need to write anything like the code sample by the doc you mentioned.

Question 2: Required DLLs

Yes, it’s required. By default, the managed container image in the VM includes many commonly used DLLs. But your game server may use additional DLLs that doesn’t included in the VM. That’ s why you need to determine the required DLLs.

Question 3: Local Debugging of Game Server

What PlayFab provides is the server host service, as for the data communication between the client and the server, you need to implement it yourself. Since you are using the Mirror Networking library, it already implements the function of data communication between client and server. You can refer to the Mirror documentation to implement the communication process and seek professional help from the Mirror team.

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.