Here's the deal, HJvK. PB2 has had support for stats logging for the last 8+ yrs, using a format that once was compatible with the
StdLog 1.2 spec that GibStats published. Recent changes in the PB2 code (which were made mainly from my input and experiences) have seen the addition or modification of a few of these standards, and there isn't currently an up to date resource for this information (I'm probably your best bet to talk to).
I developed such a stats systems 4-5 years ago that had two major components:
- A parser written in perl to quickly run through the log file every 20 minutes and populate the MySQL database with new stats.
- A front end webpage written in PHP to rank/search/sort players based on kills, deaths, k:d, kills with each weapon, caps, grabs, streaks, average ping, total time played, etc.
With Blitz's help (read: mathematical genius) we came up with a formula to calculate a "skill" value for each player based on their kills/death against a particular opponent, which took into consideration a few things like which gun they were using, how much "skill" their opponent had, etc. When we implemented that into the Perl parser we were running into stupid integer overflows. One overflow would cause the entire skill column to corrupt itself because one overflow would cause chain reaction through everyone who ever killed or was killed by the affected player and so on.
We lost our server, I was in college and I didn't work on any of this code for a couple years. I picked it back up May of last year when I was running servers for ch1ll.com. I made the stats look a lot cleaner, introduced things like country based stats, but I never officially released it because of that integer overflow problem in perl. I would sit there for hours stepping through MBs worth of log files in my parser, monitoring variables trying to see what was throwing it off. I squashed a few bugs, but still ran into problems after parsing a couple weeks worth of stats. I've recoded those areas of the parser probably half a dozen times, always running into similar problems.
So then I gave up the ch1ll.com servers, since they weren't worth keeping around (terrible hardware problem with DP anyway. In September, I just got a new server with the help of my friends in eR33t and getting some pub servers up and stats going is at the top of our todo list. The only hurdle right now is that stats are so much different than they were a year ago, and 5 years ago.
Now we have a wonderful global login system that we can leverage in terms of stats tracking. Stats tracking up until now was done based on a person's name, or potentially an IP address. This is a problem because people play under different names and/or funnames, and dynamic IPs making IP-based tracking stupid. So now that we have global login, and decent stats support we should be able to whip up a pretty killer stats app, right? Not quite... Our StdLog implementation hasn't been updated to make it global login aware. Pretty simple change if you ask me, but this changed must be feature-voted up by our beloved forum community before the developer (jitspoe) even thinks about doing this. What's more is that all of the StdLog code resides in the closed-source game binary, so I can't even make the simple change myself.
So here we are today. Currently I'm working on a really painful proxy mod that will take player connections and dump them to a log so I can have all the players associated with their global login account. Using this log, I'll be able to cross-reference it with our stats log, and come up with a pretty neat implementation. I've sketched out a bunch of different ideas on paper as to how I'm going to approach the entire project, since it's looking like I'll be starting from scratch instead of trying to solve year old answers. I've been debating about whether or not to add a
social networking twist to it, since those are all the rage right now. I've got some pretty big ideas on integrating it into in-game pub, IRC and tracking matches through there, but there's too many hurdles to go through just to get anything done around here.
If you have any questions, let me know, or come drop by #eR33t-Gaming on GGC. I'm usually around during North American evenings.
Edit: typo