subtr-actor
subtr-actor turns Rocket League replay files into higher-level data than the raw actor graph exposed by boxcars.
It supports two main workflows:
- structured replay data for inspection, export, and analysis
- dense numeric arrays for ML and other downstream pipelines
The core crate is written in Rust, with bindings for Python and JavaScript.
Packages
- Rust:
subtr-actor - Python:
subtr-actor-py - JavaScript / WASM bindings:
@colonelpanic8/subtr-actor - JavaScript replay player:
subtr-actor-player - JavaScript stats player:
subtr-actor-stats-player(see it in action)
What You Get
- A higher-level replay model built from
boxcars - Frame-by-frame structured game state via
ReplayDataCollector - Configurable numeric feature extraction via
NDArrayCollector - Frame-rate resampling with
FrameRateDecorator - A similar replay-processing model across Rust, Python, and JS
Installation
Rust
[]
= "0.2.3"
Python
JavaScript
JavaScript Player
Quick Start
Rust: get structured replay data
use ParserBuilder;
use ReplayDataCollector;
If you want replay data plus outputs from other collectors, run them together in
one pass with ReplayProcessor::process_all() and then assemble the final
payload from the pieces. ReplayDataCollector::get_replay_data() remains a
convenience wrapper around that pattern.
Rust: build an ndarray for ML
use *;
Python
, =
JavaScript
import init from "@colonelpanic8/subtr-actor";
await ;
const replayData = ;
const validation = ;
if
const result = ;
console.log;
console.log;
Core Concepts
ReplayDataCollector
Use this when you want a serializable, frame-by-frame representation of the replay without dealing directly with the low-level actor graph.
NDArrayCollector
Use this when you want numeric features in a 2D matrix. In Rust you construct feature adders directly; in the Python and JS bindings you provide feature-adder names as strings.
FrameRateDecorator
Use this to resample replay processing to a fixed FPS before collecting data.
Common Feature Names
These are useful when working through the Python or JavaScript bindings:
- Global:
BallRigidBody,CurrentTime,SecondsRemaining - Player:
PlayerRigidBody,PlayerBoost,PlayerAnyJump,PlayerDoubleJump
PlayerBoost is exposed in raw replay units (0-255), not percentage.
Documentation
- Rust API docs: https://docs.rs/subtr-actor
- Project docs: docs/README.md
- Changelog: docs/CHANGELOG.md
- Python package README: python/PYTHON-README.md
- JavaScript package README: js/README.md
- JavaScript player README: js/player/README.md
- Example app: js/example/README.md
- Release notes and process: docs/RELEASING.md
Development
Bindings:
just build-js builds the repo-local bundler target into js/pkg. To build the web-target package that matches npm publish, run npm --prefix js install once and then npm --prefix js run build.
License
MIT