Page 1 of 1

B&S Serverbrowser - Game Launcher for AoS/BaS

Posted: Tue Jul 23, 2013 11:09 pm
by epic2011
Hey,

I also made a server browser for Aos/BaS. It's written in C# and requires the .NET Framework 4.5.

Features:
  • Browse and view servers (the server are fetched from buildandshoot.com serverlist
  • Switch between server versions (currently .75 and .76 available)
  • Never forget your adventures with the "View last played server" features
  • Favorite servers
  • Sort servers
  • Highlights good servers and bad servers (bad=full, good=not empty)
  • Manually connect to a server via IP or URL
  • More to follow
Screenshots
Capture001.PNG
Capture001.PNG (79.95 KiB) Viewed 6090 times
Capture005.PNG
Capture005.PNG (16.42 KiB) Viewed 6090 times
Capture004.PNG
Capture004.PNG (67.96 KiB) Viewed 6090 times
Capture003.PNG
Capture003.PNG (63.41 KiB) Viewed 6090 times
Capture002.PNG
Capture002.PNG (69.91 KiB) Viewed 6090 times
Capture001.PNG
Capture001.PNG (79.95 KiB) Viewed 6090 times
Download Version 1.0
(compatible with all AoS/BaS versions)
BaS_Serverbrowser_v.1.0.zip
(177.36 KiB) Downloaded 409 times
Instructions
1. Simply unzip the content of the file and start BaS_Serverbrowser.exe
2. To connect to a server, double-click on it or hit Server > Connect
3. To view recents or favs, click the Sort menu
4. To sort columns, hit the column header

Thanks for testing it out!

Re: B&S Serverbrowser - Game Launcher for AoS/BaS

Posted: Wed Jul 24, 2013 5:28 am
by MrHaaax
That's looking good, will try it if my computer can run .NET.
Keep up the good work!

Re: B&S Serverbrowser - Game Launcher for AoS/BaS

Posted: Wed Jul 24, 2013 8:12 am
by learn_more
not bad for a start :)

here are some improvements:

use this serverlisting instead of parsing the html page:
http://services.buildandshoot.com/serve ... rsion=0.75

you don't need the html library, as the .net framework can do quite some parsing of itself already?
if you do need it, insert it in your main binary with ilmerge :)
(less files to copy is less convenience)

instead of doing string replaces on the aos:// protocol everywhere, create an object that represents an url,
and that can handle compare, get with and without protocol and parse from string.

instead of blindly appending the the text files (favs / recent) read the file to an in-memory structure, optionally sort it and write it back without duplicates.
(at startup read the files, on change write the files back to disk)

read the serverlist once, store that somewhere (in-memory or on disk, depending on how long you want to cache it)
and apply the filters only to the output displayed, not the in-memory list (so you don't have to re-query the data if a filter changes)

Re: B&S Serverbrowser - Game Launcher for AoS/BaS

Posted: Wed Jul 24, 2013 6:00 pm
by epic2011
Hey,

looks like somebody looked a little at my code - that's fine! I didn't spend to much time on the serverlist and simply threw it together (mostly for myself) because I didn't want to use the browser, and some parts of the code are a real mess.

I didn't know there was a JSON API available - damnit! That makes things much easier and faster to read as well as to store, definitely better than looking at the HTML every time.

I'm going to add the aos:// protocol idea, shouldn't be to hard.

I'm thinking of writing the favs and recents to a SQLite database, which should make it faster and, as you suggested, will read it only once and I can make fast queries.

That's a smart idea, and I'm gonna do that when I add the JSON parsing, a caching mechanism.

Thanks for suggesting features, might take a while to add but sounds good!

(Btw, your profile picture is creeping me out :D)

Re: B&S Serverbrowser - Game Launcher for AoS/BaS

Posted: Thu Jul 25, 2013 2:35 am
by Moose
Wow, looks good!

Re: B&S Serverbrowser - Game Launcher for AoS/BaS

Posted: Thu Jul 25, 2013 6:03 pm
by learn_more
epic2011 wrote:
Hey,

looks like somebody looked a little at my code - that's fine! I didn't spend to much time on the serverlist and simply threw it together (mostly for myself) because I didn't want to use the browser, and some parts of the code are a real mess.

I didn't know there was a JSON API available - damnit! That makes things much easier and faster to read as well as to store, definitely better than looking at the HTML every time.

I'm going to add the aos:// protocol idea, shouldn't be to hard.

I'm thinking of writing the favs and recents to a SQLite database, which should make it faster and, as you suggested, will read it only once and I can make fast queries.

That's a smart idea, and I'm gonna do that when I add the JSON parsing, a caching mechanism.

Thanks for suggesting features, might take a while to add but sounds good!

(Btw, your profile picture is creeping me out :D)
if you want to store it in a database, the file won't be editable by users anymore.
i suggest xml or json or some other human readable format :)
if you wanna go for a DB, i suggest looking at SQLCE, as that doesnt add more dependencies (sqlite does, unless someone wrote a .net port)

Re: B&S Serverbrowser - Game Launcher for AoS/BaS

Posted: Fri Jul 26, 2013 9:59 am
by leWizard
I really would like to see something like aos76://1234 (or similar, json-ish maybe? bns://{"ip":"aos://...","ver":76}) links, so you could link to servers with a specified version directly from a website...

User clicks link -> launcher app starts (just like aos:// starts AoS) -> launcher app reads the given arguments -> starts the right client.exe and connects to the server.

Read here how it's done: http://www.openwinforms.com/run_exe_fro ... cript.html (Handling in .NET application)

Would be cool stuff in my eyes... Blue_Sunglasses1


When storing data in .NET you could use the build-in datasets - these offer a .WriteXML and .ReadXML method and have a SQL-like structure (Dataset.Where(function(item) item.id=10) instead of SELECT * WHERE id = 10).