update PlayFab client statistic from server

PlayFab documentation describes two ways to update client statistics: 1. use clientAPI and 2. use Cloud Scripts. In both cases, the client sends statistics. In the first case there is no protection against hacking, in the second one offers methods of logical comparison, which also has many disadvantages. It would be much easier if the server could update client stats right after the match. But I can't find such information anywhere. If possible, let me know where i can find information on this issue. If this is not possible, then there is a super idea: after the end of the match, the server sends the encrypted statistics to the client as a string. The client sends the same string to the Cloud Script, where this string is decrypted and written to the PlayFab database. :s:D

Comments

  • Hello,

    It was not clear what you mean by "statistics", can you describe more what kind of information do you want?

    --
    Ramon Melo
    Photon Bolt Team
  • None of this has anything to do with Bolt and these questions really belong elsewhere. Playfab uses simple REST calls and they publish an abstracted Unity API. You can certainly send aggregated statistics from a Bolt server to Playfab using the Playfab server API, since I do just that. But this would only be secure on secured servers.
  • exp
    exp
    edited December 2020
    Ramon Melo, I mean match result for players - amount of damage, points earned, etc.
    DirtyHippy, yes, i'm undestand! But I'm using bolt and just can't find information on how to do it ( All what i find is update match results for player from client side not from server. f.e. https://clck.ru/ST94n or https://clck.ru/ST93y If not so hard, a small example would be enough for me. At the moment, I have implemented the minimum game functionality and it works in conjunction with PlayFab (The client goes through the full authorization process, and the server works in the PlayFab Build) The server contains a list of players and knows their PlayFabID. When the match ends, the server needs to update the player statistics in PlayFab and inform its clients about it. Then the clients disconnect from the game server and take new statistics from PlayFab. Sorry guys if my questions seem silly. I find it a little difficult to learn using an online translator :)
  • Hello @exp,

    As already said, this is not related to Photon Bolt, so we can't help much.

    If you have that information already calculated on the server, for example, you could just send an event to each client informing their individual statistics so they can sync with the PlayFab Services.

    Again, you need to figure out how you would like to make the communication, Bolt offers several ways to do so, states, events, even stream if the data is really big.

    Now, how you will upload this to Playfab, and on which side, really depends on you.

    --
    Ramon Melo
    Photon Bolt Team