Tried 0.1s — interpolation still looks smooth, but needs more testing.
Result: file size reduced almost 3× compared to the first version.
Tried 0.1s — interpolation still looks smooth, but needs more testing.
Result: file size reduced almost 3× compared to the first version.
- Fully numeric array
- No string keys
- All booleans packed into one byte via bit flags
This gave the biggest compression boost.
- Fully numeric array
- No string keys
- All booleans packed into one byte via bit flags
This gave the biggest compression boost.
[0.0575,70.1,1.2,11.0,1.4E-07,0.7071,1.01E-05,0.7071,2.4,0.0,0]
[0.0575,70.1,1.2,11.0,1.4E-07,0.7071,1.01E-05,0.7071,2.4,0.0,0]
- Shortened field names
- Still stored booleans separately
Big improvement, but still not perfect.
- Shortened field names
- Still stored booleans separately
Big improvement, but still not perfect.
{"t":0.055,"pX":70.1,"pY":1.2,"pZ":11.0,"rX":-3.5E-07,"rY":0.7071,"rZ":1.06E-05,"rW":0.7071,"v":2.4,"s":0.0,"flags":0,"d":false,"l":false,"b":false,"c":false}
{"t":0.055,"pX":70.1,"pY":1.2,"pZ":11.0,"rX":-3.5E-07,"rY":0.7071,"rZ":1.06E-05,"rW":0.7071,"v":2.4,"s":0.0,"flags":0,"d":false,"l":false,"b":false,"c":false}
- Saved data every frame
- Very long field names
- All booleans stored separately
Result: unnecessarily bloated files.
- Saved data every frame
- Very long field names
- All booleans stored separately
Result: unnecessarily bloated files.
{"time":0.0563,"position_X":70.1,"position_Y":1.2,"position_Z":11.0,"rotation_X":-3.4E-07,"rotation_Y":0.7071,"rotation_Z":1.06E-05,"rotation_W":0.7071,"forward_Velocity":2.4,"steering":0.0,"isDrifting":false,"isLanding":false,"isBoosting":false,"isCollision":false}
{"time":0.0563,"position_X":70.1,"position_Y":1.2,"position_Z":11.0,"rotation_X":-3.4E-07,"rotation_Y":0.7071,"rotation_Z":1.06E-05,"rotation_W":0.7071,"forward_Velocity":2.4,"steering":0.0,"isDrifting":false,"isLanding":false,"isBoosting":false,"isCollision":false}