/ Coding

MoeSeason World of Tanks Stats

In an effort to familiarize myself with a real web development framework, I decided to create a new performance statistic for World of Tanks, and a MEAN stack application to track and visualize it.

The Metric

The metric I created was meant to represent several metrics (damage done per battle, win rate, experience earned per battle, kills per battle) with a single number. Conventional performance metrics were based on a player's lifetime statistics, which encouraged players to create new accounts with low battle counts to artificially inflate their statistics. I hoped to address this issue by basing the player's stats on a sample of their top "sessions" of 5 back to back matches, which would encourage players to play often to beat their previous session record.

example
An example visualization of the metric, showing the player's rank against others, and the different numbers representing their individual ranks compared to other players in the specified vehicle.

Development

Learning the MEAN (MongoDB, Angular, Express, NodeJS) proved a very valuable experience. Overall, the code was much more organized and readable than my previous web applications, and using the nosql document based MongoDB with an exclusively JavaScript based application was super refreshing compared to my previous PHP-JavaScript MySQL approach.

One of the most interesting challenges of the project was working with callbacks, an essential concept in web development that I had never used before. Because the information displayed on the website was all based on data stored in my database and data pulled from official World of Tanks APIs, not all of the data on the page would be immediately available. I had to design placeholders to display while the data was being accessed by API requests, and write my callbacks to replace these placeholders when the real data was available.

Initially, I was pulling all of my data from the World of Tanks API with each request. This was necessary to get updates for player statistics, but not to get static information such as vehicle names and pictures. I quickly started hitting API usage limits, so I wrote code to automatically cache information that I knew would be static in my own database, and check my database for data before requesting it from the World of Tanks API.

Afterthoughts

After testing the service with a group of top players, Wargaming, the World of Tanks developer, used the session based statistic concept in their own player contest, rewarding players with the top sessions with in game prizes. My interest in the game waned after the beta test with top players, so the service never got a public release.

Jeffrey Hanford

Jeffrey Hanford

https://github.com/Tioga060/ Masters of Science in Computer Science, USC 2018 Bachelors of Science in Electrical and Computer Engineering, Olin College of Engineering 2016

Read More