Forums  ·  Maps  ·  Files  ·  Steam Skins  ·  Tutorials  ·  Tools  ·  Faqs  ·  Search  ·  Submit Content join cs planet 
Counter-Strike
Forgot? · Register?
ReliableServers.com
reliableservers.com Dedicated Server Hosting
  Source and Half-Life Game Server Browser » Comments Online: 161 · 399 399 requests per minute
Browse all
de · cs · as
fy · he · ka Wad files
  Home  Search  Maps  Files  Skins  Forums  »   Need help? try search  

Source and Half-Life Game Server Browser

Posted by Sebastian · 06/22/09 @11:07 pm · addons · 12 comments
A little tool that was submitted to query Source and HL1 servers:
I wrote a piece of software that allows software developers and website owners to query any game based on Valve's Source and Half-Life protocol. Currently there is very little to no DLL/class library out there that does this with the exception of PHP-based solutions. Those are useless if you want to use them in a piece of software or if you need everything in a single DLL.

The direct link to the project page of my blog is right here: http://aplawson.com/game-browser-project/

Greenhorn
You can get this Server/Query browser here (note: registration seems to be required).


 

Author
 

Sebastian
Lost in space
avatar
So..

this is like a basic version of HLSW?

what kind of back-end to query from a web browser, i mean is it like QSTAT? perhaps not force ppl to register to download.

i've used qstat in the past, but found it rather slow when querying a few hundred servers (let along a thousand++), became too slow so i've scrapped that ideas (building a server page with a list of all servers).
» · 2009-06-22 23:18:54 · print  

Greenhorn 
(unregistered)
It's not HLSW but...

"this is like a basic version of HLSW?"

This is just a class library that allows people to query Source and Half-Life games in their own projects. I released it as open source because when I needed an example of how these servers are queried, I couldn't find anything online that worked. But you're right, it's like qStat except that it isn't used at the command line but in software projects or compiled into other types of projects or even used on Windows servers running ASP or ASP.NET.

You made a terrific point about this being used at the command line. I will probably add a command version that doesn't use a GUI if that helps. When I do I'd love to get your feedback if it's good or slow or whatever.

P.S. Downloads don't require registration - the CodeProject article was probably still being moderated by the editorial staff when the news was submitted. Now that it's not being moderated, members OR visitors can read and download the code.
» · 2009-06-23 10:23:46 · print  

scub
Member
query

Will this work for all HL mods?
» · 2009-06-23 12:12:47 · print  

Sebastian
Lost in space
avatar
Re: It's not HLSW but...

