Skip to content

v1.4.1

Latest

Choose a tag to compare

@thecosmicskye thecosmicskye released this 17 Nov 22:05
v1.4.1
506bb8a

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 (the rocketsim crate, 0.3.6) on RocketGPU's arena, with the same type, field and method names. A v3 project depends on it as rocketsim = { package = "rocketgpu", git = ... } and keeps its use rocketsim::... lines. cargo build builds the simulator with CMake.
  • views.field_arrays(sim, array, by_env=True): any get_full_state field of every arena of a BatchSim as a zero-copy (env, element[, dims]) view, on CPU and CUDA builds. sim.device_arrays() adds the wheel, solver and contact arrays, and Arena.sim is the arena's one-env BatchSim.
  • CarCarContact (DeviceView::car_car, Python views.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 (Python views.contact_order(sim)): the game's list of contacts in the order its solver visits them, with ContactOrderKind, ContactOrderCar and ContactOrderOtherCar to 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 every ticks ticks, 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_state lists env_states.goal_latched and env_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_jump counts 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_v3 with 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::Clone keeps 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).