[Project] Nanogrid
Insane
Anomaly Join Date: 2002-05-13 Member: 605Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer
<div class="IPBDescription">Web-Based Server Browser</div><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo--><a href="http://hypernovadesign.co.uk/nanogrid/" target="_blank">Nanogrid Server Browser</a><!--sizec--></span><!--/sizec-->
<!--coloro:#008080--><span style="color:#008080"><!--/coloro--><b>What It Is.</b><!--colorc--></span><!--/colorc-->
Nanogrid is a web-based server browser for NS2, written in JavaScript and PHP.
<!--coloro:#008080--><span style="color:#008080"><!--/coloro--><b>What It's For.</b><!--colorc--></span><!--/colorc-->
Nanogrid lets you browse and connect to NS2 servers from your web browser. Since the current in-game menu is in a transitional state and lacking some features, I thought I would post this up as it might be of use to some people. It has a couple of features the in-game menu doesn't have yet, most notably sorting by name, map and player count. You click on any server to see the player list, which I find quite useful for seeing if anyone I know is playing on a server. It also displays the build number of a server, and the tickrate of servers running player's <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=112026" target="_blank">GameOvermind</a> admin mod.
<!--coloro:#008080--><span style="color:#008080"><!--/coloro--><b>Why It's Here.</b><!--colorc--></span><!--/colorc-->
Squad 5 seemed to be the best place on the forums to post this. I am a developer, but this was done in my spare time as a personal project, so I reckon it fits in here ok.
Feel free to post any suggestions, feedback or feature requests!
<!--coloro:#008080--><span style="color:#008080"><!--/coloro--><b>What It Is.</b><!--colorc--></span><!--/colorc-->
Nanogrid is a web-based server browser for NS2, written in JavaScript and PHP.
<!--coloro:#008080--><span style="color:#008080"><!--/coloro--><b>What It's For.</b><!--colorc--></span><!--/colorc-->
Nanogrid lets you browse and connect to NS2 servers from your web browser. Since the current in-game menu is in a transitional state and lacking some features, I thought I would post this up as it might be of use to some people. It has a couple of features the in-game menu doesn't have yet, most notably sorting by name, map and player count. You click on any server to see the player list, which I find quite useful for seeing if anyone I know is playing on a server. It also displays the build number of a server, and the tickrate of servers running player's <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=112026" target="_blank">GameOvermind</a> admin mod.
<!--coloro:#008080--><span style="color:#008080"><!--/coloro--><b>Why It's Here.</b><!--colorc--></span><!--/colorc-->
Squad 5 seemed to be the best place on the forums to post this. I am a developer, but this was done in my spare time as a personal project, so I reckon it fits in here ok.
Feel free to post any suggestions, feedback or feature requests!
Comments
Been testing out the Steam URI, and it either seems like Steam cannot handle the NS2 servers, or that NS2 servers aren't responding properly to the query response. I am unaware of how NS2 servers actually respond to query requests, but they have no reply for standard Source queries.
My fav thing is you can see which players are in which servers.
I actually based some of the design on concepts for the main menu and marine UI, so I would expect the finished in-game browser to look similar (but much better).
<!--quoteo(post=1937729:date=May 20 2012, 05:32 PM:name=Aezay)--><div class='quotetop'>QUOTE (Aezay @ May 20 2012, 05:32 PM) <a href="index.php?act=findpost&pid=1937729"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Been testing out the Steam URI, and it either seems like Steam cannot handle the NS2 servers, or that NS2 servers aren't responding properly to the query response. I am unaware of how NS2 servers actually respond to query requests, but they have no reply for standard Source queries.<!--QuoteEnd--></div><!--QuoteEEnd-->
It's a bit of a tricky one. <a href="http://steam://rungameid/4920" target="_blank">steam://rungameid/4920</a> works just fine, but the server just doesn't respond to a steam://connect/ link. NS2 does however implement the Source server query protocol pretty well; Nanogrid is based on <a href="https://github.com/xPaw/PHP-Source-Query-Class" target="_blank">this</a> PHP class.
<!--quoteo(post=1937742:date=May 20 2012, 06:46 PM:name=Floodinator)--><div class='quotetop'>QUOTE (Floodinator @ May 20 2012, 06:46 PM) <a href="index.php?act=findpost&pid=1937742"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Is that Buildinfo correct? Because I see Servers running ob B203/B189/B199/B207/B193/B187!!!!?<!--QuoteEnd--></div><!--QuoteEEnd-->
That's the info that Nanogrid gets back from those servers when it queries them. It doesn't particularly surprise me to discover that there are out of date servers out there. If you find a server that you know for sure has the wrong build number (for instance you can join it on 208 but its listed here as 203), let me know.
I always thought that was because NS2 wasn't officially released on steam. The same as it doesn't show to friends who don't own it. If you are already in-game then you can join through friends, but it doesn't work directly from the friends list.
One of the things I wrote when learning how sockets and network programming worked, was a tool that could query source servers for info, players and rules. Using this tool, I have no problems getting normal source servers, such as tf2, cs, ns1 and others to reply to my queries; no such luck with the NS2 servers though. I know NS2 isn't using the source or goldsource engine, like the other servers I had success in getting info from, but maybe that is the problem? As Wilson said, the game isn't properly released on Steam, and thus it might not know how to query the NS2 servers?
Doing some quick investigating, using Process Monitor, I noticed when trying to refresh the server details of Steam's Game Info dialog, it sends out 25 bytes of data to the NS2 server, it does however not receive any data back. I'm pretty sure the data Steam sends out is "<!--coloro:#FFFF00--><span style="color:#FFFF00"><!--/coloro-->ÿÿÿÿTSource Engine Query\0<!--colorc--></span><!--/colorc-->", exactly 25 bytes.
I will admit I know too little about all there is to know about source protocol queries, like RCON and packet compression, so if NS2 is using any of that, just ignore my post.
Someone needs to give devicenull an award for most unupdated server :)
NS2 uses different ports for the query-responder and the client-connects, and that ###### with Steam a bit. What you can do to get it to work right now (well, at least when +connect is supported), is use "steam://run/4920 +connect <IP>:<Port>", that ought to work.
It's using a different port to respond to a query request?! How are you suppose to know which port that is?
From a networking perspective, how does this make more sense than just replying on the same port?
Is this also the reason why Steam's "Game Info" dialog doesn't work and won't show any information for NS2 servers?
God, it's so simple it hurts, I didn't think of that. You don't pass parameters to the app with Steam URIs like that, though, which is why it's not working.
I just tested and "steam://run/4920//connect IP:Port" works, the port needs to be the game port, though. Since he's parsing my data, that's already done... Only need to update the links he's generating and it will work.
Topic post updated.
never the less great job man and thanks for this.
never the less great job man and thanks for this.<!--QuoteEnd--></div><!--QuoteEEnd-->
Can't fix that, it's the only way to make the joining actually work. It launches NS2 and passes the connect parameter...
I'm considering making some changes that will allow you to connect to Nanogrid via the Steam Overlay web browser and connect to a server inside that instance of NS2, which ought to solve that issue.
I know is really easy to spot servers with players, but just for cleaning the not so long server list( that we have now) that i expect it will be longer as we approach the 1.0 and linux dedicated servers.
<ul><li>Filter out empty servers.</li><li>Filter by map.</li><li>Filter by country.</li></ul>
<!--quoteo(post=1938686:date=May 24 2012, 09:08 PM:name=Insane)--><div class='quotetop'>QUOTE (Insane @ May 24 2012, 09:08 PM) <a href="index.php?act=findpost&pid=1938686"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->[*]Filter by country.<!--QuoteEnd--></div><!--QuoteEEnd-->
You should consider filtering by general area (i.e. NA, EU, AUS, Asia), since most people won't care if the server is in the Netherlands rather than Germany, for example.
I am just wondering, where do you pull the information from about the servers? I am looking to put the information for the two duplex servers on our site. Is there an xml file or rss feed, etc? Or are you polling each server?
While I am after your expertise, do you know how the left4dead site gets its information about dev forum posts? Is there an xml/rss feed or something similar?
I would greatly appreciate any knowledge you can share!
P.S. Would you mind a future community site linking to your webpage?
The way Nanogrid works is that it first retrieves an NS2 server master list that Mendasp hosts. The list is updated every six hours, so Nanogrid caches that list locally and only queries Mendasp's sever a maximum of once every six hours.
It then queries every server on that list directly using the <a href="https://developer.valvesoftware.com/wiki/Server_queries" target="_blank">Source server query protocol</a> for up-to-date information. So for the duplex servers, since you already know their IP addresses, you would just query them directly without worrying about the master list component.
I don't know for sure what Play4Dead does to get the developer posts, I think it does something like trawl developer forum profiles for updates. Plasma put quite a lot of information in <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=112494&st=0" target="_blank">his thread</a>, so you should give that a read.
You're more than welcome to link to it from your site.
Thank you for making the time to give me so much information, all very useful.
I had a look through the server query, all very straight forward thanks for that!
I had a brief look at Plasma's thread but fear to get what I am after (a complete list of all developer threads) I will have to do it the hard way myself, bummer!
Good luck with the continued development of Nano Grid, it is awesome so far and I love the futuristic feel of the styling!
However, in light of the recent boost in players thanks to the Totalbiscuit videos, Charlie suggested I put a player/server count on there. That was easy enough to do, so I've added it on!