d8d

Game logging & visualization system

Summary

spongeStats is a two-part system that allows players to generate a CSV file containing some info about every kill and death during the game. This allows some neat visualization of the data to reveal trends in map flow, similar to what Bungie's Halo 3, and Valve's TF2 have done.

Usage

The PHP class is relatively self-explanatory. Various samples are included. Include QWHeatMapper.class.php and create a new QWHeatMapper object to start. Although the code is not commented, hopefully the code is clear enough so that it documents it self. If it doesn't, feel free to contribute and improve!

The data is exported to your fs_savepath with the filename "Death Stat Log - Map - YYYY-MM-DD HH-MM-SS.csv" and the format is just as simple. The first row contains the mapname and timestamp separated by a dash. Below that are the data for the kills. From left to right: (linebreak is unintentional)

Killer Team , Killer X , Y , Z ,
Victim Team , Victim X , Y , Z , Time Left in ms , damageDef

samples.php is a CLI script intended to be invoked from the command line. The two command-line arguments are filename and graph type, which are one of any of the ones mentioned below. So in order to process test.csv with the deathsonly type, you would run:

php5 samples.php test.csv deathsonly

Screenshots

Each of these screenshots are easily recreated by invoking samples.php with the proper command line, and using the included testdata.csv. testdata.csv is a 1.6MB hunk of data generated via the ET:QW mod, totalling 13849 deaths across a period of about 10 hours and 28 rounds. While this set of sample data is bots only, hopefully in the future there will be a large corpus of human play data to grok.

  • "deathsonly" sample - Mapping only the deaths. Red circles are where Strogg players died, green circles are where GDF players fell.
  • "greydeathsonly" sample - Same as above, but GDF are black, Strogg are white. Some post-processing can create a basic frequency map effect, where the deeper the color shows more likelyhood of death.
  • "hogs" sample - Everybody hates being on the business end of the Strogg Hog. This map shows where people have gotten run down by the Hog, hopefully so those areas can be avoided in the future.
  • "killerkilled" sample - This example draws the location of both the killer and the victim, connecting a line between them. The line colour signifies the team who did the dirty deed while the circle colour shows the team of the player. This style is best for limited periods of time. With larger pieces of data like the example set, it just creates a cool looking blob.
  • "snipers" sample - Filtering out snipers only, this graph shows where the weapon was fired from. With large enough amounts of data from human players, the most popular sniping spots can be discovered, and perhaps tweaks to existing ones can be made as a map author.

Download

Credits

Huge thanks to Jaybird for creating the mod, putting up with my extremely annoying questions, and allowing me to release it under the same license as everything else. Go play his stuff when it gets released!

#etqwmods on QuakeNet for various suggestions and testing.

MoP for being awesome.

Contact

Visit #etqwmods for any general questions (sponge|TWL for the PHP or any data questions, jaybird for anything relating to the mod) or e-mail me sponge -at- d8d -dot- org.

License

All code is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License. No commercial use is permitted without permission.

Creative Commons License