HeatMaps for Land of The Setting Sun
- Parag Padubidri
- Oct 10, 2016
- 2 min read
For Land of the Setting Sun, I developed a HeatMap system for real-time analytics of our game within unity.
The system enables the user to set Range Color & Range Value selection via sliders, Log or Normalized Scale selection via a drop down menu and a Recording Timer as number of seconds input to decide at what intervals to record between player inputs right in the inspector.

HeatMap Inspector Options
The Range Color selection slider maps Unity’s entire 24-bit color palette containing 16 million colors to a single slider. This allows for an unlimited variety of color combinations for all the three ranges.


Realtime HeatMap generation using normalized & log scales
The Range Value sliders are smart enough to ensure the 1st range value never exceeds the 2nd range value, even if the user tries to force set the range 1 value bigger than range 2 or set the range 2 value lower than range 1. The Drop Down menu for Scale allows users to choose between log and normalized scale. The scale can be set both in real-time as the heatmap is being generated or for HeatMaps being loaded offline within unity. The recording timer allows the user to set the time in seconds after which the HeatMap recording is to be stopped if no player input is detected. This ensures clean & scrubbed data generated for the HeatMap.
The user can access the HeatMap Loader menu by going to Tools>HeatMap Loader where the player can choose to save the HeatMap generated while playing the game or load a HeatMap offline within unity without using the play button. The user can save the HeatMap by clicking on the Save current HeatMap button inside the menu.

HeatMap Loader Menu
The user has the option of specifying the name for the HeatMap or if left empty HeatMap will be generated using the current Timestamp appended to its name with a “.dat” extension. The save & load is being handled by a Binary Formatter in the backend using an Editor Script. The HeatMap Loader Menu displays all the HeatMap files saved by the user in a list of buttons. Clicking on one of them will load the respective HeatMap even when the game is not playing. So it essentially acts as an offline viewer for HeatMap datasets.

Offline HeatMap Generation
Even in offline mode the user has the independence of setting the colors & range values in the Inspector and the loader will use those values to represent the relevant data. This mode even takes into account the Log & normalized scale settings and represents data accordingly.
Comments