question

Nykos avatar image
Nykos asked

List of players

Hi, i am working on a project that needs to have access to some kind of list of every player in the game. Actualy it mustn't be ALL players but all the players in the same geographic area, whether they are currently playing or not.

So i'd like to know , first if there is a way to do it with Playfab, and then if yes, what kind of way should start with?

I don't need it updated always, just once when i load a map.

So, can i do it with Playfab alone, or do i need to use something else like photon?

Thanks in advance,

Nicolas.

Player 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

There have been a couple of discussions on this in the forums, such as this one: https://community.playfab.com/content/idea/248/205972768-How-I-can-get-all-player-list-at-once-.html.

Some of our upcoming updates, like bulk actions on users, will help with some scenarios, but this sounds more like you're designing a matchmaker. If you can describe the feature you are designing, we can help to determine the best approach.

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

Nykos avatar image Nykos commented ·

I just want to get a list of all the players that have registered to the game i'm making. Just a simple list which will display the playerIds, and other datas.

Then i will sort them by distance to my player and only keep the ones close enough. Then if i click on someone's playerId in the list, i can access his user datas.

I know how to access user datas of other players ( with playerIds and GetUserDataRequest if i'm not mistaken), but i need to have the playerIds to do that. I think it's doable with friends, bu is there a way to get everybody?

0 Likes 0 ·
brendan avatar image brendan Nykos commented ·

No. As stated in the other posts on this topic, a general query on the table could potentially be for millions of records, which would impact performance. It sounds like you're attempting to build an asynchronous matchmaker. If so, we have a fairly extensive thread on that topic here: https://community.playfab.com/questions/515/207129407-Persistent-turn-based-games-.html

0 Likes 0 ·
Nykos avatar image Nykos brendan commented ·

OK thanks a lot, i will have a look at it right now.

0 Likes 0 ·
Nykos avatar image Nykos commented ·

About the link you posted , is there a way to update the datas everytime someone registers an account or does it have to wait the end of the day to have it updated?

I mean, if a new user registers , is he instantly added to the report so i can find him if i update my list?

0 Likes 0 ·
brendan avatar image brendan Nykos commented ·

Those are daily reports, meaning they are all the data for the day in question, and they are generated at the end of that day.

0 Likes 0 ·
Nykos avatar image Nykos brendan commented ·

ok thanks for your help

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.