Get the number of player for each region

Options
Hello everyone, I wanted to create an app that tells me how many players are online in my game. I've tried to do that but it tells me only the player connected in my region. The same with the rooms. How can I do this? Thank you

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @ExagonGames,

    There is no straightforward out-of-the box way to get all the numbers at once.
    So you need to:
    - Using a single client: iterate over all regions that you get using operation GetRegions and connect to each region separately and get the stats.
    - Using multiple clients: a client per region. Not recommended as you have to handle multiple connections one per region.
    - Use special clients just for stats: they get stats and send them to a web server and then query those stats from other clients.
  • JohnTube said:

    Hi @ExagonGames,

    There is no straightforward out-of-the box way to get all the numbers at once.
    So you need to:
    - Using a single client: iterate over all regions that you get using operation GetRegions and connect to each region separately and get the stats.
    - Using multiple clients: a client per region. Not recommended as you have to handle multiple connections one per region.
    - Use special clients just for stats: they get stats and send them to a web server and then query those stats from other clients.

    Yea, I think that the first option is the best. Thank you