All content © 2022 DigiPen (USA) Corporation, all rights reserved.

Team Cosmic Pineapple - Honey Hustle

Technical Design - Unity Prototype
9/19-4/20
Heat Mapping System - Unity

While working on the large 14-person multi-department developer team that I was producing for, I developed a heat mapping tool within our Unity prototype of our game concept. We had just brought on a new Level Designer, and were behind on implementing new ideas, so I drafted this in the span of two days to help him out. I taught myself how to serialize and deserialize within Unity for this project, and am happy with how it turned out.

The files are opt-in saving features that save both heat maps and the level geometry. This system is equipped to save out all types of sprite resources, as long as they are in the Resources folder of both the editor project and built projects. This system works in builds using the same folders it does in editor, which makes it dynamic and portable.

The heat maps are created by dropping small, colored dots in small intervals, and additionally drop dots of different colors depending on what type of interaction has spawned them. Red dots indicate players losing health from colliding with enemies or hazards, black dots indicate player deaths, green dots indicate player healing, and blue dots are the normal player-colored dots that drop over the course of movement across the level.

 

This allows the maps to be utilized by analyzing the data clusters, particularly with how many blue dots there are (which would directly correlate with amount of time spent in level). Other analysis points include where and how often are players being damaged by enemies, as represented by the location and number of red dots, as well as how often players die. I intended to expand on this system to include cross-level analysis of the number of deaths, to include a bar graph that will display the number of deaths per level, which would help indicate if levels are too difficult. Paired with the heat maps would allow designers to make informed design decisions and tweaks to the existing design.

It took a while to get this set up, though getting it working in build was an important feature for me, as my designers also weren't very comfortable at the time with going in and looking at JSON files, or overly complicated tutorials for usage of the system. Making it possible to use in build and in editor meant that they didn't have to look at the JSON files or at the code, and they could realistically take any JSON maps or level files and drop them into the heat map build, to avoid interrupting each other while they are working in the Unity project.

Code samples below.

Additional Documents - Code Samples
JSON Serialization - Saving Heatmaps
JSON Deserialization - Loading Heatmaps