Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have seen some sites which shows servers(for online games) from various parts of world with there name and ip's. I am looking forward to develop something of same sort.

But the issue is how to get all the IP's of servers playing a certain game. Is there any criteria for the same. For eg: I want to list all online servers from US which are playing Counter Strike and also to get the players in it and other info.

share|improve this question
I think typically those servers work by reporting themselves to a master server. Without being that server or having access to it, I don't think this is possible. – Tetrad Dec 22 '11 at 18:42
@Tetrad, there are applications out there that do this, so there must be a way. HLSW is a popular one: – John McDonald Dec 22 '11 at 20:01
@JohnMcDonald, @Tetrad - I know abt master servers and HLSW both. But HLSW must be getting the data from somewhere. Need to know that somewhere and how to get it. – Varun Dec 27 '11 at 10:06
@Varun, yeah, see my answer, it's not published. – John McDonald Dec 30 '11 at 0:56

It's different for each game. For Valve games that don't use the P2P server technology (CS 1.6, DoD 1.3, CS:S etc), there will be a list of server IPs that Valve will maintain. I don't believe that Valve publishes how to to access this list, so you may have to figure that part out yourself using tools like WireShark.

Once you get this list, you will need to connect to each IP using a specific port and figure out how to ask each server for its current information (map, player count, etc). This part will likely be using UDP. Again, I doubt that Valve or other companies will publish how to do this and you'll have to figure it out yourself.

I'll elaborate on what I said at the top: this process will be roughly the same for all games with a server list, but the ports and protocols will all be different for different developers.

As for listing which server is in what country, hopefully the server provides that information, but if it doesn't you can use something like GeoIP:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.