slither

Slither.io is so addictive. It's kinda like the old snake game but with a multiplayer element to it. You grow larger by eating the glowing orbs. Running into another player will kill you and transform you into edible orbs. Holding the mouse button will give you a speed boost - but watch out because it will consume some of your length. Out of the 400 player lobbies the only the Top Ten can reach glory through their name being displayed on the leader board 🏆.

Despite my best efforts I rarely ever reached the leaderboard. All this frustration got me thinking about what score was good and how well I am doing at this game. Since Slither.io had no way of keeping track of my in-game data I decided to make my own score tracker.

Chrome Extension

To log my score I wrote a chrome extension in JS. The extension would scrape the webpage while the game was running and collect data about my performance. I scraped my score (how long I am), my rank, the total number of players in the lobby, and the maximum score.

The extension used Socket.io to send the data to a python webserver that then logged and enriched the data with other metrics like time alive.

After a few hours of playing and logging here are the results...

Data

This graph is comparing my score to time played. Every vertical line or discontinuity is when I died and started a new game.

My Average Score is about 2,768 - not bad 😌

My highest score was an amazing 13,790. In that game, I defeated a player who was very large. This is also evident in the graph through the extremely steep slope at around time 5500. Unfortunately, this glory was short-lived and I died soon after my miraculous achievement.

This initial graph got me thinking about how good I was doing compared to the best player in the lobby. For example, that score of 13,790 - how good was it really? How did it compare? So the next graph I made I also plotted the value of the highest score in the lobby in addition to my score.

Oh man hahaha, am I really that bad? This graph really had me laughing. The dotted line represents the highest score I was ever able to achieve and the tall red line is 1st place. I couldn't have been farther off from the high score. The closest I ever got to the highest score was my one exceptional game, however, during that game the first place score was extremely low compared to other games.

Finally, I was wondering if a specific score correlated to a rank. More specifically, I was curious about the percentile because that will remove the variable of the number of players in a lobby. I was wondering if being in the top 50 percentile for example usually corresponded with a specific score. So I plotted score percentile against the score.

There was actually a really strong relationship between percentile and score. I highlighted a few points. For example, a score of around 267 usually meant you were doing better than 50% of the players in the lobby and a score of 5155 percent usually meant that you were doing better than 90% of the players.

My all-time high score was at the 97.8% percentile which I'm gonna say is a win!

It was really awesome to see my scores and ranks visualized. Maybe the best part of this project was the ability to play video games under the cover of computer science, haha.

Play Slitehr.io here