question

michaellpm avatar image
michaellpm asked

A few general questions (PlayFab, CloudScript, Multiplayer 2.0)

Hi everyone! Some info: my name is Michael, I started working with PlayFab a month ago (cloud scripts, learning Multiplayer 2.0 now) and I came up with a list of questions. I'd appreciate it if you could help me with that. I'm sorry if some of the questions are quite dumb, just want to be sure.

1. What is the way for me to communicate between CloudScript and Multiplayer 2.0 builds?

2. Is communication differs from the case when I'll host my server with an external host provider?

3. I'm a bit confused about what you use for server hosting? It is said that it is Azure but I've found the article where it said that you use AWS EC2. (https://api.playfab.com/docs/tutorials/external-game-servers)

4. If I want to use Multiplayer 2.0 I need to integrate GSDK into my game server. Is it the only option? I'm asking only because GSDK needs .Net 4.6 that makes for me impossible using .Net core which I use for my server app.

5. Do I need to implement GSDK if I will use external hosting for my server in order to be able to communicate with PlayFab CloudScript?

Thank you in advance! I really appreciate any help.

sdksCloudScriptgame manager
10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

>>What is the way for me to communicate between CloudScript and Multiplayer 2.0 builds?

Do you mean that you want to communicate CloudScript and Multiplayer 2.0 using these Multiplayer Server APIs?

https://docs.microsoft.com/en-us/rest/api/playfab/multiplayer/multiplayerserver?view=playfab-rest

If that’s the case, you can call these APIs by writing this statement:

multiplayer.xxx(fill in parameters);  
//For instance, if you want to call the RequestMultiplayerServer API, you can simply do this: multiplayer.RequestMultiplayerServer({BuildId: "xxx", SessionId: "xxx", PreferredRegions: ["xxx","xxx",...]});

>>Is communication differs from the case when I'll host my server with an external host provider?

In your case, calling Multiplayer Server APIs from CloudScript to communicate with Multiplayer 2.0 builds is very similar to making these Multiplayer Server API calls from you external servers.

>> I'm a bit confused about what you use for server hosting?...

What you are referring to is the Legacy Multiplayer system, the server hosting service using Azure you are talking about is actually our new Multiplayer Servers(2.0) feature: Multiplayer Servers, please navigate to the link to learn about more.

>> If I want to use Multiplayer 2.0 I need to integrate GSDK into my game server. Is it the only option? I'm asking only because GSDK needs .Net 4.6 that makes for me impossible using .Net core which I use for my server app.

Yes, you’ll need to integrate GSDK into your game server in order to connect your game server to a local agent installed on the VM. This agent facilitates key server interactions with the PlayFab control infrastructure. And, CSharp GSDK also targets .net standard 1.6 and 2.0, therefore, theoretically speaking, GSDK should work fine if you are using .Net Core: .NET implementation support.

>> Do I need to implement GSDK if I will use external hosting for my server in order to be able to communicate with PlayFab CloudScript?

No, GSDK is used for connecting your game server to the PlayFab agent installed on the VM. This agent facilitates key server interactions with the PlayFab Multiplayer platform. In order to communicate with CloudScript, you’ll need to implement the Server/ExecuteCloudScript API in your server to execute a CloudScript function.

10 |1200

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

John Wallace avatar image
John Wallace answered

Can you point me to where "multiplayer.xxx(fill in parameters);" is documented? In the following link it claims to document all globals, but multiplayer isn't listed and I'm curious if there is other documentation I haven't found yet. https://docs.microsoft.com/en-us/gaming/playfab/features/automation/cloudscript/writing-custom-cloudscript

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.

Citrus Yan avatar image Citrus Yan commented ·

Sorry, currently that's not documented yet, in general, all the APIs in the server set can be accessed via CloudScript, however, other APIs are not guaranteed. Thanks for your feedback on this.

0 Likes 0 ·
Denzie Gray avatar image Denzie Gray Citrus Yan commented ·
@Citrus Yan

May I have a quick list of some "multiplayer.xxx" functions?

Even without the details it would still be helpful.

Let's say I call "RequestMultiplayerServer" in CloudScript and assigned the response to a variable. How would I use that response object in CloudScript (not C#) to talk to the game server(a Unity.exe)?

0 Likes 0 ·
brendan avatar image brendan Denzie Gray commented ·

Since you also posted a new thread for this, let's keep the discussion there, if you have follow-up questions: https://community.playfab.com/questions/47116/multiplayer-game-server-questions.html

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.