question

entelicon avatar image
entelicon asked

Client/Server Data

I'm new to this whole "networking" thing, and was hoping you guys could clarify some questions for me.

I'm trying to create a racing game where you can customize your vehicle, and when you join a server,the customized vehicles data is sent to the server, where it can handle things from there.

My issue is the best way of sending that data to the server.

My first idea was to use you guys, PlayFab. For example, when you click the play button, it will send and store the information to the players data, and when the server is ready to start the match it can just read the saved data. My only concern with this method would be clearing and reassigning the data after each match, as I'm not sure if it's supposed to be used like that. Could you clarify if that is fine for me to use?

My second idea would be to use a sort of RPC call to server and the sever somehow stores the information inside of the build, and reads that when needed.

What would be the best method of me doing this? 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

Presumably you mean that you'll be using custom game servers to host the game sessions. In that case, yes, the servers would query for the data needed for each player from the service when those players join the session. Player-specific data would be stored either in the player account (User Data, User Read Only Data, User Internal Data), or else in the Content service (if it's a lot of data), with the information on the Keys used for storing that data in the user data. So the question is, what do you mean by "customize"? Do you just mean data on engine type, suspension type, etc., or will players be able to design completely custom liveries for their cars?

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.

entelicon avatar image entelicon commented ·

Thanks for the fast answer.

I do mean things such as engine/suspension type, and you pretty much answered my question all around.

One final question, do you guys have any documentation on when to use 'User Data, User Read Only Data' and more importantly 'Internal Data'

0 Likes 0 ·
brendan avatar image brendan entelicon commented ·

Our core docs are the API documentation, here: https://api.playfab.com/documentation/Client

But for writing to user read only (or internal) data via Cloud Script, I would recommend having a look at the revision 1 Cloud Script that's added to all titles by default, as it shows how to make those updates.

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.