Log inGet started
Package

torqueValley.package

This package holds more than this page lists. See all of its files in its world.

README.md

torqueValley

Torque Valley, a BeamNG-spirited driving sandbox, as one package that only puts other packages together. Drive, drift, jump and crash a dozen drivetrain-simulated cars around a 720 m valley; everything that drives, sounds, films, scores or draws comes from an installed kit, and this package holds the place and the glue.

What it holds

PartWhat it is
valley (scene)The sandbox: meadow valley ringed by hills, a 1.3 km country loop with a roundabout, highway spur and dirt rally loop, an eleven-lane surface proving ground (tarmac to ice), a frozen lake, skid pad, stunt park and crash zone. Every joining player gets their own car.
ValleyGame (component)The glue: AI field on the host, and per player the minimap + landmarks, racing controls, gauge cluster, crash shake, music and driver progression.
layout (module)Where everything stands, as data: loop and spur points, zones, spawns, the AI field.
landscapes/valley (terrain data)The valley's heightfield and paint.
cover.jpgThe world cover.

The kits it puts together

KitWhat it brings to the valley
torqueCarsThe cars (12 kinds × 3 looks, real drivetrains, soft-body dents) and the garage (G).
driveSurfacesGrip per ground: tarmac, wet, gravel, mud, sand, snow, ice…
roadPiecesThe roads, roundabout and kerbs.
aiDriversSeven AI drivers with personalities on the loop.
engineVoicesEngine, shift, skid and crash sounds for every car.
driveCamsChase, cockpit, hood, bumper, orbit, TV, heli and rear cameras (C).
gaugeClustersThe dash (gaugeStyle).
driveProgressDriver XP and levels for speed, drift chains, air and crashes, the valley's challenges, toasts (progressStyle).
barsKitThe XP bar and body-damage bar driveProgress draws.
navUiKitMinimap with landmarks, objective tracker, toasts.
controlsKit, juiceKit, soundstage, groundMaterialsTouch/gamepad racing scheme, crash shake, music, ground looks.

The package itself is glue: 325 lines of its own code against about 16 200 lines of the kits above that the game actually runs, a 98 % reuse share. REUSE.md at the world's root rates each kit by how much of it the game uses.

Play it

The world's startup scene is torqueValley.valley. To open it elsewhere:

layers.load(asset.ref("torqueValley.valley", "scene"))

Tune the game on the ValleyGame entity in the scene: aiCount (7), music (synthwave), gaugeStyle (digital), progressStyle (arcade; also career, stunt, drift, zen). In play, ValleyGame:progress() answers the driver's XP, level, bests and challenges.

Controls: W/S throttle and brake, A/D steer, Space brake, Ctrl handbrake, E/Q shift, M auto/manual, R reset, Backspace respawn, G garage, C camera.

Tests

tests/torqueValley checks the layout data and the glue: asset.resolve("torqueValley", "testSuite"):run() in edit mode.

Known limits

  • Driver progression is local and not saved between sessions (see driveProgress).
  • The editor build runs about 35 fps with eight cars (see the valley scene's README for where the time goes); a second real client has not been connected yet.