Ant Zucaro [Sun, 29 Apr 2012 16:10:14 +0000 (12:10 -0400)]
Initial version of ajax-updating of the accuracy graph.
The accuracy view needs to be changed to accommodate clicking on weapons where not enough data is supplied. Right now it results in a JS error that halts all further updates to the graph.
Don't throw an error if the number of duel ranks found is < 10.
I was using '-' as a filler in such cases, and was populating four values into a tuple. The template expected three, so in situations when I had to fall back on the filler values, I was providing one too many, leading to 'too many values to unpack' upon loading up the main page.
Ant Zucaro [Tue, 17 Apr 2012 00:39:39 +0000 (20:39 -0400)]
Adds an accuracy graph and removes the overall accuracy table.
In retrospect the accuracy/damage table was a cop-out. It doesn't really show anything useful, it was just easy to display query-wise. Meanwhile I've been told time and time again that nex accuracy is the only thing that people are truly looking at as a measure of their accuracy, so that is what this commit does in graphical form. Other useful things will come later, but likely not in a tabular format again.
Ant Zucaro [Sun, 15 Apr 2012 11:42:11 +0000 (07:42 -0400)]
Add some kill ratio and win percentage, clean up recent games.
Added the kill ratio and win percentage to the first section along with a breakdown of how I got them. Also cleaned up the recent games section so it looks more like what is on all of the other "leaderboard" pages, which people should expect. I removed the overall stats section altogether, as 99% of the time people are looking after what is currently provided (e.g. flag carrier kills = rather unimportant in the grand scheme of things).
Ant Zucaro [Tue, 27 Mar 2012 21:23:53 +0000 (17:23 -0400)]
Add Google Analytics support.
Stats has been operational for almost six months now, yet I don't have a clue of how many people are using/visiting the site on a daily basis. It's time to fix that! GA support will be tracked up to the xonstat address at gmail.com.
Ant Zucaro [Tue, 20 Mar 2012 11:07:23 +0000 (07:07 -0400)]
Huge performance boost for the DB queries on the home page.
The queries on the home page weren't bound by dates (which are indexed) or limited by the number of rows returned (despite the tables being a fixed size there). Adding these two filters on each of the queries makes the home page fly. The dates are done w/ a BETWEEN clause, while the limit on the queries is done w/ a normal LIMIT statement. The result takes the page from 3.5s average load time to about 400ms. :D :D :D
Ant Zucaro [Sun, 18 Mar 2012 20:07:03 +0000 (16:07 -0400)]
Cap RGB value darkness by first converting to HSL, then applying threshold.
RGB values that were too dark to read against a black background are now viewable. This is done by converting the RGB values (from the hex values provided) to HSL, then moving any L (lightness) values beyond a certain threshold back. Finally they are converted back to RGB for display. In practice all this really does is to lighten the dark colors without changing their hue or saturation values (e.g. black becomes gray).
Thanks go to dmazary for helping me with this and working through the various bugs I found. Thanks, Dave!
David Mazary [Fri, 16 Mar 2012 15:14:36 +0000 (12:14 -0300)]
Idea about classifying text as light or dark so css styling could increase contrast for dark text. This looks interesting: http://css-tricks.com/adding-stroke-to-web-text/ Maybe using that trick with an electric-blue text outline for dark text.
Ant Zucaro [Thu, 15 Mar 2012 11:16:08 +0000 (07:16 -0400)]
Add an itemized breakdown of the games played by a player.
This is so we can see how many of each type of game type that the player has played. It will look like <total games played> (<number of games played> <game type cd>).
Ant Zucaro [Wed, 14 Mar 2012 02:19:59 +0000 (22:19 -0400)]
Honor cl_allow_uid2name 0 when cl_allow_uidtracking is 1.
In an attempt to display better nick information I've overwritten the provided nick (in this case none) w/ what was on the player record. This is wrong - if uid2name is 0, thus leading to no nick provided, that means I should show "Anonymous Player". This ends up being a little silly when uidtracking is 1, because a person can just click on the "Anonymous Player" link to see who was actually playing :D.
Ant Zucaro [Sun, 22 Jan 2012 04:11:52 +0000 (23:11 -0500)]
Add player_ranks to the mix - it is a batch table intended to represent the latest rankings at any given point in time. Ideally they would be updated daily.