question

kokkorollo avatar image
kokkorollo asked

Help with Server Architecture

Hi,

we are building a multiplayer game in Unity and we are looking for Playfab as login and multiplayer server.

The game is a team-based 5v5 / 10v10 FPS with authoritative server, with an average match length of 15 minutes.

The project needs to have a typical online workflow like Fortnite or COD Warzone.

We have this kind of structure:

1. Client log-in (using Playfab for managing different accounts).

2 . Players enter into their personal lobbies where they can customize their avatar, invite friends, chat, view stats, and unlock items with in-game currency.

3. Call match making that enable the client (or clients if they have invited friends) to enter the game.

4. When players start the matchmaking and opponents are found, a new Unity server instance is created running Mirror Networking (10-20 players per game).

5. Once in the game server we can manage the game with our mechanics (we are going to use unity and Mirror for networking).

6. At the end of the game, scores are calculated and updated to the players' profiles.

So we would love to use Playfab to accomplish this, because seems that most of the task could be done easily.

I've understood that Playfab doesn't have a Lobby system and I'm struggling finding a solution on how to implement this with Playfab.

So I have some questions:

1. what's the best way to implement a Lobby like Fortnite using Playfab? If there is no way for Playfab can you put me trough some services that could help me?

I've read about using Playfab Matchmaking Legacy for Lobby and then Matchmaking 2.0 for Game servers, but I've not found ant documentation or examples about the differences and the implementations.

I've also read about Using Matchmaking 2.0 with cloud script to create Lobbies room because there is a limit with Matchmaking 2.0. that needs 2 players to start the Matchmaking, but also for this I've not found any documentation or examples.

2. Furthermore I want to understand how the Playfab servers fleet will be managed. When we build the game server we have also to provide a Master Server that manage multiple game servers instances into the Playfab server (so a master server that spawn a game server and return port and ip to clients to connect) or the Playfab architecture just act by itself as a Master server? In this case how can I understand how much resources are used by one Playfab server from the fleet?

I hope someone can help me because I'm struggling by two weeks and I've a lot of doubt.

Thanks.

MatchmakingCustom Game Serversgame 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
  1. We don’t have a built-in Lobby feature provided, however, services like Photon should be able to help you with that. And, additionally, here is blog post regarding Building Lobbies with Azure PlayFab you may find helpful.
  2. You don’t need to manage server instances by yourself, PlayFab already got them covered, please check out this doc to get started: Servers - PlayFab | Microsoft Docs
10 |1200

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

kokkorollo avatar image
kokkorollo answered

Can you please help me understanding what this voices means?

I'm deep diving into the documentation but i'm having troubles understanding how many game servers I can run on the server configured like in the picture. I've chosen a Standard_A1_v2 (1 core) machine.

So how many Game Server from my uploaded build can it handles? From what I've understood It can handle at maximum 60 Game Server with one core, so this is the maximum for the machine? and what about the 1380 remaining quota? what is this about? so maybe this means that I could run 23x60 instances of a game server with only the Standard_A1_v2 (1 core) machine?

what does it mean the Maximum field? from the documentation it's not very clear to understand. does this relate to physical machines for Northern Europe? So when this will scale and how many game server instances could run on every server? When the server will be scaled?

I hope someone could help me to better understand how to manage the servers to understand also the costs of the multiplayer service.

thanks.


playfab-explain.jpg (94.9 KiB)
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.

Citrus Yan avatar image Citrus Yan commented ·

Yes, the number of maximum servers that can be configured for a single vm is 60, however, you would need to run some performance tests by yourself to figure out how many instances your server can run on a single vm without having performance issues. And, yes, you can run 23x60 instances of a game server with only the Standard_A1_v2 (1 core) machine provided that the Standard_A1_v2 (1 core) machine can host 60 instances of your server without performance issues.

The Maximum field is set by yourself. For example, assuming that one vm runs 60 instances of yours and the maximum field is set to 120, in that case, when the 61st instance is requested a new vm will be instantiated to host it; however when the 121st instance is requested with 120 instances currently running, this request can be fulfilled because maximum is set to 120, you or the player would need to wait for other server instances to finish in order to reuse them.

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]