question

twiixyfr avatar image
twiixyfr asked

Is playfab good for my project ?

Hi, sorry for the title, i have many question so i don't find a good one.

I wonder if playfab is the good choice for my game, i want to allow player to host their own game server and allow a master server to list them with a simple server browser system for allowing player to join a game server hosted by player (mostly on a vps service) so i host myself (or playfab if you have this possibility) the master server, who just listing all the game server, and then a client can connect to a game server hosted in a player vps but i want to save the data like inventory on the game server side by the account id of this player, so for example

I create my account on the master server side as the test123 username

and then i request the master server to show me game server

i join one, and the game server that i joined create a new data storage for test123 player with his inventory data and stuff (if its the first time test123 join this Gserver, otherwise Gserver will just find the test123 data) and store it on the Game server side of course.

At this point, administrator of the game server (defined by the host) can manage they player, ban them for that server, kick, modify inventory and stuff like that.

That allow me to manage the main account of player and potentialy ban them for cheating but not from the game server, only the master one, do you think i could do that with playfab using Unity and uNet ? Because some of your service like friendlist can be usefull. I hope you understand what i mean my english is verry bad i do my best, and thanks for your answer.

have a nice day !

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.

twiixyfr avatar image twiixyfr commented ·

I want to add some informations but, i can't find the edit button, sorry for the double post.

I read this Custom game server Doc and some answer of @Brendan on other post talking about the security risk to have a game server and the Server secret key in the client side for hosting and i find that in the doc StartGame in client side the problem is about saving data in the game server side who use the client api too, but what if i want the character data like inventory to be saved only on the gameserver you are playing (wich mean if you change Gserver you don't get back what you have on the other Gserver, progression are unique) i would be able to manage that without server api right ? The only thing needed is the user ID to store data, i don't necessary want to see what happening on Gserver data side.

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

The key here is that you should never allow the player to have access to the Secret Key in any way. That would effectively let any hacker change the configuration of your game, delete or change players, etc. Basically, it's a non-starter.

So ultimately, any "server" executable the players have access to should only use the Client API. That still provides you with a lot of functionality, so that likely can enable much of what you're trying to do. Combined with your "master server", you can likely achieve everything you need. That could be hosted by us in our custom game server hosting, or you could have your own master servers hosted elsewhere.

If you have them hosted by PlayFab, you would have the client-hosted servers connect to the master server via Matchmake. That would allow the master server to track on available client servers, as well as let you have any kind of authoritative checks you wanted to do on key value updates. The players would then use Matchmake to connect to the master server and get information from it on a client server to join. Now, one potential issue would be that with a very large player base, you would be fragmenting your players across multiple master servers, for purposes of matchmaking. But if you're running separate master servers in each region, that should help to minimize that. And if you do reach the point where you're seeing fragmentation causing issues, we can work with you to design some alternatives based upon your overall gameplay model.

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

twiixyfr avatar image twiixyfr commented ·

Hey @Brendan thanks for your answer, i don't understand one thing about the Master Server, why i should have more than one master server in some case and even in different country ? I mean the location of the master doesn't affect the connection speed of the game server right ? If i do a server browser and ask for ping of each one, its only about client and game server distance and connection quality of the client, the master server distance only affect the speed of the user connection and stuff like that who is not really a problem i think, and about the master server performance, he will just have to register/login and showing server for the client and register/unregister game server, i know that all player and server are going to be connected to master but they don't send him alot of message i hope you understand what i mean is not easy with my terrible english, thanks again !

0 Likes 0 ·
brendan avatar image brendan twiixyfr commented ·

The issue here is that I can't really predict how many users your master server will be able to support. It'll be running your code, so it's really up to you. What I was suggesting was that due to the fact that the master server will also be in charge of matchmaking, you'll want to have as many players on the server as possible. If you reach a point where you have too many players to be supported on a single server, you may want to first break up users by having a separate master server in each active region (or a subset), since realistically, you'll be wanting to pair people up by geolocation anyway (to minimize the latency between players). That way, you could have all players in each region supported by a single server. Make sense?

0 Likes 0 ·
twiixyfr avatar image twiixyfr brendan commented ·

Yeah i understand what you mean, but what if i allow dedicated game server config to put a region for allowing the master server to list them ? Also i will showing ping in the server browser between client and game server, that should let them decide if the server is good or not and of course the server name could be something like [US] if they want. What im trying to ask its if the master server location can affect in any way the gameplay experience of player, when they are connected to the game server ? Also a player in a gameserver don't deal with the master server anymore (i mean he don't send message or rpc to the master when he play) unless i have more than 1000 player who spam refreshing/connecting at the same time that should be okay right ? (Depending of the master server cpu and ram of course wich is can be upgraded easily). The only thing who affect player with a higher ping on the master is the connection (Account log in) and refreshing server time i am right ? But of course i understand the necessity to have a emergency case if something wrong happen to the vps or the power of the main Master. Also thanks for your time.

0 Likes 0 ·
Show more comments

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.