This project is available in multiple languages:
This project visualizes player behavior data—collected from our team-developed game BroCapsule—by converting Excel files into time-cost heatmaps overlaid on level background images, using Seaborn and Matplotlib.
The tool supports three analysis modes:
- Single session analysis
- Single checkpoint in a session
- Aggregated data across all sessions
Item | Description |
---|---|
Session ID |
Unique identifier for a game session |
Level |
Name of the game level |
Checkpoint |
Name of the checkpoint |
Heatmap JSON String |
JSON string of time data per tile |
Success |
Whether the level was completed |
Completed |
Whether the checkpoint was completed |
Level width |
Level width in pixels |
Level height |
Level height in pixels |
Ceil size |
Side length of each heatmap cell (px) |
.
├── assets/ # Resource files
│ ├── Team404 Time-cost Heatmap (Responses).xlsx # Data source Excel file
│ └── levels/ # Background images folder
│ └── {level}_Tilemap.png # Background image for each level
├── exports/ # Exported heatmap images
├── main.py # Main Python script
├── requirements.txt # Python dependencies list
└── .gitignore # Git ignore rules
Navigate to the project root directory and run the following command to install dependencies:
pip install -r requirements.txt
Run the script:
python main.py
The program will guide you through the following steps:
- Select a level
- Choose a mode
0
: Single session mode1
: Single session + checkpoint mode2
: All sessions mode
- Follow prompts to select Session ID or Checkpoint
- Heatmap will be saved in the
exports/
directory
-
Filename example:
Time-cost Heatmap (Session ID = 1, Level = L1, ...)-2025-05-18-16-45-12.png
-
Content:Background image overlaid with a heatmap where darker colors indicate higher time cost
-
Features:
- Logarithmic scaling for time values
- Zero-value masking
- Optional hotspot annotations
Feel free to modify or extend this project for your own analysis needs. For questions, open an issue or contact the author.