I play Titanfall 2, an older game whose regional multiplayer populations can be fairly small. The busiest region seems to change depending on the time of day. When connecting, the game displays a message such as "Attempting connection (x of x)," and a higher number of connection attempts generally seems to correspond with more players online. I'm new to programming and have recently learned how to ping servers. Is there a way to contact each regional server directly and retrieve its current player or connection count?
4 Answers
Game servers sometimes provide status details, but this is entirely up to the server’s design. Older games often had simple server-query protocols, while modern services commonly hide player counts to reduce abuse and denial-of-service risks. Check for official or community documentation before trying to query anything.
It may be possible, but only if the game’s servers expose that information through a documented query or status protocol. You would need to find out how Titanfall 2’s matchmaking and regional servers communicate, then send a properly formatted request to the relevant address and port. A normal ping only measures network reachability and latency; it cannot tell you how many players are connected.
The answer also depends on the network model. In a peer-to-peer game, some player information may be discoverable from the participating clients. In a client-server system, you generally cannot obtain connection counts unless the server intentionally provides a status endpoint or query protocol.
You could investigate the traffic generated while the game searches for a match using a packet analyzer such as Wireshark. That might reveal which endpoints and protocols are involved, although the traffic may be encrypted or handled by matchmaking services rather than the regional game servers themselves. If you identify a query mechanism, Python sockets or a command-line tool could send requests in the format the service expects.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically