Skip to content

VirxEC/rlviser

Repository files navigation

RocketSim Visualizer

forthebadge

A lightweight visualizer for 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

First-time Launch Setup

You should have UModel so the visualizer can uncook the game assets into the assets/ directory.

Precompiled versions of UModel for Windows and Linux are available on the website linked above, but Linux users may have to compile it themself.

If you don't include UModel, the visualizer will use some minimalist default assets. Certain things may not be present due to the lack of assets, but the field, cars, and ball are visible.

Usage

To see an example of how to communicate with the visualizer, see the example in the rocketsim-rs repository.

You can also choose to use the integrated support in RLGym 2.0 and RLGym-PPO or use the RLViser-Py library to interface directly from Python via 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 click1 Drag cars and ball

1 - 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