A downloadable asset pack

Buy Now$14.99 USD or more

Side-view vehicle physics for browser games – hill-climb, stunt, delivery and off-road. Plain JavaScript on top of planck.js (Box2D). No build step.

▶ Play the free demo first: Vehicle Physics 2D – playable demo

Why this kit

2D wheel physics looks easy until you ship it: suspension that floats on one car and bounces on another, cars that wheelie and flip as soon as you press the gas, wheels that lock when you let go, cars that slide back down hills, wheels catching on collider seams, no reverse, no mobile controls. Vehicle Physics 2D was built around exactly these problems, and the guide has a troubleshooting table for each.

Physics

  • Suspension that means the same at any mass – set frequency (Hz) and damping ratio; 2 Hz feels the same on a 100 kg bike and a 1000 kg tank. Bump stops keep wheels inside their travel.
  • Drivetrain – torque curve, automatic / manual / single-speed gearbox, launch clutch, freewheel, brakes in g, ABS, reverse on the brake pedal, handbrake, per-wheel drive and brake shares (FWD, RWD, AWD).
  • Assists – motor reaction-torque cancel (no more accidental backflips), anti-flip, air control, traction control, self-right, angular speed limit.
  • 8 surfaces – asphalt, dirt, grass, sand, mud, ice, snow, rock: grip, rolling resistance and particle colour.

World

  • Streamed endless terrain (seeded, ramps, surface patches) and hand-made spline tracks with a finish line.
  • Ghost / adjacent points between ground pieces, so wheels never catch on seams.
  • Plank bridges, crates, pickups (fuel, coins, nitro).

Vehicles & gameplay

  • 7 presets: hatchback with breakable parts, 4x4 jeep, monster truck, dune buggy, dirt bike with a ragdoll rider, tank with animated tracks, cargo truck with trailer.
  • Fuel, nitro, damage and health, breakable parts and wheels, roof / head crash.
  • AI driver (autopilot, opponents, balance tests), follow camera with look-ahead and shake.
  • Tricks: flips, air time, wheelies, stoppies, perfect landings, combos. Ghost replays of the best run.
  • Data-driven upgrade shop with save, RPM engine audio, dust / mud / snow particles, HUD with suspension bars and a live tuning panel that exports JSON.

What you get

  • lib/rl-vehicle2d.js (global RLV2D or require()) + planck.min.js (MIT)
  • 8 preset JSON files (the same format as our Unity edition)
  • 3 examples: a 30-line minimal setup, a custom 6-wheel rover with the tuning panel, a Node.js headless test
  • The complete demo game (6 maps, garage, ghost, autopilot, touch controls) with readable source
  • Vector renderer (no images needed) – or draw your own sprites from interpolated transforms
  • User guide (PDF): every preset field, suspension, drivetrain, assists, terrain, helpers, troubleshooting

Works with any framework that can draw on a canvas or read positions: plain canvas, Phaser, PixiJS, Three.js. Keyboard, gamepad, touch pedals and tilt input included. Tested in Chrome and in Node.js 22.

Code and documentation were written with the help of an AI assistant (Claude) and tested by us. Demo sounds are from our free Drive & Destroy SFX Lite.

Licence: use in any number of commercial or non-commercial games; do not resell or redistribute the kit itself.

Purchase

Buy Now$14.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $14.99 USD. You will get access to the following files:

Rasterloom-Vehicle-Physics-2D-HTML5-v1.0.zip 359 kB

Leave a comment

Log in with itch.io to leave a comment.