Idea

brendan avatar image
brendan suggested

Friend suggestions

10 |1200

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

5 Comments

·
brendan avatar image
brendan commented

quirkster
started a topic on Thu, 23 April 2015 at 12:30 PM

There are lots of features to help users connect and interact with friends they already know. But a big challenge exists around helping new users find their first friends to play with as part of the on boarding process.

While random matchmaking is a great tool here, it would also be great to suggest potential friends to users based on whatever criteria is appropriate to the game.

I don't see any server calls to search and return a subset of the user base. Since downloading the entire user base to the client would be expensive, I'm hoping for some shortcuts that we could use in cloud script. For example, from generic to specific...

GetRecentPlayers(#) could download the most recent players that logged into the game. This alone would be a great starter list for newbie matchmaking or any real-time games

GetActivePlayers(#, timespan) could download the players with the most logins over the timespan. These folks would likely make good ambassadors

GetFrequentPlayers(#, timespan, PlayerData variable) could download players with the most matches played of a certain game type as stored in PlayerData, etc.

There are lots of ways to skin the cat here, just as long as we had some tools to query the user base based on some set of criteria and get PlayfabIds in return.

Thanks!

10 |1200

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

brook avatar image
brook commented

Hi, Bredan

I was try to implement the friend suggestion list.

What I have done is that I create a cloud script that call GetPlayersInSegment and the segment I request is the segment which filter Level in Static value and last login time. The problem is I try to call this function via https://api.playfab.com/documentation/client/method/ExecuteCloudScript but the result is that "Error": "CloudScriptExecutionTimeLimitExceeded" look like the request is taking more than 7 second and it exceed time limit. What you suggestion?

below is the cloud script code

handlers.getSuggestionPlayer = function(args) { //segment for lvl less than 10 var segmentID = "B55456521E8845C9"; var result =server.GetPlayersInSegment({ "SegmentId": segmentID, "SecondsToLive": 300 , "MaxBatchSize": 10 }); return result; }

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.

brendan avatar image brendan commented ·

The GetPlayersInSegment call does a full re-evaluation of the Segment, so it's really not something I could recommend using in a Cloud Script. For any non-trivial player population, it's very likely you'll be hitting the script execution time limit.

Can you describe what the logic is you're trying to use to determine what players to recommend as potential friends?

0 Likes 0 ·
brook avatar image
brook commented

I want to have the player that has level close to player and still active in a week, from what I read I found "GetLeaderboardAroundPlayer" function which solve the first bit but what I need is that those player is still active such as their last login is less that a week.

10 |1200

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

Raf avatar image
Raf commented

    The way i solved it was by creating a leaderboard using a number based on the time of login and fetched the top of the list. I also don't post the "score" if the player has maxed their friend slots. (so they don't show up when you fetch the leaderboard)

    in my case i used minutes passed since Jan 1, 2022 as the "score"
    10 |1200

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

    Claire Rochelmeyer avatar image
    Claire Rochelmeyer commented

    Would be great if you could look at existing Friends-related Feature Requests that have been kicking around for years amongst the dust-bunnies. Instead of getting your staff to pose as users, adding new requests to congest the already overflowing pool.

    See this one for an example that's still relevant on major platforms today *cough*PS4&PS5*cough* (you know, Sony, yeah? Big company, but you might have missed it, that's okay. Oh yeah, what about Nintendo? No? Don't know it? Right...)

    https://community.playfab.com/idea/45768/adding-or-removing-friend-friend-with-a-list-and-o.html

    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 a Comment

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

    Your Opinion Counts

    Share your great idea, or help out by voting for other people's ideas.

    Related Ideas