there used to be an app for Half-life gold called Ugly gamestats (don't remember the exact name) but basically it accepted a config of servers (say a plain text document full of IPs) and it would create a nice little page/status of the servers. it created a static page similar to what Qstat can do, but it was more simple for the end-user to use. Not sure what happened to the project as i think it died years ago.,

also the downside to the current game queries out there is you have to know the game type before you can query the server.. would it be possible to just input an IP and it'll spit out what game it's running (whether source or hl gold) along with the rest of the server info? my guess is you would have to tell it what game ahead of time so it knows what packet/info to send since i assume both gold and source are slightly different in how they query servers.

Qstat was great when it was just for HL, but after Source it just became inefficient to use, so its nice to see some new query tools since its been lacking out there. it could lead new ways to create some cool web apps (like the HL Master page we used to have)
» · 2009-06-23 15:01:51 · print  

Greenhorn 
(unregistered)
Re: query

It supports all Source and HL mods. And right now, this library does NOT require that you know the name of a particular game or mod. When you query the master servers, every game listed with the master servers is displayed. If you query an individual server, you need only specify the IP and protocol (Source or Half-Life) and it will output the data. If it's Left4Dead or CS:Source, it doesn't matter. The protocol is what is used to get and parse the returning UDP packet stream.

Test the tool (there's a download for the source code and a pre-compiled EXE). You'll notice that no matter what active IP/port you use, if the game is based on the Source or HL1 engine, it will return the server details properly. At least, it's displayed everything I've tested so far anyway.

And this tool should be WAY faster than QSTAT when because with qstat.exe, people have to capture the output from the command line then parse the data. With my tool, the data is streamed directly to the caller (ASP page/your application) so there's no need to get the data then parse it a second time. Nothing in the middle should mean faster results.

Incidentally, next I want aQuery (my project's name which is short for "Adam's Query" (my name is Adam)) to support sorting the Master Server list by name. Currently it can sort by all sorts of variables (even during the middle of the query process) but I want to be able to sort by server name so you can look for a specific server (or see if your server is listed).
» · 2009-06-23 18:19:32 · print  

Greenhorn 
(unregistered)
Project was added to Valve's official WIKI

http://developer.valvesoftware.com/wiki/Server_Queries

Project library has been added to Valve's development wiki as a new implementation; I found out because I started getting referrers from developer.valvesoftware.com...

Cool beans! : )
» · 2009-06-23 18:25:23 · print  

Greenhorn 
(unregistered)
Querying hundreds of servers - the quick way

Instead of running aQuery for every server in your list every time the ASP page is called (not sure if you're doing this), create a background process on your Windows webserver (just run an exe in the background or as a service) that queries a list of servers and dumps them into a database. This way, when your webpage loads it should display the latest info on whatever servers you've queried so far. If you use AJAX, the tool I created actually *streams* results as they are received so it could potentially stream the results directly onto a webpage if you know a little about AJAX/SOAP and those types of web services.

And creating an executable for your service should be incredibly easy to do: Import the library in your project then call the QueryServer() method which can then stream the info anywhere you want to send it.
» · 2009-06-23 18:32:31 · print  

Klau3
Member
Search cs 1.6 server - all your maps - one click

As mapper I would really love to see a website where I can search with one two clicks all server for my different CS maps (maybe add a button on cstrike-planet "search cs 1.6 server for all your maps").
I just created to much maps to do it manual within an acceptable time. This would give me feedback and allow easily to gain something back from the public out there by playing with other people around the world. I think other mappers would love this function too and adding it would be a nice extra for cstrike-planet.

Once I found through Google an Iranian CS website where people could download one of my maps, that was really amazing. I just could read the name of my map and the link - the rest was written in these cool unknown Arabic fonts.

I know, this post is a little out of topic...

Thanks for reading/thinking of it
Klau3
» · 2009-06-29 20:26:23 · print  

Ryobii 
(unregistered)
release?

When will we see the master list??
» · 2009-07-02 03:29:34 · print  

Sebastian
Lost in space
avatar
Re: Search cs 1.6 server - all your maps - one click

yeah the ability to search maps is possible <servers running>.. when? depends when Greenhorn cooks something up for us to use
» · 2009-07-02 06:20:06 · print  

Greenhorn
Member
Some ideas

I could create another filter where you can filter master server results by a certain filter term found in the master list. The filter would apply to the server name or the name of the map. Would that help?

Also, the tool I created is just a DLL library with a demo application providing an example of how it can query all game servers based on the Source and HL1 protocols - it's not a final product and wasn't intended to be. If it would to have an simple exe that outputs server data (like an exe executed from the command line for instance) or if this website wants to implement a Source/HL server search function on their website, let me know and I'll see what I can do to help you guys.

Thanks!


Greeny
» · 2009-07-02 15:14:39 · print  

Greenhorn
Member
Basically, I created the library so others could use it in their own applications, not necessarily to create the application itself. Let me know what you guys need and maybe I can put it together.
» · 2009-07-02 15:16:49 · print  
 
Posting comments on this article has expired on July, 22nd, 2009.
 


Sponsored by ReliableServers.com Saturday, 20-Mar. 22:15:38 · feedback
© 2001-2008
Hosting & co-lo reliablesevers.com - Terms of Use - Privacy Policy. Use of this site signifies your agreement.
Not registered? Sign up