question

Daniel Wengenroth avatar image
Daniel Wengenroth asked

Getting started with UE4???

Hello,

I still try to get started with Playfab and initially started with it for Nintendo. However since I'm not getting any support, I now try to do it for now with Steam. And unfortunatly the documentation is extremly lacking and I'm hoping for some support. I'm using Unreal Engine 4.26.0.


I need:

  • A Master Server for Crossplay to list all available servers within a serverbrowser
  • Servers are P2P player hosted servers or Dedicated Servers hosted my Clans

I don't need matchmaking, storing player data or anything for now. I just want the very basics. I'm on a free account and no credit card informations added. So I cant access the Multiplayer part in the Dashboard.

What I already did:

  • I integrated GSDK into the project
  • I enabled the Steam Addon for the project in Playfab
  • I added the required Steam and Playfab informations to the project

The long list of errors:

  • Login with Steam does not work -> Invalid Application Key or Publisher key
    Login with Custom ID works however as a workaround
  • Hosting a session, there are unfortunatly no real informations to this available how it's handled. There are some posts around here but the answers are lacking and not helpfull.
    1)Can I use the default Create Session from UE4 like in this screenshot hostgame.jpg or do I need to use something else? If so What do I need?

    2)Once a session is created, what do I need to call next? Start Game, Register Game or Heartbeat? I tried all of them but they don't work due to invalid parameters. As I can't access Multiplayer, I assume this is where I would need to set every parameter I want to use with those calls? So I need to add a credit card informations before I can test it at all?

    3)If I would be able to create a session listed on playfab, how would I get a list of all of the registered session on playfab?
hostgame.jpg (99.7 KiB)
10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

>>I need a Master Server for Crossplay to list all available servers within a serverbrowser. Servers are P2P player hosted servers or Dedicated Servers hosted my Clans. I don't need matchmaking, storing player data or anything for now. I just want the very basics. I'm on a free account and no credit card informations added. So I cant access the Multiplayer part in the Dashboard.

For the clarification, the Multiplayer Server feature provides the custom server hosting service. To use the Multiplayer Server feature, you need to write the server on your own then upload it to PlayFab. The Multiplayer Server feature is more suitable for the server-client authoritative architecture. To enable the Multiplayer Server feature for your title, as you said, you need to add the Credit Card information in the Game Manager first. After you enable the Multiplayer Servers feature, you can use 750 free core hours and 10 GB free quota for product evaluation and testing. To learn more information about Multiplayer Server, you can check our document -- Servers - PlayFab | Microsoft Docs.

According to your description, you only need the direct peer-to-peer connectivity capability, is it right? If so, you can also consider using PlayFab Party. You can check this document -- Using direct peer-to-peer connections - PlayFab | Microsoft Docs to implement P2P connection using PlayFab Party. Currently, we only provide the C++ SDK to integrate Party with Unreal and the Blueprint interface is not supported. If you wish to add Blueprint interface for Party, you can make a feature request about it here.

>> I integrated GSDK into the project

Could you please clarify how you integrate the GSDK with the project? Do you follow this document -- Integrating the PlayFab GSDK into Unreal Engine 4 - PlayFab | Microsoft Docs to integrate it with your Unreal sever?

>> 1)Can I use the default Create Session from UE4 like in this screenshot hostgame.jpg or do I need to use something else? If so What do I need?

No, PlayFab Multiplayer Server feature or PlayFab Party can’t be integrated with Create Session method from UE4. If you use the PlayFab Multiplayer Server, PlayFab VM Agent would help you allocate the server sessions, you can call the PlayFab API RequestMultiplayerServer on the clients or allocator servers to tell the agent to assign the server sessions.

>> 2) Once a session is created, what do I need to call next? Start Game, Register Game or Heartbeat? I tried all of them but they don't work due to invalid parameters. As I can't access Multiplayer, I assume this is where I would need to set every parameter I want to use with those calls? So I need to add a credit card informations before I can test it at all?

The API RequestMultiplayerServer would return the IP address and Port number to your servers and clients. Clients can connect to the server via them. You can add your own heartbeats method for server to detect disconnection. The Server API methods -- Start Game, Register Game, etc. apply to the descripted PlayFab legacy server, you can ignore these APIs and the error about parameters. Please follow our Mps Samples to use Multiplayer API in your clients and servers.

As the first answer said, if you want to use PlayFab Multiplayer Server feature, you need to add the credit card information.

>> 3)If I would be able to create a session listed on playfab, how would I get a list of all of the registered session on playfab?

You can call the Multiplayer API ListMultiplayerServers to list the multiplayer server sessions for a specific build. Please check the sample -- MatchMakeSample to learn about how to use it. Except for using PlayFab API, you can also check the list in the PlayFab Game Manager. You can navigate to [Game Manager]->[Servers] tab ->[Servers] sub tab to check the sessions list for the build.

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.

Daniel Wengenroth avatar image Daniel Wengenroth commented ·

Thanks for the answer.

GDK Integration
Yes I followd the documentation you linked

For the first part you have written, It just confuses me more as this is against some other posts. Writing the dedicated server on my own is not an issue, I've done it several times to use with the Steam Master Server. What I need from playfab is a replacement for the Steam Master Server. I don't want to host dedicated servers via Playfab Cloud, I right now want it to run on my own hardware. I want to use Playfab only as the Master Server which tracks the available servers and sends those informations back to clients on request. Nothing more.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Daniel Wengenroth commented ·

We are not so familiar with Steam Master Server. But as far as we knew, it is more like a relay server or the allocator that can manage the external servers, is it right? If so, you can consider using the third-party service Photon. You can navigate to Multiplayer Game Development Made Easy | Photon Engine for more information about Photon.

As the answer said, PlayFab Multiplayer Server feature is a server hosting service. PlayFab can only manage the servers that hosted on PlayFab cloud. Developers can call the PlayFab API to interact with the server sessions and need to host the allocator server externally. The PlayFab Multiplayer Server is quite different from Steam Master Server.

0 Likes 0 ·
Haris Sevinc avatar image Haris Sevinc commented ·

Hi sarah, thanks for detailed information.

In this case for creating moba, fps or co-op rpg on UE4 we can use RequestMultiplayerServer

So i cant understand clearly comminication between this services about;

- Matchmaking
- Multiplayer Server
- Online Subsystem

Should i have use all of them?

0 Likes 0 ·
tbrooks27 avatar image
tbrooks27 answered

https://www.youtube.com/watch?v=SWDDBm6YbbQ

This series is extremely helpful for people just getting into UE4 and PlayFab. Start here, helped me tons.

1 comment
10 |1200

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

Daniel Wengenroth avatar image Daniel Wengenroth commented ·

I already watched it but it does unfortunately not help with the issues I'm currently facing.

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.