Metadata-Version: 2.4
Name: pyviser
Version: 0.8.9
Summary: PyViser - Rocket League replay visualizer
Author: RLViser Contributors
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

## RocketSim Visualizer

[![forthebadge](https://forthebadge.com/images/badges/made-with-rust.svg)](https://forthebadge.com)

A lightweight visualizer for [rocketsim-rs](https://github.com/VirxEC/rocketsim-rs) binds that listens for UDP packets.

Any language can communicate with the visualizer by sending UDP packets in the correct format, but `rocketsim-rs` has a `GameState.to_bytes()` function that does this automatically.

![image](https://github.com/VirxEC/pyviser/assets/35614515/47613661-754a-4549-bcef-13df399645be)

### Usage

To see an example of how to communicate with the visualizer, see the [example](https://github.com/VirxEC/rocketsim-rs/blob/master/examples/pyviser_socket.rs) in the [rocketsim-rs](https://github.com/VirxEC/rocketsim-rs) repository.

You can also choose to use the integrated support in [RLGym 2.0](https://github.com/lucas-emery/rocket-league-gym) and [RLGym-PPO](https://github.com/AechPro/rlgym-ppo) or use the [PyViser-Py](https://pypi.org/project/pyviser-py/) library to interface directly from Python via [RocketSim](https://pypi.org/project/RocketSim/) classes.

### Controls

**NOTICE:** These controls WON'T WORK until you've toggled the menu off. The menu is open by default upon launch.

| Key | Action |
| --- | --- |
| `Esc` | Toggle menu |
| `1` - `8` | Change car camera focus |
| `9` | Director camera |
| `0` | Free camera |
| `W` | Move forward |
| `A` | Move left |
| `S` | Move backward |
| `D` | Move right |
| `Space` | Move up |
| `Left Ctrl` | Move down |
| `Left Shift` | Slow |
| `R` | State set ball towards goal |
| `P` | Toggle pause/play |
| `+` | Increase game speed +0.5x |
| `-` | Decrease game speed -0.5x |
| `=` | Set game speed to 1x |
| `Left click`<sup>1</sup> | Drag cars and ball |

<sup>1</sup> - Requires the menu toggled ON to free the cursor, you can drag cars and the ball to move them in the world. Requires the agent on the other side to support state setting.

## Modes

Currently, both standard soccer and hoops are supported.

![image](https://github.com/VirxEC/pyviser/assets/35614515/d804d7e5-b78e-4a0a-9133-38e5aed0681d)
