Prograde is a video game analyzer for professional Rocket League matches.

Introduction

Rocket League has been one of my favorite video games to date. It's a competitive E-sports game in which players controls a rocket-powered car. Each player can perform aerial tricks and other complex maneuvers. Because the game is 3-D, it's extremely hard to provide smart statistics or pull insights from game data. The in-game engine only pulls simple numbers like shots, saves, or assists. Often, it makes mistakes and cannot infer context.

This is where Prograde comes in - the smart engine aims at providing better analysis of Rocket League games. The engine can process a game replay in ~30 seconds, a quick turnaround for tournament commentators or professional teams. The engine provides more accurate data than the in-game engine as well as "smart data." This is includes but is not limited to: shot difficulty, save difficulty, play execution ratings, team skill ratings, and more.

Player movement is shown as a heatmap for a match

Engine

The back-end consists of the engine and analyzer. They are written Python and lean heavily on the use of Numpy and Pandas. A parser looks through the game data and outputs a CSV with data like objects positions, speeds, spawn locations, boost quantities, and more. A "collision detector" detects all ball hits within the game and marks them with a time-stamp. It uses linear algebra to find the minimum distance from the ball's surface to the hitbox's surface. It performs the following:

  • Pull 3-D orientation from parser (x, y, z, rot_x, rot_y, rot_z).
  • Place hitbox in space. Apply transformation matrix to rotate hitbox to the correct orientation.
  • Convert ball coordinates to "local coordinates"
  • Find the smallest distance from the surface of the hitbox to the ball's surface.

For those wanting the math, see GITHUB.

A similar procedure is used to detect other collisions, such as player-player collisions and ball-arena collisions. When using the mesh of the outer field, a rough pass is performed for obvious cases. Finer cases are processed using a finer mesh, making detection 10-20x faster.

Once hit detections are complete, the engine parses through to find "events." Events include:

  • 50/50 challenges and their winners
  • Shots, goals, assists
  • Saves and missed saves
  • Passes and setup plays
  • Dribbles (air dribbles or ground dribbles)
  • Kickoffs

The engine currently uses a Random_Forest learning method from SciKit Learn to make predictions. The model predicts a common sports metric called "xG." "xG" is the fraction of the time you'd expect a professional player to score. For example, if xG = 0.5, a player is expected to score 50% of the time. To predict xG, our model takes in over 30 characteristics from the parser, which we identified to be important during training. From this, the model can infer:

  • Shot quality
  • Save quality
  • Assist quality
  • Key game moments
  • Major mistakes / points of improvement
  • More!

After processing, the model outputs a page summary:

Output from a collegiate e-sports game

 

In 2020, Prograde was leased for use by the CCA (Collegiate Carball Association).