A version of RLGym for use with the RocketSim simulator.
This project is a TEMPORARY STOP-GAP to use RocketSim while RLGym 2.0 is in development. I provide no guarantees that it is bug-free or that I will not make breaking changes to this project in the future.
This project requires you to acquire assets from a copy of Rocket League that you own with an asset dumper. I will not walk you through this process. The necessary links and basic instructions are listed below. If you cannot follow those, don't bother me.
- Install RocketSim via
pip install rocketsim
- Install this project with pip via
pip install git+https://github.com/AechPro/rocket-league-gym-sim@main
- Build and run the asset dumper
- Move the dumped assets to the top level of your project directory
This project acts as a drop-in replacement for RLGym and can be used in exactly the same way. Barring the changed variables listed below, you can replace every instance of rlgym
with rlgym_sim
(or simply import rlgym_sim as rlgym
) and your existing RLGym code should work.
All variables having to do with the game client have been removed from the make
function. For example, rlgym_sim.make(use_injector=True)
will fail because there is no injector. The following is a list of all removed make
variables:
use_injector
game_speed
auto_minimize
force_paging
launch_preference
raise_on_crash
self_play
Thanks to the flexibility of the simulator, the following additional variables have been added as arguments to make
:
copy_gamestate_every_step
: Leave this alone for the default behavior. Setting this toTrue
will no longer return a newGameState
object at every call tostep
, which is substantially faster. However, if you need to track data from the game state or its member variables over time, you will need to manually copy all relevantGameState
,PlayerData
, andPhysicsObject
data at eachstep
.dodge_deadzone
: Sets the threshold value thatpitch
must meet in order for a dodge to occur when jumping in the air.
- A variety of classes in
rlgym_utils
such asSB3MultipleInstanceEnv
imports therlgym
library to build environments, so you will need to replace those imports yourself and remove the misc launch options listed above if you want to use SB3 withrlgym_sim
. Note also thatSB3MultipleInstanceEnv
waits 60 seconds between launching clients by default because multiple Rocket League clients will break each other if launched simultaneously. This is not the case with RocketSim, so you can remove that delay. - the
PlayerData
objects do not trackmatch_saves
ormatch_shots
yet.