This repository contains tools for rendering a robust, visual leaderboard of TAS-transcribed Red Ball speedruns, including combined level playback, splits, and audio.
- Clone the repository to your local machine.
- Install Miniforge: Download and install from conda-forge.org.
- Initialize Conda: Open the Miniforge prompt and run:
conda init
- Create Environment: Set up the conda environment using the provided YAML file:
conda env create -f redball_render.yml
- Activate Environment:
conda activate redball_render
- VS Code Setup: If using Visual Studio Code, open a Python file and select Python 3.13 (redball_render) as the Python interpreter.
Visualizes gameplay for a specific level, combining multiple players/ghosts. It renders the playback as a .png sequence, ready for import to video editing software.
Command:
python render_combined_leaderboard.py [level] [options]Arguments:
level: The level number to render (1-12). Default:1.--start_frame: Frame number to start rendering from. Default:0.--interpolation_steps: Number of frames to generate between keyframes for smoother motion. Default:0.--render_scale: Resolution scale factor (relative to default game size). Default:2.--preview: Run in preview mode (opens a window) instead of saving to disk.--json: Sub-directory injson/folder containing the run data. Default:combinedRTA/top10.
Generates the sidebar overlay showing the timer, player splits, and time deltas against the World Record.
Command:
python render_sidebar.py [options]Arguments:
--duration: Total duration of the sidebar render in seconds. Default:180.0.--preview: Show the sidebar in a window instead of exporting.--scale: Size scale of the sidebar. Default:1.0.--start_time: Time offset to start the timer at. Default:0.0.
Synthesizes a combined audio track by mixing game sound effects triggered by the event data in the player JSON files.
Command:
python render_sounds.py [options]Arguments:
--json: Sub-directory injson/folder containing the run data. Default:combinedRTA/top10.
A helper script to batch render all 12 levels sequentially using render_combined_leaderboard.py.
Usage:
.\render_all_levels.ps1 -InterpolationSteps 5 -RenderScale 5To generate the JSON data files required for rendering, you will need the modified Red Ball SWF and the provided AutoHotkey scripts.
- Open
TAS Export/Red Ball - TAS Export.swf. Keep the window at the default 550x400 size. - Copy the run's TAS strings from your spreadsheet. Each string must be in a separate cell.
- Run the appropriate AutoHotkey script:
exportWRRun.ahk: Use this for runs where sprite animation data is needed (e.g., the primary/WR run).- Note: You may need to modify the sleep times in the script if any level is slower than in DividedByZero's 2:27 run.
exportRun.ahk: Use this for standard runs where only position, joint, and/or sound data is needed.
- Press F12 to start the script.
- The script will automate the process of interacting with the SWF to export data for all levels.
- Once finished, paste the content into a new
.jsonfile in the appropriatejson/subfolder.