   Retriving game stats from various multiplayer games
  Hi guys, I'm looking to make an application that will monitor my multiplayer gaming stats. I see software like gamespy, xfire etc having the ability to retrieve information (players, current map, game type etc) from a whole host of different games. Does anyone know how they retrieve this information? Is it a different method for each game?Thanks in AdvanceMono   
  Games that use gamespy actually include libraries for the gamespy service (see http://www.gamespy.net/matchmaking.php)All games that use gamespy report gamestats through this library. Other games using different services, use different methods.  There is no one standard for sending game data to a lobby server.The most common methodology to do this is to have the clients register themselves with a lobby server, and send periodic updates.Say you were to make your own lobby server. The process might go as follows (I'll include NAT punchthrough as well):1. Player starts up a Gameserver.2. Host connects to central lobby server and sends game info (map, number of players etc)3. Central Lobby server records game, and info in it's database.4. Game Server send periodic "keepalive updates, with current game stats (num active players, kills, etc)5. Central lobby server updates game record when a keepalive is recieved.6. Another player starts up a game as a client.7. The client connects to the Central Lobby server, and requests a game list.8. The central lobby server sends a list of games which have registered themselves to the client.9. The client selects a game and either connects to the game server directly using info in the game list, or sends a request to the lobby server to connect.The reason the client would request to connect to a game through the lobby server is to allow NAT punchthrough to take place.  If a player is behind a router, his machine is not directly accessible by other clients. By requesting to join through the lobby server, the lobby server can send a message to the game server (over the same connection the keepalives are being sent) telling it of a connecting client, and it's IP and port.The game server can then start sending keepalive packets to the ip and port (which opens up a hole in the NAT for game traffic) The joining client sends to the game server's IP and port, opening up a hole in the NAT on the clients side.Now both machines can communicate, and the client can join the servers game.;  Excellent info thanks! the other companies like xfire (http://www.xfire.com), are they likely to be interfacing the gamespy API? have their own? or using a hack of some kind? I wouldnt imagine that the game developers wouldnt be wanting to integrate with all these companies   ;  I would assume they are using a Hack or wrapper. I haven't used the product, but it seems like you load the Xfire client, and launch games from within it. The XFire client then knows who is joining what games, and what parameters they are using, and sends that information to the xfire server. It seems that some games have more support than others (some games you have to cut & paste IP addresses,  others connect in 1 click - I would assume these are games that support commad line network arguments to start games)I would wager that you can only see games from people who use xfire.  If a game supports gamespy and starts it without the xfire client, it probably would not show up.   ;  ok excellent thank you   