question

Yurii_dev avatar image
Yurii_dev asked

Playfab multiplayer: question about possibilities

Hi there. I’ve started developing a turned-based game for PC. I have some questions about Playfab possibilities.
Does Playfab have a possibility to create a "lobby in lobby"? Let me give you an example: Players connect to the main lobby, that has a map, where user see other users movements on the map, where is a text chat, where is community features like clans/guilds, auction or store( where users can sell items to each other) and another. Users can start the match from the main lobby (max 8 players for one match) and load to the level. After the match, they should return to the main lobby. How to implement that with Playfab Multiplayer? I also want to add a tournaments system, where players would take part in tournaments with clans/guilds. It's a turned-based game, so in the match, each user is using action points and make a move. Opponent players can see only player movements and actions like shooting at the time of player actions. But if it's the turn of an ally, they can see how that ally thinks and makes a move ( probably, I need to use sockets that are using in Playfab Multiplayer 2.0).

Few things about an auction: it's should be always available for users. So when a user started selling an item, the user can exit the game and after returning to the game, the user can see results of selling. For example, some user has bought an item of that user.

Let's summarise:

I need:

1. Multiple lobbies with a possibility of returning back to the main lobby.

2. Clans/guilds system.

3. Chat system in the lobbies to communicate with players.

4. Auction system.

5. Possibility to watch how the players make a turn while playing the match.

I have seen some info from the Playfab website, that contains the next features of Playfab Multiplayer: Party Networking & Chat; Dynamically scale dedicated multiplayer servers; Matchmaking and Groups Help players find new friends and competitors.

Can anybody explain to me what tools can I use to implement that? Thanks.

unity3dmultiplayerMatchmaking
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

>> 1. Multiple lobbies with a possibility of returning back to the main lobby.

For clarification, PlayFab Multiplayer Servers don’t natively provide an out-of-box lobby feature. As our blog -- Building Lobbies with Azure PlayFab said, you need to implement it with some external services. You can take a look at this sample --- https://github.com/southworks/playfab-samples to learn about how to use PlayFab and other Azure Services together to create a complete end-to-end experience that includes the lobby.

>> 2. Clans/guilds system.

You can implement clan system using PlayFab Entity Group, please check the documentation -- Entity Groups - PlayFab | Microsoft Docs for more information.

>> 3. Chat system in the lobbies to communicate with players.

You can consider using PlayFab Party to implement the chat system. Party provides cloud relay for data communication between players. It supports voice chat, text chat and other additional communication functionalities. Please refer to the document -- Azure PlayFab Party overview - PlayFab | Microsoft Docs to learn more about Party.

>> 4. Auction system.

According to your description, you mean one player can auction some item, and all other players can bid it, after a certain period, the item should be sold with current price automatically, is it right? If so, we don’t support such feature, you need to use some external data tables for it. PlayFab currently provide the inventory, purchasing system, and the feature to trade or gift items between players. But there haven’t been an open marketplace to post, browse, and claim trades.

>> 5. Possibility to watch how the players make a turn while playing the match.

If you mean the feature allows players to be a spectator of a match, yes, as you said, you can implement this feature using PlayFab Multiplayer Server. Essentially, both the contestant and the spectator are users who connect to the server, the difference is spectators need to own the separate interaction logic. For example, the contestants can see each other, and can affect the game result, the spectators can see the contestants, but they can’t be seen in the game scene, and they can’t affect the game logic, etc. You can add the judgment to the server logic to distinguish the roles of the players that connected to the server, then give them the corresponding accesses.

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

Yurii_dev avatar image Yurii_dev commented ·

Thanks for the answer. >>4. Auction system:I mean the users can sell items independently of the status of their session: online/offline. How do I see it from the technical side: The client updates and receives data of the database (a player receives an item and the client-side sends a request to the database with info of current user items). Then user wants to sell some items using an auction. So the user creates a lot (the client sends a request to the server, and the server creates data in the database about the lot). Then user exit the game, but the server still controlling the auction. Other users open the auction ( Clients fetch the data from the database with info about auction lots) and see lots. The users can buy items using this auction. So when some user buys the item, the user who has started selling and who is exited the game should receive the info about the lot when it's come back to the game ( Server should control operations with database: receive the data from the client, control sells, update the information of auction. ). It means also that users can create a lot a continue playing the game. The server controls everything. Sells use the in-game currency.

0 Likes 0 ·
Yurii_dev avatar image Yurii_dev commented ·

>> 5. Possibility to watch how the players make a turn while playing the match. No spectators. I mean that players can see the actions of teammates and opposites in real-time. I had to look at the side of REST API, but it's not appropriate, because it's necessary to send and receive requests every frame. So I need something like sockets to make real-time turned-based game. By the way, latency is not really important, because it's not a shooter. Users play the match by finding the best way for the move (like in the XCOM game, or like in Gears Tactics). Do you mean that I have to use only Azure services? But what about the new Playfab Multiplayer services?

0 Likes 0 ·
Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered
@Yurii_dev

you can open a TCP port on your game server to exchange packets with clients. Multiplayer Servers will expose this internal Port (details like IP:PORT are returned in the RequestMultiplayerServer call) which your clients can use to connect to. Feel free to check our quickstart video here for more: PlayFab Multiplayer Hosted Servers part 1: Multiplayer Servers Quick Start - YouTube

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.

Yurii_dev avatar image Yurii_dev commented ·

Thank you!

1 Like 1 ·

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.