question

Lior Hadashian avatar image
Lior Hadashian asked

Confused about setting up Server, Game servers and connections

Hello there,

We are looking to integrate playfab multiplayer and it's other features in our Unity turn-based title.

As far of leaderboards, inventory, characters and all other player's data and persistence it all went totally well.

But when it comes to servers i got a confused a little and has some questions:

1) In unity sdk there is PlayFabServerApi. Where do i host that server? on my own custom server? How do i connect to that server? Do i host it on the game build server? I wish to have a main server for player's progress unlock and other meta-game logic, and i prefer it to be on an authoritative server for all the game's logic beside "combat sessions". my preference is not deploying my own custom server but to use just playfab services ( and pay for them if need be).

2) After deploying a server with GSDK, how do i connect a playfab client to it? (assuming i recieved a match-making response)? how do i handle requests and responses? do i need to implement my own "messaging" system between the client and the game server?

Thank you very much in advance,

Lior.

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

·
Sarah Zhang avatar image
Sarah Zhang answered

>> 1) In unity sdk there is PlayFabServerApi. Where do i host that server? on my own custom server? How do i connect to that server? Do i host it on the game build server?

About PlayFab Server API, you can use it both on your custom Server and CloudScript. CloudScript methods have full access to PlayFab's Server API set. You can click the link to check the documentation.

About server hosting, if you want to host your custom server executableon the PlayFab, you can use our server hosting service Multiplayer Server 2.0. You can also host your game server executable on other places, if so you still can use PlayFab Server API on your custom server.

Currently, we don’t provide an out of the box Game Server which based on the latest server hosting service. If you want to use our server hosting service, you can refer to our documentation and the samples to integrate GSDK with your customer server by yourself.

>> 2) After deploying a server with GSDK, how do i connect a playfab client to it? (assuming i recieved a match-making response)? how do i handle requests and responses? do i need to implement my own "messaging" system between the client and the game server?

Yes, you should implement you own “messaging” system between the client and the game server.

After you integrate a game server with GSDK, deploy it on the PlayFab successfully, and integrate PlayFab Matchmaking with your server. If so, after matchmaking successfully, PlayFab will return the IP address and the port to the clients. Then you can connect clients to the server.

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.