Hello,
I'm working on a turn-based game, using PlayFab and Photon. At the end of each game, rank points are awarded to both players, which is done in CloudScript. Because of how it is calculated, the calculation can only happen once for each game, rather than each player individually.
Currently I have both players execute a CloudScript function, and the first player caches the result, while the second simple reads the cached result. However, there is some timing issues with this approach (both requests can happen at the same time, so both run the calculation).
I think a better approach is to have only the Photon master client send the request to calculate the game results, then send the results to the other player through Photon.
Is this the correct approach, or is there a better way to do it?