Server Help

ASSS Custom Projects - web stats

Smong - Sat Feb 25, 2006 11:49 am
Post subject: web stats
I thought it would be nice to have some webstats since I play other games that have them.
http://toktok.sscentral.com/daws/index.php
Any ideas for improvement?

Hopefully this should make more people want to use asss.
Muskrat - Sat Feb 25, 2006 2:54 pm
Post subject:
Might I suggest different types of sorting(by kills, points, etc.) and a way to retrieve this stuff as well, ie a command for players in game to view the top X players in whatever stat with a command.

Also, It would be pretty groovey if you got people's banners on there.
Smong - Sat Feb 25, 2006 3:19 pm
Post subject:
Some kind of sorting would be good, I'll probably go with a ss scores type thing rather than windows style clickable column headings.

Viewing stats ingame, I'm not sure about this, people can just alt-tab and visit the site. But I plan on releasing the code when this has matured more.

Banners should be possible, although to keep db size down I'll probably make it purge banners after a player has a very short amount of inactivity and only allow them if they have a certain amount of points.

Some kind of ranking would be nice, but I'm not sure on a formula right now.

Edit: Changed site layout and added sorting.
CypherJF - Sat Feb 25, 2006 8:21 pm
Post subject:
Seem's promising...
2dragons - Mon Feb 27, 2006 4:24 pm
Post subject:
Banner Store Size: 96 bytes
Max Number of Players You'll Ever Track with Asss (considering the game suddenly becomes a huge hit for the next generation of young gamers and Asss takes over as the dominent server): 1,000,000

Total Maximum Banner Storage Space Required (assume 4 byte overhead for identifying (give you lots of room)): 100 * 1,000,000 / 1024 /1024 = 95.367431640625M.

Assuming a more realistic view of maybe 5000 players over lots of time: 0.476837158203125M

I think you should store banners.

http://www.trenchwars.org/SSBE

I decided to add in perhaps you want to store the overhead of the file/bitmap headers. If so then we're boosting up quite a bit. 1174 bytes plus 4 overhead. 1178 bytes/banner. 5.6171417236328125M for 5000 users. Still not bad.
Smong - Mon Feb 27, 2006 7:08 pm
Post subject:
Ok I'll keep banners for a bit longer. It currently deletes players after 40 days, but I think I'll add code for the fortnightly reset and add a drop down to choose the time period (although that will probably use even more space, something like 52/2=26 times more).

What about more stats? Like all the ones on ss scores? Or something like most greens.

Edit: I decided to store banners in a separate database so a player can have at most 1 banner at a time no matter how many reset intervals have passed.

Edit: Made a logo.

D1st0rt - Tue Feb 28, 2006 10:22 pm
Post subject:
Added some cheap antialiasing to it for a file size increase of 125%

Solo Ace - Wed Mar 01, 2006 2:32 am
Post subject:
I want credit for messing with the headers! sa_tongue.gif
Smong - Wed Mar 01, 2006 3:43 am
Post subject:
I only have paint so thanks for the antialiasing. Solo Ace I checked the logs and you didn't actually contribute any code, but I haven't forgotten you.
Grelminar - Wed Mar 01, 2006 4:39 am
Post subject:
I don't know how this is implemented, so I can't comment on it yet, but I think it would be best if it was integrated with the existing stat system, so you get automatic support for history, all the existing and future stats, etc.

One way to do this would be to have another process running alongside asss that opened the same database and could serve that data on some port, perhaps with a custom protocol or with http. The web page could then query that process to get the latest stats. I suppose you could even embed it in asss if you wanted, which might simplify things a little.

A downside of this approach is that there's no index over the values, so queries like "top ten kills in this arena" are slow, because you'd have to iterate over everything. You could run those every once in a while and cache the results, maybe.
Solo Ace - Wed Mar 01, 2006 8:16 am
Post subject:
I know I didn't actually do anything as I was kidding, Smong. sa_tongue.gif
Smong - Wed Mar 01, 2006 8:40 am
Post subject:
The current model I'm using is an asss module acts as a client and sends http messages containing stats data to a website. A php page then processes the message and store it in some kind of database also on the web server. (It seems like a highly dodgy method to me but it works).

My goal was to avoid rewriting asss stats/db in mysql and to avoid having to run another kind of server (such as mysql) that would require more ports being opened.

The way I saw it with dbtool is a script would have to be scheduled to run dbtool, and then ftp the results to a webserver. As I don't have a dedicated server this didn't seem attractive to me. Although after saying that a module could do the scheduling.
baseball43v3r - Wed Mar 01, 2006 10:31 pm
Post subject:
add in a clan search. I remember hz's stats were pretty in depth and for leagues everything could be found. they had goals and ptime and kills and all that other groovy stuff so if certain stats could be outputed (say for cetain game types or for league stats) then that would be good as well. i dont know if they have old stats archived but it might be a nice place to look if your looking for statistical output
Smong - Thu Mar 02, 2006 12:37 pm
Post subject:
I added goals, ball time and kill/death/bounty sprees. Since having these all at once makes the table too wide you have to choose a grouping of stats to see.

If I add squad search, I'll have to change the current output format to that of ss scores - with the player name and squad name above the table, and one table per player matched. That would be to keep the width sensible.
CypherJF - Fri Mar 03, 2006 12:25 am
Post subject:
yey for banners! biggrin.gif
Smong - Mon Mar 06, 2006 7:07 am
Post subject:
I'm releasing this for general use since development has slowed.

I've included the source, precompiled binaries for windows and linux and of course the web interface.
Mine GO BOOM - Sat Mar 11, 2006 9:04 pm
Post subject:
Throw a link into the Quick Links thread.
Smong - Thu Jun 15, 2006 1:29 pm
Post subject:
I have fixed an error with the banners, this only effects index.php so I'm only uploading that as a patch.

Going over the thread I see a lot of stuff I said I might do, but never did. I'm going to recap what is does and doesn't do:
Does:
- different types of sorting(by kills, points, etc.).

Doesn't:
- a command for players in game to view the top X players.
- purge banners after a player has a very short amount of inactivity and only allow them if they have a certain amount of points.
- I think I'll add code for the fortnightly reset and add a drop down to choose the time period.
- another process running alongside asss that opened the same database and could serve that data.
- clan search.
Smong - Mon Apr 16, 2007 4:12 pm
Post subject:
1.3 Update
Minor cleanup.
Possible future bug fix.
Added "Reset period" to web interface (currently requires manual intervention to copy/edit files every reset).
Recompiled binaries for 1.4.3 (not sure if it was necessary, but whatever).

The most noticeable update is that you can choose which reset period to view stats from.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group