Wrong game/peerCount in Photon javascript?

MolokoMoloko
edited November 22 in JavaScript
Hi,
I made a little node.js script to retrieve player and game counts from all region master servers. It seems fine but it doesn't show actual player numbers from the game. It seems it only counts the WebSocket client that is used to retrieve the information from Photon servers. Are WebSocket connections treated differently than UDP from the game? Or is this a bug? Or am I missing something?

My node.js script: https://pastebin.com/ZTdnaBdy

Logs output:
[0] State: ConnectingToNameServer
[0] ============ ws://ns.exitgames.com:9093/*APPID*7ea4?libversion=4.1.0.0
[0] ============
[0] State: ConnectedToNameServer
[0] Photon regions:
[0] eu : ws://***.exitgames.com:9090
[0] us : ws://***.exitgames.com:9090
[0] usw : ws://***.exitgames.com:9090
[0] cae : ws://***.exitgames.com:9090
[0] asia : ws://***.exitgames.com:9090
[0] jp : ws://***.exitgames.com:9090
[0] au : ws://***.exitgames.com:9090
[0] sa : ws://***.exitgames.com:9090
[0] in : ws://***.exitgames.com:9090
[0] ru : ws://***.exitgames.com:9090
[0] rue : ws://***.exitgames.com:9090
[0] kr : ws://***.exitgames.com:9090
[0] State: ConnectingToMasterserver
[0] ============ ws://***.exitgames.com:9090/*APPID*?libversion=4.1.0.0
[0] ============
[0] appStats: 1 0 0
[0] eu (1/12) : games 0 master peers: 1 peers 0
[0] Connecting to: us
[0] State: ConnectedToMaster
[0] onLobbyStats: 1
[0] lobby: lobbyType: 0 peerCount: 0 gameCount: 0


Says peerCount 0 although my game client is running and connected.

Comments

  • JohnTubeJohnTube mod
    edited November 22
    Hi @Moloko,

    There are two types of stats: Application Statistics and Lobby Statistics.

    [0] appStats: 1 0 0
    [0] eu (1/12) : games 0 master peers: 1 peers 0
    1 peer on Master Server
    [0] Connecting to: us
    [0] State: ConnectedToMaster
    [0] onLobbyStats: 1
    [0] lobby: lobbyType: 0 peerCount: 0 gameCount: 0
    "peerCount 0" is how many peers joined to default lobby (null or empty name).
  • MolokoMoloko
    edited November 26
    appStats masterPeerCount = 1. But that is just the javascript client connected to fetch the stats from what I undetstand. When I connect with my game, it doesn't change any of these stats. IT doesn't even count new game rooms.

    It seems like the WebSocket stats are different than the Unity game photon stats :(.
  • Hi @Moloko,

    It must be because you are connected using a different AppVersion.
    So PUN client and JavaScript client are connected to different virtual applications and can't see each other.
    Read more here.
  • YES!
    Solved. Thanks @JohnTube. I wasn't aware that AppVersion is actually {gameVersion}_{PUN_version}. So I had to set that in the javascript client.
Sign In or Register to comment.