question

overcokedproductions avatar image
overcokedproductions asked

Is it possible to have a Master Server to allow cross-platform multiplayer?

Hi,

I just signed up. I'm not a programmer, I've been taking a look at the documentation and some tutorials but I lack the experience to understand what they say.

I'm making a game with Unreal Engine 4 and I want to know if I can create some kind of Master Server with Playfab so people can search for available games.

People will host their games so I don't really need a completely new Online Subsystem just a way to make server browsing possible.

This way I could allow people play each other even with different systems.

Thanks in advance.

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

·
brendan avatar image
brendan answered

First, if players will be hosting their own game servers, it's important to note that those servers must not have any ability to call into the Server API set. To do so requires the Secret Key - which you do not ever want to have in the hands of anyone outside your team, as it allows them to make any calls they want to in the Server and Admin API sets. In other words, they could basically delete everything about your game.

So the client-hosted version of your server would use Client API calls, and make calls into Cloud Script occasionally for server authority when needed - like evaluating the points reported at the end of a level, for example.

As to cross-platform play, that part is simple. The client and server exchange data packets that contain the information they need from each other. Nothing about that data is platform-specific, so yes, you can have players from different types of client machines playing together. The exception to that would be where there are specific policies from platform owners preventing this. For example, you cannot enable cross-play between Playstation and Xbox consoles - that's specifically prohibited by Sony and Microsoft policy (though Microsoft has said they would allow cross-play if it's via Xbox Live, of course).

So one important thing to do is to review the policy documentation for any platforms you intend to ship on, to make sure they allow the things you have in mind.

Now, once you're past that, you'll want to have a look at this guide, which describes how to enable externally hosted servers in PlayFab: https://api.playfab.com/docs/external-server-hosting. That's specifically the information you'll need to have a client-hosted server register itself in PlayFab for matchmaking.

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

overcokedproductions avatar image overcokedproductions commented ·

Hello Brendan,

Thanks for the answer.

I've been reading the link you posted, these ones

https://api.playfab.com/Documentation/Client/method/Matchmake

https://api.playfab.com/docs/using-cloud-script/ and a couple more.

If I understood correctly it's possible through the matchmaker, when one person hosts a game it will send the RegisterGame command to Playfab and it will save the LobbyID with the rest of the information.

Then another person will retrieve the list of the Game Server Instances currently available and choose the one he/she wants.

Is this correct?

0 Likes 0 ·
brendan avatar image brendan overcokedproductions commented ·

Actually, if you're using our matchmaker, it's much simpler. If you're using us for server hosting, the server already informs our matchmaker when it's available. If you're using external server hosting, you register the game when the server starts and then send us a heartbeat from it once per minute - that lets our matchmaker know the session is available. Then, a client looking for a game can use Matchmake, which returns the first available slot that matches the requirements in the request.

0 Likes 0 ·
overcokedproductions avatar image overcokedproductions commented ·

OK, and if I implement this, what are the usage limits I should pay attention to? What would make me go beyond the free tier?

I've reading this

https://playfab.com/introducing-our-new-usage-limits-system/ and the limits tab but I can't figure it out.

0 Likes 0 ·
brendan avatar image brendan overcokedproductions commented ·

To be candid, the free tier is really intended for while you're in development, or if you're an indie with a title you're not able to invest in yet. There is no SLA for free tier titles, and while the service is extremely reliable, that's a level of risk that any serious title should not consider, as it severely limits your options should there be an issue.

That said, the service is not limited on the number of users, so if you have a title that takes off unexpectedly, you don't need to be concerned that that is a limiting factor. The main things to consider for limits are those stated on the Add-ons->Limits page for your title, and your overall send rate (of API calls to the service).

0 Likes 0 ·
overcokedproductions avatar image overcokedproductions commented ·

I see.

Is it OK if I copy-paste this conversation on the Unreal Engine forums? Other people may find it useful.

0 Likes 0 ·
brendan avatar image brendan overcokedproductions commented ·

I'm on the Unreal forums as well - is there a specific thread discussing this? I'd really prefer to be able to give people more context if they're asking about this type of thing.

0 Likes 0 ·
overcokedproductions avatar image overcokedproductions commented ·

Great, thank you very much for your help Brendan!

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.