question

tomgeorgin avatar image
tomgeorgin asked

Looking for a PlayFab feature for a game feature.

Hello,

I have the following need:
Players in our game can make decisions throughout their gameplay experience and we want to be able to show to every single player, at arbitrary times, how many other players made the same choice as them.

So far, I thought I could manage the entire thing using Player Statistics and Leaderboards as such:

One given decision will have multiple possible Choices. Each choice generates a PlayerStatistic and sends a value of 1. The other choices won't have a value for the same player (this is not ideal but is a limitation based on other tools we are using in our game, I had to do it that way). When retrieving the Decision, I was going to request the leaderboards of every single choice, calculate the total entries and then divide by how many each leaderboard had, giving me a percentage that picked a certain Choice.


It would seem I was wrong for the following reasons:

- When retrieving a Leaderboard, there is, at no point at all in the Result, any information on what Leaderboard was requested. That prevents me from knowing which request returned success and treat information properly (because I need multiple requests, 1 per possible choice at any given decision)
- Leaderboard requests seem to only yield a maximum of 100 results which is clearly not enough for my current need
- There are no simple requests to query how many people have a value for a given Statistic. I realize why, in the current state, it doesn't exist, since leaderboards are meant to have a value (at least a default one), for every player, but it makes it very specific when it could be a very generic tool

So can anyone think of another feature in PlayFab that would allow me to achieve that please?

Thank you very much for suggestions!

Best regards,
Tom G

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

·
Sarah Zhang avatar image
Sarah Zhang answered

Do you want to implement a decision statistics system like what in Detroit: Become Human? So do you need to record the specific PlayerID who makes the same choices? If you don’t need players’ info and ranking, just need the count of players who make the same choices, yes, leaderboard is too redundant for such features.

A possible more suitable feature in PlayFab for this case is Player Segments. It’s designed to manage players. If we use this feature, we can set filters and actions. Then PlayFab will help us select the players who meet the conditions (for example they have the same tag) and put them in one segment. We can check the count of the segment on the Game Manager web page. But currently, there is no API to get the count. And If we are essential tier we only can use 10 segments and 5 tags. Maybe it’s too little for a game.

So a better workaround is using an external cache (like Redis) to implement a counter feature. Actually, currently the external cache is more suitable for such custom server data which needs to be updated frequently. You can use them with other PlayFab backend features together.

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.

tomgeorgin avatar image tomgeorgin commented ·

Thank you for your answer.

It is a bit like Detroid I guess, but I don't need specific User information. I mean I kind of need to keep the data linked to a player to also be able to use the feature for Friends, but all in all, I simply need to know how many players made choice A in decision 1 vs how many made choice B in decision 1.

Segments seem a bit limited indeed from what you're describing, as there will be a lot of choices and decisions.

I don't have much experience with external cache systems like Redis, would we have to have a server dedicated to handling it that our game could access? The game is mostly Offline aside from Telemetry with PlayFab so I guess that'd be a no-go if that's the case.

Thank you again, have a great day!


Tom

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.