Repository navigation
Releases
v1.4.1
A Rust crate with RocketSim v3's API, zero-copy views of the whole simulation state, the game's car-to-car contacts and contact order as public state, and a ball-only path call. The physics is 1.4.0's: every result is the same. Speed is 1.4.0's: CUDA within 0.1% at every size from 96 to 16,384 arenas, CPU within noise at 96 to 1,024 (paired runs on the same machines).
New:
rust/: a crate with RocketSim v3's Rust API (therocketsimcrate, 0.3.6) on RocketGPU's arena, with the same type, field and method names. A v3 project depends on it asrocketsim = { package = "rocketgpu", git = ... }and keeps itsuse rocketsim::...lines.cargo buildbuilds the simulator with CMake.views.field_arrays(sim, array, by_env=True): anyget_full_statefield of every arena of aBatchSimas a zero-copy(env, element[, dims])view, on CPU and CUDA builds.sim.device_arrays()adds the wheel, solver and contact arrays, andArena.simis the arena's one-envBatchSim.CarCarContact(DeviceView::car_car, Pythonviews.car_car_contacts(sim)): the game's contact points between each pair of cars after a tick, with the point on either car in that car's frame, the normal and the distance.DeviceView::contact_order(Pythonviews.contact_order(sim)): the game's list of contacts in the order its solver visits them, withContactOrderKind,ContactOrderCarandContactOrderOtherCarto read an entry.BatchSim::ball_path(samples, ticks, goal_y, out, result): every arena's ball stepped alone (the arenas hold no cars), its position and velocity everyticksticks, the goal it enters and the tick it crosses the line on. One kernel launch on CUDA, whose first call must not be under stream capture. Bit-identical to stepping.get_full_statelistsenv_states.goal_latchedandenv_states.respawn_match_order, so a state copied from one arena to another carries the goal latch and the match's respawn order.
Changed:
get_state_v3().air_time_since_jumpcounts after a dodge or a double jump with no jump before it, as RocketSim v3 does. In 1.4.0 it stayed 0 there.set_state_v3with a state read from the car leaves the car unchanged.- CPU builds compile with GCC 11 (Ubuntu 22.04's default). 1.4.0 needed GCC 12 or Clang.
Arena::Clonekeeps the arena's mutators. In 1.4.0 a clone took the game mode's defaults, so a clone of an arena with changed mutators went its own way from the first tick.
Accuracy, on the full-state suite: unchanged, every body-tick bit-exact. The suite's get_state_v3 check now runs RocketSim v3 alongside through each segment; on it air_time_since_jump differs from v3 on 116 car-ticks of 11.8 million (1.4.0: 43,004).
v1.4.0
The car state reports the game's own values, RLBot v5's values come bit for bit from a new header, and six more of the game's rules are in. CUDA is 0.1% to 1.7% faster than 1.3.0; CPU is level with it.
| Arenas | RocketGPU CUDA | CUDA vs 1.3.0 | RocketGPU CPU | CPU vs 1.3.0 |
|---|---|---|---|---|
| 96 | 0.67M | +0.1% | 4.35M | +0.5% |
| 256 | 1.52M | +0.3% | 4.53M | +0.6% |
| 512 | 2.61M | +0.5% | 4.66M | +0.3% |
| 1,024 | 4.47M | +0.5% | 4.64M | +0.1% |
| 4,096 | 11.02M | +0.3% | 3.78M | +0.5% |
| 8,192 | 16.10M | +1.7% | 3.69M | +0.2% |
| 16,384 | 19.04M | +0.8% | 3.74M | +0.6% |
Arena-ticks/s from bench_cpp --replay; CUDA on an RTX 5090, CPU on a Ryzen 7 9800X3D with 14 threads. The comparisons with 1.3.0 are paired runs on the same machine; the CPU differences are inside their noise (about 1%).
Car state:
CarStateholds the game's own values after each tick: the body'svelandang_velbefore the speed caps, the game'sis_supersonicflag, its jump flags, and its boost amount (boost_amount, 0 to 1;boostis that times 100). In 1.3.0 these fields held RLBot's values.- New
rocketgpu/rlbotv5.hgives what RLBot v5 sends, bit for bit:physicsof cars and ball,is_supersonic, the jump and dodge flags and timers,demolished_timeout, touch time,seconds_elapsedandboost(RlbotV5Boost, one per car, updated after every tick). Python:rlbotv5_*methods on the states; with the RocketSim-style arena,car.get_native_state()returns the state they take. - The RocketSim-style
get_state/set_stateandget_state_v3/set_state_v3return what they did in 1.3.0, with two exceptions:boostdiffers in its last digits (it is counted in the game's units), andget_state_v3keepsjump_hold_brokenset after the jump ends, as v3 does.
Game rules (results change):
- A demolished car is back 361 ticks after the demolition, in the RocketSim-style arena too. In 1.3.0 it was back after 360. It is in the air until its wheels touch, so a jump press on its first tick is a dodge or a double jump.
- A jump press on the tick the game clears a ground jump's flag does nothing.
- A jump press that starts the flip-over of a car on its roof does nothing else. In 1.3.0 the car also double jumped.
- A car that dodges while crossing 2200 uu/s turns supersonic on the game's tick. In 1.3.0 it could be one tick late.
- Boost is counted as the game counts it (an amount from 0 to 1), so it runs out on the game's tick.
world_contact.has_contactis read from the contact points left after the tick, as the game reads it. In 1.3.0 a point that was added and dropped again within one tick also set it, and a car with no wheel on the ground and the throttle down got the auto-roll torque on that tick.
New:
Arena::ResetToKickoff(game_countdown), Pythonreset_to_kickoff: the match's next kickoff, as the game sets it up after a goal.ResetToRandomKickoffdoes what it did.
Accuracy, on the full-state suite: every body-tick of its 144 recordings is still bit-exact, on CPU and CUDA. Three new recordings of a bot acting on every tick are exact too: 967,122 of 967,122 body-ticks (1.3.0: 99.96%). The suite now also scores the state values: CarState against the game's memory and rlbotv5.h against RLBot's packets, each equal on all 11.8 million car-ticks, and kickoff spots and countdowns against the game's (4,954 of 4,954 cars on the right spot). One case is not scored: the boost of two cars after a pad came back under both (224 car-ticks). The game gives such a pad to the car its collision octree lists first, which the recordings do not hold; RocketGPU gives it to the later car in its update order.
v1.3.0
Kickoffs and respawns follow the game's own rules, and car-car hit reporting loses nothing. CUDA is 0.7% to 1.7% faster than 1.2.0 from 512 arenas up and unchanged below; CPU is 1% to 3% faster on x86 and 5% to 8% faster on Apple silicon.
| Arenas | RocketGPU CUDA | CUDA vs 1.2.0 | RocketGPU CPU | CPU vs 1.2.0 |
|---|---|---|---|---|
| 96 | 0.66M | −0.2% | 4.40M | +0.9% |
| 256 | 1.49M | +0.2% | 4.57M | +2.7% |
| 512 | 2.56M | +0.7% | 4.72M | +3.2% |
| 1,024 | 4.43M | +1.4% | 4.68M | +3.2% |
| 4,096 | 10.84M | +1.7% | 3.86M | +3.0% |
| 8,192 | 15.65M | +1.1% | 3.69M | +1.1% |
| 16,384 | 18.56M | +0.7% | 3.75M | +1.0% |
Arena-ticks/s from bench_cpp --replay; CUDA on an RTX 5090, CPU on a Ryzen 7 9800X3D with 14 threads. The comparisons with 1.2.0 are paired runs on the same machine; the Apple silicon figure is from an M4 Pro at 256 and 1,024 arenas.
Game rules:
- Kickoff spots: one shuffled order of the five spots per match, each kickoff starting one spot further along it, both teams alike; a team with fewer cars gets the best of the spots a full team would take. A reset with
reset_scoreboardstarts a match; a reset without it and without a seed is that match's next kickoff. Before, seeded kickoffs were not evenly drawn (a team's first car was on the back-right spot 7% of the time instead of 20%). - Demolished cars come back on the first free spot of their team's four, from a random start in the match's order of them; with all four occupied, 192 uu beside one. Before, a car could respawn inside another. Occupied is the game's test, against each car's body mesh bounds: the new
CarConfig::bodynames the body (a row oftools/data/car_body_mesh_bounds.tsv, all 233 of the game's;CarBodyId(name)finds one), set in each preset to its stock body. blue_scoreandorange_scorecount a goal once, not once per tick the ball stays in the net.
Fixes (compat Arena):
- A bump or demolition is reported to the callback for both cars of a mutual hit, and for every hit of a step however many ticks it has. A kickoff reset or a state set no longer leaves an old hit behind or reports one on its first tick.
- Setting a car's state no longer collects the boost pads between its old and new position.
ResetToRandomKickoff(-1)is random, as in RocketSim. In 1.2.0 every arena went through the same fixed sequence of kickoffs, in every run.GetStateV3/SetStateV3:hasJumpedas RocketSim v3 reports it (also set by a double jump or dodge without a jump before it).- MSVC (CPU build): the three places 1.2.0 did not compile.
Breaking changes:
CarState: the single bump record (bump_event_*) is replaced bybump_event_bumps[7]andbump_event_demos[7], running counts of this car's hits on each other car of its env.EnvStatehas four new fields (kickoff_match_order,kickoff_match_index,goal_latched,respawn_match_order) and is 44 bytes, up from 36.- Seeded kickoffs and respawns give different spots than in 1.2.0, so runs with the same seed differ.
- Compat respawns differ from RocketSim, which takes one of the four spots at random whatever stands on it.
v1.2.0
CUDA is 13% to 74% faster than 1.1.0 with bit-identical results; CPU speed is unchanged.
| Arenas | RocketGPU CUDA | CUDA vs 1.1.0 | RocketGPU CPU |
|---|---|---|---|
| 96 | 0.66M | +12.8% | 4.26M |
| 256 | 1.49M | +15.0% | 4.35M |
| 512 | 2.53M | +15.7% | 4.44M |
| 1,024 | 4.33M | +18.4% | 4.44M |
| 4,096 | 10.71M | +30.8% | 3.62M |
| 8,192 | 15.42M | +54.3% | 3.55M |
| 16,384 | 18.55M | +74.1% | 3.65M |
Arena-ticks/s from bench_cpp --replay; CUDA on an RTX 5090, CPU on a Ryzen 7 9800X3D with 14 threads. The CUDA comparison with 1.1.0 is paired runs on the same machine.
CUDA builds need CUDA 12.1 or newer. They now compile the kernels as seven translation units by default, which builds faster and in less than half the memory. This needs Python 3 at configure time; without it, with MSVC, or with -DROCKETGPU_CUDA_SPLIT=OFF, the kernels build as one file as before. Results are identical.
New: custom arenas, a soccar match (scoring, kickoffs, boost pads, demos) on your own geometry. BatchSim(config, layout) takes an ArenaLayout: collision meshes (a directory of .cmf files and/or ArenaMesh triangle lists), ArenaPlanes, boost pads, an ArenaGoal per team, kickoff and respawn ArenaSpawns and the ball spawn. A default ArenaLayout is the official arena; ArenaLayout::OfficialPlanes() gives its floor, ceiling and side walls for use with your own meshes. The same types are in the Python module. Positions must be within 11,500 uu of the origin on each axis and spawn yaws within 8 pi of zero, or the constructor throws std::invalid_argument. Custom geometry steps slower than the official arena, whose results are unchanged and which is no slower than before. See "Custom arenas" in the README.
Fixes:
- Configs with
max_cars_per_envabove 8 silently overran per-env scratch memory, on CPU and CUDA. They are now rejected: theBatchSimconstructor throwsstd::invalid_argument. - CUDA: with more than one
BatchSimin a process, a step captured into the caller's own CUDA graph could read or write another simulator's step buffers out of bounds, or a buffer freed after a larger simulator stepped. Step buffers are now passed to the kernels of the step that sized them and are kept once a caller has captured a step.
Breaking changes:
max_cars_per_envabove 8 is rejected (see Fixes).- CUDA builds, code that reads or writes car state directly in GPU memory (
DeviceView::car_states,device_arrays()["car_states"], the Python device field views): car states are now stored in tiles of 32 car slots, so cariis at[i // 32, i % 32]and the field views have shape(tiles, 32, ...).DeviceView::car_statesisvoid*; the tile layout is instate_layouts()["car_states"]["device"].download_state_arrayandupload_state_arrayare unchanged and still takeCarStatestructs.
v1.1.0
Arena-ticks/s from bench_cpp --replay (recorded game controls from the fullstate suite). CUDA on an RTX 5090; CPU and RocketSim v3 on a Ryzen 7 9800X3D with 14 threads. CPU vs previous release uses 14 threads for both. CUDA speed is unchanged from 1.0.0.
| Arenas | RocketGPU CUDA | RocketGPU CPU | CPU vs previous release | RocketSim v3 |
|---|---|---|---|---|
| 96 | 0.59M | 4.17M | +32.8% | 2.63M |
| 256 | 1.31M | 4.26M | +14.8% | 3.46M |
| 512 | 2.24M | 4.43M | +17.5% | 3.56M |
| 1,024 | 3.79M | 4.38M | +11.7% | 3.94M |
| 4,096 | 9.03M | 3.65M | +9.0% | 3.92M |
| 8,192 | 11.48M | 3.61M | +13.1% | 3.88M |
| 16,384 | 12.42M | 3.68M | +11.7% | 3.69M |
Changes:
- Python:
upload_state_arrayuploads raw state structs from host memory;download_internal_stateandupload_internal_statemove the wheel, solver and contact state a step carries over, so envs from a CUDA build continue exactly on a CPU build. Building with-DROCKETGPU_PY_MODULE_NAME=namerenames the module, so a CPU build loads beside a CUDA one. bench_cpp --replay FILEruns recorded game controls instead of random ones;tools/replay_controls.pymakes the file from the fullstate suite.- CPU builds: wheel rays and mesh ray casts run in SIMD lanes, the ISPC car pre-tick loads and stores without gathers or scatters, the world step skips more work and runs from one smaller code path, and small batches split into more pool tasks per thread. Same results bit for bit.
- Long runs stay bit-exact with the game more often: broadphase AABBs now match the game's, and car-mesh contacts no longer start a tick early.
- CUDA: kickoffs on a non-default stream no longer spawn every car at the origin.
- README: the speed table uses
bench_cpp --replayfor CUDA, CPU and RocketSim v3.
Behaviour changes:
- Broadphase AABBs and car-mesh contact timing follow the game, so long runs can step differently from 1.0.0 (closer to the game).
v1
Arena-ticks/s from bench_cpp. CUDA on an RTX 5090; CPU and RocketSim v3 on a Ryzen 7 9800X3D with 14 threads. CPU vs previous release uses 14 threads for both.
| Arenas | RocketGPU CUDA | RocketGPU CPU | CPU vs previous release | RocketSim v3 |
|---|---|---|---|---|
| 96 | 0.64M | 3.76M | +21.9% | 1.25M |
| 256 | 1.46M | 4.56M | +7.2% | 2.35M |
| 512 | 2.50M | 4.71M | +9.3% | 3.43M |
| 1,024 | 4.35M | 4.81M | +12.4% | 4.21M |
| 4,096 | 10.17M | 4.72M | — | 5.02M |
| 8,192 | 12.32M | 4.74M | — | 4.88M |
| 16,384 | 12.75M | 5.12M | — | 5.04M |
Changes:
- Version 1.0.0 (
rocketgpu_py.__version__). tools/bench_cpp: a C++ throughput benchmark running RocketSim v3'sarena_scale_v3training workload (-DROCKETGPU_BUILD_BENCH=ON; needs C++20, and with CUDA, CMake 3.25.2+ and CUDA 12+).- CPU builds: the ball pre-tick runs in ISPC lanes across envs, the car pre-tick keeps its four wheels in vector lanes, boost pads visit only each tick's candidate pads, cars with no static contact skip the world solve, wheel rays and mesh queries walk fewer mesh entries, and thread-pool workers wait through the short gaps between steps instead of sleeping. Mirrored-respawn batches step together on the ISPC path, and the default thread count is two fewer than the CPU count on machines with 8+ CPUs (except Apple). Same results bit for bit.
- BatchSim: a control stride of 0 holds one row of controls for every tick.
- README: speed table from
bench_cpp, CUDA and CPU vs RocketSim v3; accuracy on fullstate suite v3.
Behaviour changes:
kickoff_seed0 (the default) gives each env a new kickoff shuffle on every reset; it used to repeat the same layout per env.- RocketSim compat:
Arenauses RocketGPU's own kickoff and respawn draws instead of mirroring RocketSim's, so kickoff spots and respawns no longer match RocketSim's for the same seed, andSetRespawnRngSeedhas no effect. Compat Arenas step on the faster batched path. - Build: ISPC kernels are on by default on Apple arm64 too.