question

anthony123432 avatar image
anthony123432 asked

character to server association best practice

Hello, I am trying to determine the best design for associating a character and a dedicated server. when a playfab user picks a server to login to, i would like to check if that user has a character for that server or need one to be created. the intention is that a user will only have 0 or 1 characters on a server. so the question is identifying the server and asking playfab if the user has a character that belongs on that server. this is making the assumption that all my player info will be stored on playfab including the characters that exist on a server. is there a best practice design for this? my first attempt was to save server id into character data, but it seems that is not ideal for searching.

Characters
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

·
Rick Chen avatar image
Rick Chen answered

As I understand, you would like a best practice to check whether the player has a character that belongs on a server. Am I correct? You could store the server id and associated character id in the Player’s data, which makes it easier to check. By dedicated server, do you mean your custom server? If so, you could also store the character and player data in your custom server.

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.

anthony123432 avatar image anthony123432 commented ·

yes you have the idea right. when you say "player's data" you mean playfab user data right? make a set of server id and character id pairs that i can perhaps get with one api call. i am trying to make sure this is efficient and within limits for api calls/storage limits per key value pair etc. I will try this approach and it looks like i can find the server id as a key in the api call. thank you.

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ anthony123432 commented ·

Yes, I mean the PlayFab User Data. Glad to hear that you will try this approach, if you have any further questions, please feel free to ask.

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.