• Discuss all the things!

    163 Topics
    594 Posts
    Context

    Hello brainCloud team,

    We are designing a follow/friend system for our game and would like to confirm a few details before implementation.

    Our intended model is:

    We maintain our own FOLLOW Custom Entity as the source of truth. A game “friend” is defined only when two users follow each other mutually. When mutual follow is established, we plan to call FriendService.AddFriends([targetProfileId]). When either side unfollows, we plan to call FriendService.RemoveFriends([targetProfileId]). We may later use brainCloud Friends as an optimized source for social leaderboards. Questions 1. Friend Relationship Direction

    Are AddFriends and RemoveFriends bidirectional for internal brainCloud friends?

    If user A calls AddFriends([B]), will B also see A in ListFriends("brainCloud")? Will both A and B see each other in GetSocialLeaderboard results if they both have leaderboard scores? If A calls RemoveFriends([B]), is the friend relationship removed from both users? 2. Idempotency

    Are AddFriends and RemoveFriends idempotent?

    What happens if AddFriends([B]) is called when A and B are already friends? What happens if RemoveFriends([B]) is called when they are not friends? 3. Consistency and Caching

    Are friend changes immediately visible?

    After AddFriends or RemoveFriends, should ListFriends("brainCloud") and GetSocialLeaderboard reflect the change immediately? Or is there any eventual consistency or caching delay we should expect? 4. Friend Count Limits

    Is there a hard or recommended limit for the number of brainCloud friends per user?

    We could not find a documented hard cap. Are there practical performance limits we should design around? 5. GetSocialLeaderboard Behavior With Many Friends

    How does GetSocialLeaderboard behave when a user has many friends?

    Does it return all recognized friends plus self, with no paging or limit? Is there any hidden maximum result count or payload limit? Are pacers included in this result as well? 6. Recommended API for Top-N Friend Leaderboards

    What is the recommended API for a top-N friends leaderboard?

    Can we use GetMultiSocialLeaderboard([leaderboardId], leaderboardResultCount, replaceName) with a single leaderboard ID? Is leaderboardResultCount applied after social filtering and score sorting? Is there a maximum allowed value for leaderboardResultCount? Is this API preferred over GetSocialLeaderboard when we only need the top 50 friends? 7. Social Leaderboard Pagination

    Is regular pagination supported for social leaderboards?

    We found GetGlobalLeaderboardPage for global leaderboards, but did not find an equivalent offset/page API for social leaderboards. Is there any supported way to retrieve friend leaderboard entries 51-100, 101-150, etc., without requesting all prior entries? 8. Billing and API Counts

    Is GetSocialLeaderboard counted as one API call regardless of the number of friends returned?

    Are there additional billing or performance considerations based on response size or number of leaderboard entries returned? 9. Recommended Usage

    Are brainCloud Friends suitable as an app-specific “mutual follow friend cache”?

    We will not use brainCloud Friends for unrelated gameplay relationships. We plan to keep FOLLOW as our source of truth and use brainCloud Friends only as a derived mirror/cache for mutual follow relationships. Does this align with recommended brainCloud usage?

    Thank you.

  • Suggestions for improvements, new features, etc.

    43 Topics
    138 Posts

    Dear @dbgtdbz2 ,

    About your feature request #1, “Please allow specifying items as conditions for purchasing virtual or bundle items."

    I have developed a mockup for this feature.

    If we add your Prerequisite Items request to the system as shown, will this work for your needs?

    Note that in this implementation, the prerequisite requirement applies only to a Virtual Currency transaction. PrereqItemsMockup.png

    Please let me know at your convenience,
    Regards,
    John H
    -Design

  • Questions specific to particular APIs, libraries, etc.

    64 Topics
    266 Posts

    Added the additional details to 13660

  • General cloud code discussions...

    35 Topics
    149 Posts

    Q1: The removed player is completely excluded from reward calculation, so if the deletion happens before the job runs, that player is never iterated over and receives no rank or rewards.
    Q2: Yes, the modified score will be used. The job always reads live state. Note that whether the score actually gets modified depends on the leaderboard type (e.g., for the LOW_VALUE type, only updates if the new score is less than the existing)
    Q3: No backfilling, the next joiner goes to the latest instance, not the freed spot in ^2. No loop over earlier instances (^1, ^2) ever happens. The next joiner goes to ^3 (or ^4 if ^3 is full). The freed spot in ^2 stays empty permanently.

  • brainCloud's online learning tutorials and examples.

    3 Topics
    3 Posts

    brainCloud developers have just release several playable builds of our famous examples! See our cool features in action. Find them at https://getbraincloud.com/demos for Windows, Mac, online and mobile.

brainCloud 5 is alive!

brainCloud 5 features Portal-X (our next-gen portal), Integrated Forums (you found them), our new Bootcamp training videos, and more!

Join the discussion here!

brainCloud Bootcamp!
brainCloud's new video learning portal is now online! Go check out brainCloud BootCamp!

Need to report a defect?
Use the chat widget from the Design Portal - or send an email to support at getbraincloud.com. Thanks!