question

cqatproject avatar image
cqatproject asked

GetPlayersInSegment : Specification of the needed player profile information to fetch

Hi everyone,

I just want to ask if is there a way on specifying the profile constraints with the call GetPlayersInSegment to make the json result to have only the needed information like for example: PlayerId, Displayname and AvatarUrl only. Right now, all the player information we're being fetch which includes the Statistics and etc. but we don't need those information. Processing those information with your JsonWrapper, make a huge memory usage which is a cause of 3-4secs lag in the devices.

Any information will be much appreciated.

Thanks. Cheers!

apisPlayer Data
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

·
brendan avatar image
brendan answered

Can you please describe your use case? As stated in the docs, the GetPlayersInSegment call is very resource intensive (as it does a full evaluation of the segment when it is called), and should never be triggered as a result of a client call.

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

cqatproject avatar image cqatproject commented ·

Hi @Brendan,

Thank you for the reply. We have a feature that needs to get the list of all the players for our app and we found GetPlayersInSegment as the way for it. However, if we fetch the list in 1 call for ex. 5000 players in one call, it gaves a huge lag (which we do per login only)

But, we have solved it by using the ContinuationToken and get the list part by part and not all at once until we fetch all the players.

0 Likes 0 ·
brendan avatar image brendan cqatproject commented ·

Yes, I understand that you want to get a list of players. What is the actual design feature this is meant to enable? Having this call made by any client action - even login - is not an option. I can't emphasize this enough: That would be guaranteed to fail in a live title. I'd really like to help you find another way to solve for your design, but I need the information on what the actual gameplay feature is, in order to do that. Can please you provide that info?

0 Likes 0 ·
cqatproject avatar image cqatproject brendan commented ·

Hello @Brendan, we used it for our Search Player feature. We are fetching all players and saved it in an array for faster search results. For this we can show a list of players with the prefix they entered.

0 Likes 0 ·
Show more comments
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.