So many games have boards of servers with player counts and average ping. I don’t see a way to do that in mirror without actually connecting to the server. I can kinda figure out ping but that doesn’t tell you if the server is up or not. I was told to make the servers call an external service but that seems like more work that it needs to be. How do others do it?
There is only two ways: connect to the server (temporarily) and get that data. Or have servers push their stats to a central web server that clients can poll via web requests.
In Fishnet, a lot of folks use FishMMO. A community driven modular framework for large scale MMOs.GitHub - jimdroberts/FishMMO: FishNetworking MMO Template
Check out their discord if you have specific questions about it. Super friendly folks.
The same idea apply to all the other networking solutions. So, you can get a good grip by looking at how they made the framework.
Start with a central login server that maintains authentication, character creation, world selection, etc. and move players to servers as needed while aggregating information to the central server. The login server can have 10s of thousands of users and you can have Nth login servers as needed to scale the game. The login server does very simple tasks so it can handle a considerable amount of users at a 1-2 tick rate compared to a game world that has physics simulations and whatnot at 15+ tick rate.
Another option is to push to a web server to show stats and whatnot. Bit more work.
I’m using mirror. I have a secondary application that I’m trying to connect to the server temporarily with but it rejects the connection. I should probably figure out why.
A central server kind of makes sense, still would be hard to do pinging with but also adds cost and complexity. Thanks for the input guys.
Hmm, should be a way in Mirror, somewhere with the ticks. If not, you can always use 2 RPCs, 1 from the server to the client with time of the RPC, RPC back to the server from the client, divide by 2, and multiply by 1000. Probably a good idea to average it over 5 seconds or something.