question

hampusbankler avatar image
hampusbankler asked

How many players are currently logged in?

Is there something I can query to get a rough count on how many players are currently logged in? It doesn't have to be exact,

10 |1200

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

Falcon Land avatar image
Falcon Land answered

For now you could use Photon Chat for this. Just make sure to register all users to the same chat room when they login. Then you can count the number of player in the room. However keep in mind that it could be double edged sword. If you have low player base it could deter new players from playing your game if they see too few player playing with them.

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.

hampusbankler avatar image hampusbankler commented ·

Falcon Land, thanks. That's actually exactly the solution I ended up with. :)

0 Likes 0 ·
brendan avatar image
brendan answered

Not currently. The existing sign-in provides a session ticket, which has a long expiration time (currently 24 hours), and there is no "sign out" call - you just re-use the ticket until it expires. We will be updating with a true session-based system which will allow for invalidation of the current client ticket, at which point we'll also be adding more functionality around signed-in players (such as current sign-in state).

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