question

Canberk Soner avatar image
Canberk Soner asked

Implementing Clans

Hello.

How can we implement a basic clan system? What's the "up to date" PlayFab way to do this?

Some requirements:

-Roles: only officers can invite/kick people, only clan leader can change clan avatar etc.

-Browsing: instead of direct invites, players also need to be able to search for clans somehow.

-Clan leaderboards: a leaderboard that ranks clans according to scores earned in special clan matches

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

·
v-humcin avatar image
v-humcin answered

A basic clan system can be accomplished using the Groups API. There is a comprehensive quickstart guide here: https://docs.microsoft.com/en-us/gaming/playfab/features/social/groups/quickstart

To address each of your requirements:

1. This is possible within the groups system, this thread details how you can accomplish this: https://community.playfab.com/questions/25747/group-roles.html

2. The group system supports inviting players to groups and also allows players to apply to groups, however there is no built-in way to browse all groups via API calls.

3. There is no built-in functionality for clan leaderboards. You would need to setup a custom server or integrate a 3rd party service such as "Azure Cache for Redis" to implement this functionality.

4 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.

Canberk Soner avatar image Canberk Soner commented ·

Hello again.

Is there any way to find a workaround for #2 and #3? I don't know, maybe not directly "clan leaderboards", but maybe a workaround using characters?

I thought that since we don't use the PlayFab characters feature in our game, would it be ok to create a character for each clan (the character would belong to the clan leader) and then create a leaderboard from a "clan point" statistic for those characters? Then, I guess we can also use GetleaderboardAroundCharacter to "browse" clans?

Any obvious drawbacks to this approach? Are there any issues that you guys can foresee with this?

Clan rankings and a way to search for clans is really important for us.

0 Likes 0 ·
v-humcin avatar image v-humcin ♦ Canberk Soner commented ·

This would not be a supported use of characters. The only guidance we can give for right now is to wait for the updated guilds and leaderboards functionality, which you can keep an out out for on our blog: https://blog.playfab.com/blog

0 Likes 0 ·
Canberk Soner avatar image Canberk Soner v-humcin ♦ commented ·

Hi,

Solved this issue with private support recently and we agreed on a workaround that would not cause performance bottlenecks in PlayFab side. I'll mention it here so maybe other people can use it too: Using character leaderboards like this, but instead of frequent updates, save player's clan score contributions and run a scheduled task daily (on a third party web server, not playfab) on each clan by utilizing segments that contain clan leader players.

0 Likes 0 ·
Show more comments

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.