[App] Standalone Server Browser
First off, I know this isn't exactly a mod but I thought I'd post here to get some feedback from other developers. :)
I've been working on a standalone server browser that lets you browse and join servers from outside of the game. Inspired by the excellent menumod.
At this stage it's very much a work in progress.
Features:
<ul><li>Sorting/Filtering capabilities as you would expect</li><li>History and Favorites</li><li>Steam-style details view listing connected players etc.</li><li>Directly connect to a given ip:port</li><li>View a server's gamemode and tags (e.g. combat, proving grounds, tickrate)</li><li>Profile system for quickly launching different mods</li></ul>Anyway, here's what it looks like:
<img src="http://i.imgur.com/bzFPa.png" border="0" class="linked-image" />
<img src="http://i.imgur.com/ZIriZ.png" border="0" class="linked-image" />
<img src="http://i.imgur.com/7LJD6.png" border="0" class="linked-image" />
Known Issues:
<ul><li>Old builds show up in the server list<strike>, if anyone knows how to get the build number of the currently installed game please let me know. I've briefly checked the lua files and I can't see it in there</strike></li></ul>Todo list for version 1.0:
<ul><li>Done: <strike>Save/load settings</strike></li><li>Done: <strike>History and Favorites views (maybe)</strike></li><li>Done: <strike>Quickjoin (the game's quickjoin always seems to put me in empty servers, I think I can do better)</strike></li><li>Autojoin for full servers when space is available</li><li>Settings dialog</li></ul>Wishlist: (aka. crazy ideas)
<ul><li>Remote management via RCON</li><li>Ability to see what servers your friends on playing on. <strike>Is there a steam api for this? I've no idea.</strike> Edit: <a href="https://developer.valvesoftware.com/wiki/Steam_Web_API" target="_blank">Yep :)</a></li><li>Server queues! I would need some cooperation from someone who knows more about server-side modding. I'm skeptical this could even be done through a lua mod, but some sort of proxy might do the trick</li></ul>
Download: <a href="http://mtxf.net/ns2/ns2serverbrowser-1.0alpha6.zip" target="_blank">alpha6</a> (4.8MB)
If you get an error about a missing msvcrt dll try installing the vcredist_x86.exe from here: <a href="https://www.microsoft.com/en-us/download/details.aspx?id=8328" target="_blank">https://www.microsoft.com/en-us/download/de...ls.aspx?id=8328</a>
I've tested it on 32 and 64bit Windows 7. Let me know if it works on your system.
<ul><li>Confirmed to work on Windows XP 32bit by Soul_Rider</li></ul>
Please give me bug reports (especially if it crashes!), feature suggestions etc. I'm rather busy(/lazy) so I probably won't work on things unless people keep asking.
If anyone would like to translate the program I can provide you with the necessary files.
Changelog:
alpha6 2012/10/13:
<ul><li>[Fixed] Servers now report their gametype again</li><li>[Fixed] The window now correctly remembers it's position and maximised state</li><li>[New] Columns for server tickrate and running mods</li><li>[New] Filters for minimum tickrate and private servers</li></ul>alpha5 2012/10/02:
<ul><li>[Broken] Most of the profile functionality is somewhat redundant now that steam workshop is the prefered method of downloading mods</li><li>[Broken] Filtering by game mode is useless right now since ns2 servers no longer report the game mode they're running (as of 221)</li><li>[Fixed] Crash with recent ns2 builds</li><li>[New] Can now double click on a server to connect</li></ul>alpha4 2012/08/26:
<ul><li>[Broken] Profile autofilter - will be fixed in next build</li><li>[Change] Removed vcredist_x86.exe from the zip since it almost doubles the download size</li><li>[Change] Game and Map filters are now dropdown boxes</li><li>[Fixed] Some minor bugfixes & improvements</li><li>[New] Quick Join functionality</li><li>[New] History and Favorite views</li><li>[New] New icons for some things</li><li>[New] Can now view server details from the Direct Connect tab</li></ul>alpha3 2012/08/23:
<ul><li>[New] Profile system</li><li>[New] Save/Load the profiles, the filter, and the column layout on the tables</li><li>[New] Column layout now fully customizable, can move, resize and hide columns</li></ul>alpha2 2012/08/23:
<ul><li>[Fixed] Launch options not working</li><li>[Fixed] Crash when attempting to refresh an empty server list</li></ul>alpha1 2012/08/22:
<ul><li>Initial release</li></ul>
I've been working on a standalone server browser that lets you browse and join servers from outside of the game. Inspired by the excellent menumod.
At this stage it's very much a work in progress.
Features:
<ul><li>Sorting/Filtering capabilities as you would expect</li><li>History and Favorites</li><li>Steam-style details view listing connected players etc.</li><li>Directly connect to a given ip:port</li><li>View a server's gamemode and tags (e.g. combat, proving grounds, tickrate)</li><li>Profile system for quickly launching different mods</li></ul>Anyway, here's what it looks like:
<img src="http://i.imgur.com/bzFPa.png" border="0" class="linked-image" />
<img src="http://i.imgur.com/ZIriZ.png" border="0" class="linked-image" />
<img src="http://i.imgur.com/7LJD6.png" border="0" class="linked-image" />
Known Issues:
<ul><li>Old builds show up in the server list<strike>, if anyone knows how to get the build number of the currently installed game please let me know. I've briefly checked the lua files and I can't see it in there</strike></li></ul>Todo list for version 1.0:
<ul><li>Done: <strike>Save/load settings</strike></li><li>Done: <strike>History and Favorites views (maybe)</strike></li><li>Done: <strike>Quickjoin (the game's quickjoin always seems to put me in empty servers, I think I can do better)</strike></li><li>Autojoin for full servers when space is available</li><li>Settings dialog</li></ul>Wishlist: (aka. crazy ideas)
<ul><li>Remote management via RCON</li><li>Ability to see what servers your friends on playing on. <strike>Is there a steam api for this? I've no idea.</strike> Edit: <a href="https://developer.valvesoftware.com/wiki/Steam_Web_API" target="_blank">Yep :)</a></li><li>Server queues! I would need some cooperation from someone who knows more about server-side modding. I'm skeptical this could even be done through a lua mod, but some sort of proxy might do the trick</li></ul>
Download: <a href="http://mtxf.net/ns2/ns2serverbrowser-1.0alpha6.zip" target="_blank">alpha6</a> (4.8MB)
If you get an error about a missing msvcrt dll try installing the vcredist_x86.exe from here: <a href="https://www.microsoft.com/en-us/download/details.aspx?id=8328" target="_blank">https://www.microsoft.com/en-us/download/de...ls.aspx?id=8328</a>
I've tested it on 32 and 64bit Windows 7. Let me know if it works on your system.
<ul><li>Confirmed to work on Windows XP 32bit by Soul_Rider</li></ul>
Please give me bug reports (especially if it crashes!), feature suggestions etc. I'm rather busy(/lazy) so I probably won't work on things unless people keep asking.
If anyone would like to translate the program I can provide you with the necessary files.
Changelog:
alpha6 2012/10/13:
<ul><li>[Fixed] Servers now report their gametype again</li><li>[Fixed] The window now correctly remembers it's position and maximised state</li><li>[New] Columns for server tickrate and running mods</li><li>[New] Filters for minimum tickrate and private servers</li></ul>alpha5 2012/10/02:
<ul><li>[Broken] Most of the profile functionality is somewhat redundant now that steam workshop is the prefered method of downloading mods</li><li>[Broken] Filtering by game mode is useless right now since ns2 servers no longer report the game mode they're running (as of 221)</li><li>[Fixed] Crash with recent ns2 builds</li><li>[New] Can now double click on a server to connect</li></ul>alpha4 2012/08/26:
<ul><li>[Broken] Profile autofilter - will be fixed in next build</li><li>[Change] Removed vcredist_x86.exe from the zip since it almost doubles the download size</li><li>[Change] Game and Map filters are now dropdown boxes</li><li>[Fixed] Some minor bugfixes & improvements</li><li>[New] Quick Join functionality</li><li>[New] History and Favorite views</li><li>[New] New icons for some things</li><li>[New] Can now view server details from the Direct Connect tab</li></ul>alpha3 2012/08/23:
<ul><li>[New] Profile system</li><li>[New] Save/Load the profiles, the filter, and the column layout on the tables</li><li>[New] Column layout now fully customizable, can move, resize and hide columns</li></ul>alpha2 2012/08/23:
<ul><li>[Fixed] Launch options not working</li><li>[Fixed] Crash when attempting to refresh an empty server list</li></ul>alpha1 2012/08/22:
<ul><li>Initial release</li></ul>
Comments
It will not connect to a mod server, for example SN - Proving Grounds v1.7 - 68.116.117.23:21019.
If I don't specify any launch options, it fires up vanilla NS2, then throws back the error, file not found, as is expected when connecting to the server without the mod running.
If I type -game pg, or even "-game pg" in the launch options and try to connect to the mod server I get incorrect password, even though their is no server password.
If i type -game pg into the launch options, and launch without choosing a server it starts the pg mod.
Overall a nice and smooth system. Running XP32 here.
I'm pretty sure you're doing this backwards, I think it will work if you do ns2.exe connect IP:Port -game ns2
To connect via NS2 command line you need to use - "install path\ns2.exe" -connect 46.105.98.107:21015
You do not specify -game ns2, as ns2 loads as the default game.
I have to agree I think NS2 command line is broken, because if I type - "Install Path\ns2.exe" -connect 68.116.117.23:21019 -game pg, then I load into the vanilla NS2 menu screen with vanilla ns2 loaded, without even trying to connect to the server...
ie. ns2.exe connect localhost
ie. ns2.exe connect localhost<!--QuoteEnd--></div><!--QuoteEEnd-->
Not on my machine... Connect doesn't need a '-' but still NS2 will not load up a mod from the command line when there is also a connect command. It doesn't matter how you try it, whether you do it with or without the -tags. As soon as you specify a mod, as well as server connect details, the command line doesn't do what you expect.
Rather than offering corrections to our methods, maybe you could try to recreate the issue and determine if their is actually a problem with NS2 command line arguments, particularly when specifying more than one command line parameter. :)
Ah! Yes you're right it works when I do it "backwards" like that, thank you. Note you have to pass two arguments to connect otherwise it thinks "-game" is the password, i.e. ns2.exe connect ip:port "" -game ns2.
<!--quoteo(post=1966010:date=Aug 23 2012, 03:26 AM:name=Soul_Rider)--><div class='quotetop'>QUOTE (Soul_Rider @ Aug 23 2012, 03:26 AM) <a href="index.php?act=findpost&pid=1966010"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->If I don't specify any launch options, it fires up vanilla NS2, then throws back the error, file not found, as is expected when connecting to the server without the mod running.
If I type -game pg, or even "-game pg" in the launch options and try to connect to the mod server I get incorrect password, even though their is no server password.
If i type -game pg into the launch options, and launch without choosing a server it starts the pg mod.
Overall a nice and smooth system. Running XP32 here.<!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks, I appreciate the feedback. This should be all fixed now! :)
I've updated the OP with a new download.
Tested, confirmed it's working. Thanks a lot!
Now what we need is a way to have a stored list of launch options, as I don't want to have to edit the line everytime I switch between mods, which is something I do very often!!
Give the latest version a try. I just put a new build (alpha3) up in the OP.
Have a look at the screenshot I added to get an idea of how to use the profile system. If you check the "Filter" checkbox next to Game it will automatically apply that as a filter when you select the profile.
Let me know how it works for you. :)
You have recreated a portion of the HLSW half-life server browser, but this app is so much smaller, user friendly and less buggy!!
May I make some more suggestions? Half-life server browser gave you the option to interface with the console log remotely if you had admin access, can you do a similar thing here? I am not familiar with the new admin system in NS2 yet, but I am sure there would be something in there that would enable such a connection.
This would be great for admins of multiple servers to keep track of their servers when not actually playing games :)
Secondly, you mentioned you wanted a little padlock icon. I seem to remember the folks at <a href="http://p.yusukekamiyamane.com/" target="_blank">pinvoke.com</a> made a nice little icon pack a while ago. It's called <i>Fugue</i>, and it's free to use for personal and commercial projects as long as you provide the <a href="http://p.yusukekamiyamane.com/icons/attribution/" target="_blank">proper attributions</a>.
~ <a href="http://cl.ly/2P2K3E112521" target="_blank">padlockicons.zip</a>
Can you add a filter list, that reads all game names it finds in the server list, and allows you to ctrl and multiple select the games you want to add to the current profile filter?
Sounds like you're talking about rcon? I don't know if ns2 implements the standard source rcon protocol, but I could definitely look into it. The wiki page for <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Dedicated_Server#WebAdministration" target="_blank">dedicated servers</a> talks about a web admin interface, so if there's no rcon I could still probably hook into that.
Still it'd be quite a bit of work so I don't know if I'll get around to it.
<!--quoteo(post=1966381:date=Aug 24 2012, 12:28 PM:name=Procyon)--><div class='quotetop'>QUOTE (Procyon @ Aug 24 2012, 12:28 PM) <a href="index.php?act=findpost&pid=1966381"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->First off: awesome work! This little server browser is infinitely handy.
Secondly, you mentioned you wanted a little padlock icon. I seem to remember the folks at <a href="http://p.yusukekamiyamane.com/" target="_blank">pinvoke.com</a> made a nice little icon pack a while ago. It's called <i>Fugue</i>, and it's free to use for personal and commercial projects as long as you provide the <a href="http://p.yusukekamiyamane.com/icons/attribution/" target="_blank">proper attributions</a>.<!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks, glad it's been of use! That's a nice icon pack, good find. I think it looks pretty cool:
<a href="http://i.imgur.com/xxPdV.png" target="_blank">http://i.imgur.com/xxPdV.png</a>
Should be in the next build, whenever I put it out. :)
<!--quoteo(post=1966393:date=Aug 24 2012, 01:27 PM:name=Soul_Rider)--><div class='quotetop'>QUOTE (Soul_Rider @ Aug 24 2012, 01:27 PM) <a href="index.php?act=findpost&pid=1966393"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Just one other thing, can you make custom filters too? I want to look at combat and pg servers, to get an idea of how many people are playing, but to see both I need to see all, and they are separated alphabetically by NS2 :P
Can you add a filter list, that reads all game names it finds in the server list, and allows you to ctrl and multiple select the games you want to add to the current profile filter?<!--QuoteEnd--></div><!--QuoteEEnd-->
Not sure about adding multiple games to a profile, I mean yes it'd be possible, but since each game will require different launch options joining the servers won't work. I could add in some auto-detection logic or something but I think that's overcomplicating matters.
Multiple filters are a possibility though. So you could have something like Filter1 (game: combat) OR Filter2 (game: pg) and it'd display games with either. It's not at the top of my todo list though. If you want a quick fix, I could implement an option to "invert" the filter, so you could filter for game: ns2 and then check an "Invert" box and it'd show all games that <u>aren't</u> ns2.
Ok, lets look at the usecase here. You want to monitor a particular set of servers. There's already a couple of ways I want you to be able to achieve this. You could add those servers to your favorites and then they would always be visible under the Favorites tab. Or you could use a combination of multiple filters to show only the servers you want in the main server browser.
Maybe a seperate "Saved Filters" feature would help you out? As I said I don't want to add multiple games to a single profile.
<!--quoteo(post=1966393:date=Aug 24 2012, 01:27 PM:name=Soul_Rider)--><div class='quotetop'>QUOTE (Soul_Rider @ Aug 24 2012, 01:27 PM) <a href="index.php?act=findpost&pid=1966393"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Can you add a filter list, that reads all game names it finds in the server list...<!--QuoteEnd--></div><!--QuoteEEnd-->
This is a good idea though, I would like to make the Game and Map filters into dropdown boxes which list all the game/map names it finds in the list.
I'd like to have that "favourite server" feature. It seems that you are already planing to implement that, given the disabled favourite tab.
I'd have offered my help if the application would have been written in C# ;) Because of that I can only try to motivate you =))
Would you mind telling from where you get the server information? I tried to find it using Wireshark, but had no success so far. It seems that I'm inspecting the wrong pakets ;)
I'd like to have that "favourite server" feature. It seems that you are already planing to implement that, given the disabled favourite tab.<!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks. Yep it's planned, I "just" need to refactor some of the server browser ui code into it's own class so I can have multiple server browser instances. I'll give it some more priority though since you asked. :)
<!--quoteo(post=1966754:date=Aug 26 2012, 01:52 AM:name=Citronas)--><div class='quotetop'>QUOTE (Citronas @ Aug 26 2012, 01:52 AM) <a href="index.php?act=findpost&pid=1966754"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Would you mind telling from where you get the server information? I tried to find it using Wireshark, but had no success so far. It seems that I'm inspecting the wrong pakets ;)<!--QuoteEnd--></div><!--QuoteEEnd-->
You mean where do I get the list from? See here: <a href="https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol" target="_blank">Master_Server_Query_Protocol</a>
You should be able to see the packets the in-game server browser sends in wireshark if you filter for udp to/from 208.64.200.*
That will get you a list of ip/ports, you then have to send each server a query packet to get details, see this: <a href="https://developer.valvesoftware.com/wiki/Server_queries" target="_blank">Server_queries</a>
Major new stuff in this build are History and Favorites support, and basic Quick Join. Full changelog and download are in the OP.
There's bound to be some bugs that have crept in since I've done some fair major refactoring. Let me know if you find any! I'm also interested in feedback on the weighting system I've used for quick join. If you sort the master list by weight the servers with a higher weight should be "better". Currently it takes Free Slots, Max Players, and Ping into account. I think ping is probably weighted too heavily at the moment so I might tweak that a bit in the next few builds. Eventually I plan to make the weightings fully customizable.
- Would it be possible to show all server I marked as favourite in the favourite tab? I'd rather see a "server not reachable" message than the server missing from that list.
- I something end up with only 1 server (Eden) in the list if I reload the list. But I guess this is from the response of the master server.
- Maybe you could change the wording of "reload" and "refresh" into "Get new list" and "refresh", or something like that.
- I also had once the problem that both the reload and refresh buttons were disabled, but I couldn't reproduce this.
- I'd also like to suggest a change in the tab page order: Master List should the first tab, and favourite servers the second tab ;)
- I something end up with only 1 server (Eden) in the list if I reload the list. But I guess this is from the response of the master server.
- Maybe you could change the wording of "reload" and "refresh" into "Get new list" and "refresh", or something like that.
- I also had once the problem that both the reload and refresh buttons were disabled, but I couldn't reproduce this.
- I'd also like to suggest a change in the tab page order: Master List should the first tab, and favourite servers the second tab ;)<!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks again, I'll go through these one at a time:
1. Yeah this is something I've already thought a bit about, I'd definitely like to do it. It's not that straight-forward unfortunately due to how I designed the architecture in the first place >_<
2. Maybe, sometimes you just don't get any response from 50%+ of the servers. Seems to be brief packet loss, not sure what causes it, usually a refresh fixes it. Also I should point out I introduced a bug in alpha4 where it'll sometimes get stuck trying to query the master server. If you get that just keep hitting reload until it works. That'll be fixed in alpha5.
3. I might try "Reload list" or something, but I think once you try the buttons out it's fairly obvious what they both do.
4. Interesting, can't say I've had that happen to me. Not sure what would cause it either.
5. But then where does Profile go? I can see reason to swapping History and Favorites around though so Favorites comes first.
<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b>*EDIT*</b><!--colorc--></span><!--/colorc--> I searched for this dll and found it: C:\Program Files\Mozilla Firefox. So NOW what do I do??
Just download this and your problems are solved :)
alpha4 will crash if you try to use it since UWE decided to remove the game mode tag from the server description, which it expects to be there. This kinda sucks because right now there's no way to tell what mods a server is running prior to connecting.
This renders the profile system somewhat pointless right now, oh well. I'll probably keep it in for now even though it's basically broken, hopefully UWE will decide to list mod_ids in the server responses or something.
If any mod authors want to continue to be able to filter their mods they should add a custom tag, something like game=combat or just combat, although I'm open to suggestions.
Unfortunately since the start of the academic year I've been rather busy so don't expect any big updates for a while. I aim to keep things in working order though.
I thought for a while that I was the only one experiencing crashes.
It's working they way it should, gonna use it more.
One thing that might be added: A new column to the Master list showing "Favorite"... so that you can see whether the server is in your favorites already or not. Nothing crucial, but maybe someone finds it useful.
And you could make a thread on refreshing the list, so it doesn't block the app while refreshing the list. And your already mentioned auto-join-feature would be great and some option to auto-refresh every x seconds.
Oh, and a filter for "without password" or "with password" would be great as well.
Very well done, xmt!
Thx !
So 222 has the new in-game server browser, which is a big improvement over the old one which is nice. Looks like I'm going to have to add some new features to keep ahead of the competition! Steam friends anyone?
Also of interest is this item from the patch notes: "Fixed bug where the game mode in the server browser was not updated by the game field in the game_setup file". Looks like servers are once again reporting their gamemode, so I'll put out an update shortly to re-enable that functionality. In the mean time you'll see some weirdness going on with the tags.
<!--quoteo(post=1988869:date=Oct 9 2012, 08:08 PM:name=Illidan)--><div class='quotetop'>QUOTE (Illidan @ Oct 9 2012, 08:08 PM) <a href="index.php?act=findpost&pid=1988869"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->One thing that might be added: A new column to the Master list showing "Favorite"... so that you can see whether the server is in your favorites already or not. Nothing crucial, but maybe someone finds it useful.
And you could make a thread on refreshing the list, so it doesn't block the app while refreshing the list. And your already mentioned auto-join-feature would be great and some option to auto-refresh every x seconds.
Oh, and a filter for "without password" or "with password" would be great as well.<!--QuoteEnd--></div><!--QuoteEEnd-->
These are all good suggestions, thanks Illidan. I hadn't personally had any issues with the gui blocking, but you're right currently it's all in the same thread so if you're having issues with that I'll move the query functionality into a seperate thread when I refactor the server browser code.
As I mentioned previously build 222 fixed the problem with servers not reporting their gametypes, and as a bonus they now also report their current tickrate and running mods. :)
Right now I'm just listing the mod id's as reported by the server. I'd like to hook this up to the workshop so it displays the name/info about each mod, but I'm not yet sure what the ui for that should look like nor have I had time to look into the workshop api.
Also there's new filters for minimum acceptable tickrate and password-protected servers.
<b>Player Search</b>
After entering a substring to search for, the player lists are fetched from non-empty server at a reasonable rate and a list of matching playernames is built. There could even be a checkbox option "use current filter" in the player search which will limit the search to the filtered servers. The name list is updated in realtime so you can stop the search when the name you were looking for appears. Since the number of servers is known, there will also be a progress bar.
<b>NOTE:</b> Servers with players with the name "Unknown" and a score of 0 would have to be added to a list and re-polled until the playername is revealed.
Let me know if you ever plan on open-sourcing the code or sharing it with other devs.