werneck avatar image
werneck asked

Can I set a Statistic/Leaderboard that isn't associated with a specific character/player? If not, how do I do this?

Hi there! I'd like some help figuring out how to do something.

From reading your answers on other questions, I understand you like to take a top-down approach and consider what kind of functionality users want, so I'll explain what I'm doing.

What I'm Doing

I'm working on a game with a level editor. Levels are basically long strings, and they'll be saved online so other users can access.

I want to do a level rating system that works as following: After playing, users can rate a level under one of three categories. Let's say "Challenging", "Fun", or "Interesting".

Each level will then have a score for each category, and when a user starts to play, they can choose whether they want to see the most Challenging, Fun, or Interesting levels.

As I learned about the options you offer, I thought the Leaderboards system would be an excellent way to achieve that - I could set each Category as a Statistic, and then request the leaderboards to retrieve the top-ranked levels in a Category.

The thing is, apparently statistics and leaderboards can only be set for Players or Characters.

The Question

My question is: Is there something similar to Leaderboards/Statistics which would allow me to attribute a 'score' to a certain piece of data (as opposed to attributing it to a character or user), and then fetch the pieces of data with the highest scores?

If not - do you think it's a good idea to save a player's levels as characters in their account, so I can use place them in Leaderboards? I understand there would be limitations regarding number of key/value pairs and data size, but would this implementation cause any obvious problems? Thanks in advance!

Leaderboards and Statisticslimits
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

werneck avatar image werneck commented ·

Thanks, @Andy! Yes, I suppose that's what I meant to ask, hehe. I appreciate the quick response. I'll experiment with this character-based approach, and see how far I can get.

Another thing: I read somewhere that you can pay to expand certain limits. Since every other limit in the free tier is more than I need for a soft launch, it would make a lot of sense for me to expand the character count and character data size limits, only, so that players can have more freedom to save their levels. I suppose twenty-five 10kb characters would be a good start.

How should I go about getting one of these expansions? Do I send an e-mail somewhere?

0 Likes 0 ·
brendan avatar image brendan werneck commented ·

Please be sure to bear in mind that user and character data (like shared group data) is designed for a very small number of players to use. If you have a significant number of players trying to read or write to the same character or user data, you're very likely to run into performance issues (and if that does happen, we might have to throttle the title's ability to use that API call). I'd strongly recommend waiting on the actual UGC feature to implement something like this.

For limit upgrades, all the upgrades that are available separately from the tiers of service are in the Limits page (click the specific limit to see the options).

1 Like 1 ·

1 Answer

Andy avatar image
Andy answered

Fundamentally, I think what you're asking for is how PlayFab supports user generated content. The answer right now is that we don't. It is absolutely on our road map, but I don't know when it's going to be available.

I've seen other games attempt to use a character as a stand-in for a piece of user generated content. It introduces some interesting and unexpected corner-case scenarios that you would have to work around. Handling discoverability for the content can be tricky, I know. You can probably get it to work, but it won't be pretty. Hopefully, when we introduce a UGC feature set, this all gets much easier.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.