Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Brent Batas (Lisk) · Aug 07, 2019 at 04:48 PM · MatchmakingCustom Game Servers

What does the players column mean in Servers 2.0?

I'm looking at the servers 2.0 dashboard and it looks like this:

What does the players column mean? My first guess would be that there are 200 players connected to this server or that this server has a capacity of 200 players, but neither seems to make sense to me. This is a test server with nobody connected to it at the moment. Also, if it's StandingBy, doesn't that mean nobody is connected to it?

Additionally, my matchmaking has two queues right now with match size of 8 and 4 and my setup is only running 1 server per machine, so again I don't know where this 200 is coming from.

screenshot-8-7-2019-9-39-23-am.png (36.0 kB)
Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brandon Phillips · Aug 07, 2019 at 10:21 PM

I think something might be broken in your GSDK code, as the player count should only update when you call UpdateConnectedPlayers()

static private List<ConnectedPlayer> players = new List<ConnectedPlayer>();

static void OnPlayerConnected() {
    // When a new player connectes, you can let PlayFab know by adding it to the vector of players and calling updateConnectedPlayers


    players.Add(new ConnectedPlayer("player_tag"));
    GameserverSDK.UpdateConnectedPlayers(players);
}
Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Brent Batas (Lisk) · Aug 08, 2019 at 03:16 PM 0
Share

Thanks for the tip - I am actually not even calling UpdateConnectedPlayers yet; I haven't tried to connect to the server yet, I just wanted to see if the server could start up properly and that I could retrieve logs for debugging.

In your example, is "player_tag" just a hardcoded value or should I be replacing that with the player's ID of some kind?

avatar image Brandon Phillips Brent Batas (Lisk) · Aug 08, 2019 at 06:05 PM 1
Share

@Brent Batas Sorry, that's PlayFab's example for their C# GSDK. Here's what we do in our Unity game server:

public override void OnServerAddPlayer(NetworkConnection conn, AddPlayerMessage message) {
    players.Add(new ConnectedPlayer(conn.connectionId.ToString()));
    

    if (isReady) {
        GameserverSDK.UpdateConnectedPlayers(players);
    }

    base.OnServerAddPlayer(conn, message);

}

We use the player's server ConnectionID as the Player Tag, although it might be better practice to use the Player's username or PF ID or something like that.

To better answer your initial question: That player number you see in the Game Manager should only show the amount of players in the "players" List. For example, if one person connects to our game server and OnServerAddPlayer() is called, the Game Manager will show the number "1" for the Players number

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    4 People are following this question.

    avatar image avatar image avatar image avatar image

    Related Questions

    Is GetInitialPlayers() guaranteed to return teams together? 1 Answer

    Unreal Engine Dedicated Server/Client Architecture,Unreal Engine 4 Dedicated Server - Client Architecture 1 Answer

    Game match ID system 1 Answer

    Handling when servers are still starting up and player needs to create a new match? 1 Answer

    500 Internal Server Error when calling Matchmake 2 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges