question

Markus Skyttä avatar image
Markus Skyttä asked

Entity group guild

Hi,

We are currently doing small UA tests to our game, and started planning on implementing a guild system. The guild size limit would be max 20-30 members. We understood that it would be quite hard to create a guild system with the currently available entity group system. The first iteration of our guild system would not be that complex. The only things we see missing on the currently provided features is guild leaderboards, and to be able to fetch all members in the player's guild (display name, score, profile picture).

One thing we came up with that could be implemented in a reasonable time, is to use Azure redis cache to save all members data for a specific group id. When a new member joins a guild, it triggers an azure function to add that player's data to the existing guild members data. So player just needs the group id to then fetch the members data from the cache.

Of course there would be more writes to the data to keep it up to date. I.E when player's name changes, score updates...

So we are just wondering if you have any opinions on if we should implement that? For a small team we are mainly worried about the monthly price of the cache. At least enabling persistent data to avoid any data loss seems to be quite pricy in Azure.

Also, we see that the group leaderboards are currently on private preview. Is there any ways to gain access to the preview, as it would save a lot of time/money from us?

Thank you!

Leaderboards and Statisticsentitiesdata
10 |1200

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

Seth Du avatar image
Seth Du answered

In my point view, the only feature you required that the current leaderboard implement cannot offer is Group Leaderboard. If using external database, at least 3 columns are required for each entry. Entity ID, Group ID, Statistics Data. Statistics columns will be expanded when you need multiple data for leaderboard. Meanwhile, in terms of DisplayName, it is something you may store in PlayFab.

The Leaderboard V2 is not available yet. There is no ETA even though it is in high priority. Please stay tuned.

10 |1200

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

Markus Skyttä avatar image
Markus Skyttä answered

Hi, thank you for the answer.

Wouldn't it be enough to just save the Group ID and Statistics Data? Why the need to save own entry for each entity(Entity ID), as shouldn't redis be able to handle concurrent writes so that all players in the group can just update the same entry?

And sorry, maybe I was not that clear. I know that I can save the display names in PlayFab, but as stated in many forum posts, you can't fetch the members data for a group.

https://community.playfab.com/questions/38484/getting-group-members-with-their-user-data.html

So that is why we are thinking on how should we handle it.

And since redis is a key/value cache, would something like this work?

Key: groupId

Value: {

"statisticData": 0,

"membersData": [...] }

Or do you think that when multiple players are writing on the same "statisticData", it will lead to trouble, even when using redis?

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.

Seth Du avatar image Seth Du ♦ commented ·

Sorry for the confusion, Redis will be able to handle your scenario. What I was trying to explain is that PlayFab doesn't support Redis natively.

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.