B&S Serverbrowser - Game Launcher for AoS/BaS

External additional handy features.
7 posts Page 1 of 1 First unread post
epic2011
Deuce
Posts: 2
Joined: Sun Dec 09, 2012 9:40 pm


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 6070 times
Capture005.PNG
Capture005.PNG (16.42 KiB) Viewed 6070 times
Capture004.PNG
Capture004.PNG (67.96 KiB) Viewed 6070 times
Capture003.PNG
Capture003.PNG (63.41 KiB) Viewed 6070 times
Capture002.PNG
Capture002.PNG (69.91 KiB) Viewed 6070 times
Capture001.PNG
Capture001.PNG (79.95 KiB) Viewed 6070 times
Download Version 1.0
(compatible with all AoS/BaS versions)
BaS_Serverbrowser_v.1.0.zip
(177.36 KiB) Downloaded 405 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!
Attachments
Capture006.PNG
Capture006.PNG (16.19 KiB) Viewed 6070 times
MrHaaax
Modder
Modder
Posts: 1360
Joined: Sun Nov 25, 2012 2:58 am


That's looking good, will try it if my computer can run .NET.
Keep up the good work!
learn_more
Coder
Coder
Posts: 891
Joined: Sun Mar 24, 2013 9:59 pm


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)
epic2011
Deuce
Posts: 2
Joined: Sun Dec 09, 2012 9:40 pm


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)
Moose
Coder
Coder
Posts: 152
Joined: Mon Nov 05, 2012 4:59 am


Wow, looks good!
learn_more
Coder
Coder
Posts: 891
Joined: Sun Mar 24, 2013 9:59 pm


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)
leWizard
League Participant
League Participant
Posts: 5
Joined: Wed Jun 12, 2013 6:50 pm


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).
7 posts Page 1 of 1 First unread post
Return to “Add-ons & Tools”

Who is online

Users browsing this forum: No registered users and 2 guests