heatmap_gen/replay_structure.md
2025-10-11 22:23:43 +05:30

2.5 KiB

JSON Structure Analysis

Root Object Structure

The JSON file contains a single root object with the following structure:

{
  "id": "string",
  "level": "string", 
  "myTeam": "string",
  "myUsername": "string",
  "players": [
    // Array of player objects
  ]
}

Player Object Structure

Each player in the players array has the following structure:

{
  "username": "string",
  "isLocalPlayer": "boolean",
  "teamId": "string", 
  "planeVarient": "number",
  "skinVarient": "number",
  "color": {
    "r": "number",
    "g": "number", 
    "b": "number",
    "a": "number"
  },
  "snapshots": [
    // Array of snapshot objects
  ]
}

Snapshot Object Structure

Each snapshot in the snapshots array has the following structure:

{
  "time": "number",
  "position": {
    "x": "number",
    "y": "number",
    "z": "number"
  },
  "rotation": {
    "x": "number",
    "y": "number", 
    "z": "number",
    "w": "number"
  },
  "health": "number",
  "throttle": "number",
  "isShooting": "boolean"
}

Complete Structure Summary

Root Object
├── id (string)
├── level (string) 
├── myTeam (string)
├── myUsername (string)
└── players (array)
    └── Player Object
        ├── username (string)
        ├── isLocalPlayer (boolean)
        ├── teamId (string)
        ├── planeVarient (number)
        ├── skinVarient (number)
        ├── color (object)
        │   ├── r (number)
        │   ├── g (number)
        │   ├── b (number)
        │   └── a (number)
        └── snapshots (array)
            └── Snapshot Object
                ├── time (number)
                ├── position (object)
                │   ├── x (number)
                │   ├── y (number)
                │   └── z (number)
                ├── rotation (object)
                │   ├── x (number)
                │   ├── y (number)
                │   ├── z (number)
                │   └── w (number)
                ├── health (number)
                ├── throttle (number)
                └── isShooting (boolean)

Data Type Notes

  • All numeric values appear to be floating-point numbers
  • The rotation object uses quaternion representation (x, y, z, w)
  • The color object uses RGBA values (0.0 to 1.0 range)
  • The position object represents 3D coordinates
  • The snapshots array contains time-series data for player movement and state