Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Crumple Zone

A soft-body driving sandbox for Linux, written from scratch in C++17 and OpenGL 3.3.

Every vehicle is built like a real one. A welded body structure sits on a stiff frame, and everything else bolts on: an engine and gearbox on rubber mounts, wishbone or live-axle suspension with coil-overs, a steering rack with tie rods, drive shafts, and a hood, doors and bumpers held on by hinges, latches and clips. It's all point masses and beams simulated at 2,000 Hz. Metal bends permanently when it's overloaded and tears when it's stretched too far. Dents, crushed fronts, doors hanging open, a bumper dragging on the road, bent steering, a snapped drive shaft and torn-off wheels all come out of the physics. Nothing is pre-animated.

Build and run

You only need g++, make and the SDL2 runtime library, which most desktops already have (Debian/Ubuntu package libsdl2-2.0-0). You don't need any -dev packages.

make
./crumplezone
Option Effect
--fullscreen Start fullscreen
--size 1920x1080 Window size
--no-audio Disable sound
--no-vsync Disable vsync
--no-pad Ignore game controllers (also CZ_NO_PAD=1)
--physics-threads auto|all|N Override the saved physics thread budget: AUTO, every logical CPU, or a number. 1 runs serially
--spawn X,Z[,HEADING] Start somewhere else; for example, --spawn 300,0,-80 puts you on the loop road
--scenario NAME Play one of the test scenarios (see Testing)
--host [PORT] Host a multiplayer session on any port from 1024 to 65535, for this run (without it: the PORT on the Multiplayer page, 27015 until you change it)
--join HOST[:PORT] Join one
--name NAME Your name in multiplayer
--password PASSWORD The password of the game you host, and the one you offer when you join (also the PASSWORD field on the Multiplayer page)
--time HOURS Hold the clock at a time of day, e.g. --time 21.5 (for screenshots)
--proc-plants Draw the classic maps' trees and bushes with the generated plants (docs/procedural-plants.md); also CZ_PROC_PLANTS=1. A look only: the world and its colliders are the same

Hot reload (Linux): leave the game running while you rebuild (make). When the new ./crumplezone lands, the HUD says NEW BUILD READY; press F5 (always on; or F12 → TOOLS → RELOAD) and the game restarts on it, on the same map, in the same vehicle (with its garage parts), at the same spot.

Releases

Download from the releases page. Each release has three builds:

File Platform How to run
CrumpleZone-<version>-mac.dmg macOS 11+, Apple silicon and Intel Open the DMG, drag CrumpleZone.app to Applications, then open it. It isn't notarized, so the first time right-click it and choose Open (or run xattr -dr com.apple.quarantine CrumpleZone.app).
CrumpleZone-<version>-windows-setup.exe Windows 10/11, 64-bit Run it to install (no admin needed; Start menu and desktop shortcuts). Unsigned: Windows may say "unknown publisher" (More info > Run anyway). make windows-installer builds it (needs nsis).
CrumpleZone-<version>-linux.zip Linux amd64, the same systems as the .deb (the SDL2 runtime; curl or libcurl for updates, which most desktops have) Unzip it and run ./install.sh. It installs for your user only (no sudo) in ~/.local/share/crumplezone, with a crumplezone command and a games-menu entry, and updates itself. ./install.sh --uninstall removes it.
CrumpleZone-<version>-linux.deb Debian 13+ / Ubuntu 24.04+, amd64 sudo apt install ./CrumpleZone-<version>-linux.deb, then run crumplezone or pick Crumple Zone from the games menu. It installs to /opt/crumplezone. It needs sudo to replace, so it doesn't update itself: the game shows where to get the new one.

Updates: from the release with the updater on, the game checks the newest GitHub release on launch (and when a join code finds the host on a newer version). It shows UPDATE x.y.z AVAILABLE with UPDATE NOW / LATER, then downloads the new version and checks it against a signed manifest (Ed25519, SHA-256). It swaps the new version in, keeps the previous one, and restarts. If the new version fails to start twice, the game goes back to the previous one by itself. If anything goes wrong, you stay on your current version and the game says why. The Windows and Mac downloads (-windows.zip, -mac.zip) are what the updater installs. Turn the launch check off with --no-update-check, or with the line check off in update.txt in the settings folder. A .deb install is told once per release where to get the new one. Owner setup: signing keys, how updates are served.

.github/workflows/release.yml builds all three on every push to sync or main (kept as workflow artifacts, as a build check). Pushing a version tag (git tag v0.2.0 && git push origin v0.2.0; the Mac job is skipped on a tag unless the repository variable RELEASE_MAC is true, so that release has the .deb and .exe) also publishes them as a release, with notes from docs/releases/<tag>.md.

Windows

make windows cross-compiles build/win/CrumpleZone/crumplezone.exe (with SDL2.dll beside it) and zips it. It needs the mingw-w64 cross compiler (g++-mingw-w64-x86-64-posix) and the official SDL2 x64 Windows runtime (SDL2.dll) in third_party/sdl2-win64/. Settings and the garage live in %APPDATA%\crumplezone on Windows. Multiplayer works between Linux and Windows.

The executable requests the high-performance NVIDIA/AMD GPU on hybrid laptops. Windows can override that request: if F3 shows the integrated GPU, select crumplezone.exe in Windows Settings → System → Display → Graphics, choose High performance, and restart the game. NVIDIA explains the Windows GPU preference override here.

F3 opens the debug screen: the active GPU, FPS (average and 1% low), physics time and CPU time submitting the scene, with your position, the vehicle and its wheels, and the network; Shift+F3 adds a frame-time graph. If physics time rises with more cars, lower the car count; if rendering is expensive, lower the graphics preset or render scale. The draw CPU number includes time blocked by the graphics driver and is not a measurement of GPU execution time. Adaptive quality targets 60 FPS by temporarily reducing render scale and effects; it preserves your saved graphics choices, restores detail when frame times allow, and can be disabled under Settings. It cannot guarantee 60 FPS when physics or other CPU work is the bottleneck. Windows writes the driver version, active GPU, physics thread count, HDR target and shader errors to %APPDATA%\crumplezone\graphics.log on each launch.

Set PHYSICS THREADS in Esc → Settings to AUTO or any count up to all logical CPUs (hardware threads), including counts above four. It saves between launches and applies immediately. AUTO uses the conservative tested budget of up to four threads; choosing the highest count, marked ALL, permits the whole CPU. More threads can cost more than they save in small scenes, so compare physics time with F3. The budget includes the main thread; small workloads still run serially. Car forces and collision geometry preparation share this budget for larger scenes. Car-to-car contact forces stay in their original order, at the same 2,000 Hz timestep. Collision bounds use a spatial sweep, and stationary supports reuse their triangle grids. HDR anti-aliasing is applied to the scene once; unsupported multisample targets fall back to fewer samples. See performance measurements and verification.

macOS

make mac (on a Mac with the Xcode command line tools) builds a universal build/mac/CrumpleZone.app (arm64 + x86_64, macOS 11+) and build/mac/CrumpleZone-mac.zip. make mac-dmg also builds build/mac/CrumpleZone-mac.dmg with an Applications shortcut. It needs the official SDL2 macOS framework: copy SDL2.framework from the SDL2-2.30.x.dmg on SDL's releases page into third_party/sdl2-mac/. The app is ad-hoc signed, not notarized. Settings live in ~/.config/crumplezone, as on Linux.

Audio

Audio includes adjustable outdoor ambience (wind, foliage, bird phrases and night insects), with its own AMBIENCE level in Settings. Backcountry has a distinct arrangement of warm keys and picked strings. Master volume controls every layer. Exact recorded vehicle banks are still pending; absent banks use procedural engine sounds. See audio changes and silent auditions.

Testing

The physics, the AI and every garage mod are covered by about 200 scenario tests in tests/. Each one scripts a situation on the real map and checks the outcome against real-world numbers, for example:

  • the body twists 26–34 kNm per degree (a real modern car: 10–40)
  • the front wheels steer by themselves less than 0.4° over 5 cm of suspension travel
  • 100–0 km/h braking takes 33–42 m in the coupe
  • an 8 km/h parking bump leaves no mark; a 25 km/h wall hit bends the nose 3–30 cm with the doors still shut
  • a 50 km/h wall hit crumples the front 0.25–1 m, rebounds at most 10 km/h, knocks some panels loose, and the doors stay latched
  • the AI laps the loop staying within 2.6 m of its lane
make test                       # build and run every scenario in parallel (~35 s)
make test T=braking             # only scenarios whose name contains "braking"
./build/run_tests --list        # list them all
./build/run_tests -v ai/        # verbose: show every check and metric
./build/run_tests --update-baseline   # record current values as the new baseline

What every scenario checks

  • Its own checks: pass/fail assertions and measured metrics with expected ranges.
  • Global invariants, every frame: no NaNs, no node faster than 150 m/s, nothing tunnelling through the ground.
  • Drift: each metric is compared with tests/baseline.txt, and anything that moves more than 10% gets flagged, even if it's still inside its range. Behavior changes don't slip by unnoticed.

The report: each run writes build/test_report.html, with charts (speed, lateral g, body height, lane offset...) and range bars for every metric.

Watching a scenario in the game:

./crumplezone --scenario damage/head-on
./crumplezone --scenario ai/obstacle

Checks appear on screen as they're recorded. Slow motion and pause work. When the scenario finishes, you can drive around in the aftermath.

Scenario groups

Group Covers
dynamics/ Settling, 0–100, braking, skidpad grip, high-speed stability, lane change, slope holding, drops, washboard, reverse (each per vehicle)
structure/ Torsional and bending stiffness (test rigs in free fall), how much the body shakes, weight and balance, suspension travel, bump steer (each per vehicle)
damage/ Wall crashes, pole, tree, head-on, T-bone, rear-end, rollover (van with a roof load), jump, crash boxes
structure/rock-hits/ Trucks on the trail: belly on a boulder, sill onto a rock, nose off a 1.2 m ledge, tipped on its side and roof, a corner into a boulder
offroad/ Drive modes and locker rules, twister, ledges, slickrock, air-down, ramp travel index, shaft breakage, the Widowmaker Spur and Boulder Gully; the crawl specials against the Bronco (ledge heights, a 48 degree slab, the twister with open diffs, the crawl park's ledges and dome) and the side-by-side through the whoops lane
recovery/ Winching up the dome, winch stall and line snap, a strap tow to the shop, repairs, righting a wreck, rebuilding on a slope
autopilot/ To the shop, holding a set speed, the trailhead to the Halfway Hut on the trail, cross-country to the lake, through the boulder lane, following a truck; and what it sees: a boulder dropped on its route (around it), a knee-high rock in a walled lane (over it), a 0.38 m ledge (stops, 4L, locker, climbs), a wall with a gap, a parked truck, the Civic avoiding a rock a truck would straddle
surfaces/ The side-by-side flat out through mud and sand; stopping from 40 km/h on pavement, wet, gravel, sand, mud, snow and ice; locked wheels vs ABS on pavement and gravel; sand sinking, floating aired down and digging in; all-terrains vs semi-slicks in mud; ice; the autopilot on sand and ice
freeway/ Top speed per vehicle (flat out until it stops gaining; holds its lane, nothing scrapes), and seamless 400 m wraps at 200 km/h
handling/ Keyboard steering at 130 km/h: a tap is a nudge, a hold is a hard sweeper without a spin (each per vehicle)
controls/ Every action rebindable, keyboard and pad: defaults for every action, conflicts and swaps, the save round trip and old files, the menu keys and their fixed fallbacks, and the menus driven by pad input alone
gamepad/ The controller logic with synthetic pad input: deadzone and curves, the speed-sensitive steering ratio, trigger pedals and reverse, the button bindings, rumble, a Bronco's lane change at 80 km/h and a 4L crawl on the pad
net/ A host and a client over loopback: each sees the other's truck (node for node), a strap between them tows, leaving cleans up
ai/ Laps (all vehicles and both directions), following, oncoming traffic, passing an obstacle, getting back on the road, getting unstuck, 8-car traffic
engine/ Determinism, timestep convergence, sleeping, performance

Controls

Key Action
Esc Pause menu: resume, pick a car, garage, settings, controls, reset, quit. Every key can be remapped under Esc → Settings → Controls → Keyboard keybinds (Esc always opens the menu; the steering-assist toggle is F4)
W / S or ↑ / ↓ Throttle / brake (hold S when stopped to reverse)
A / D or ← / → Steer. Keys are all or nothing, so full steer is as much as the tires can hold at your speed, on that surface (full lock when parking, a few degrees at 130 km/h), plus room to catch a slide
Space Handbrake
7 Horn (hold; pitched by vehicle, small cars higher; other players hear it from your car). On a pad: LB + R3
G Garage (docs/plans/garage-shop.md): the truck where it stands and the parts by category, each on a turntable with its numbers against what's fitted. W/S move, Enter opens a category / buys and fits a part, T tries it on the truck, R puts the factory part back, Q/E change category, drag and wheel turn and zoom the model, Esc backs out (career: only at a repair station)
Q / E Shift down / up (R, N, 1…; switches to manual). In manual W is gas, S is brake
Shift+M Manual / automatic gearbox
Shift+L Headlights: AUTO (on at dusk) / LOW BEAM / HIGH BEAM / OFF
L Transfer case (4x4s): Bronco 2H / 4A / 4H / 4L; 4Runner 2H / 4H / 4H LOCK / 4L LOCK; rock buggy 2H / 4H / 4L; side-by-side 2WD / 4WD. Into or out of low range under 8 km/h
F / B Front / rear locker (4x4s; the front one needs 4WD engaged; the Bronco's front and the 4Runner's factory rear only work in low range; the rock buggy has both, the side-by-side only the front)
Y Front sway bar disconnect (Bronco: a dash button under 30 km/h, reconnects itself above; 4Runner: quick-disconnect pins, stopped)
9 / 0 Hold to let air out of / pump up the tires (stopped). 35 psi street, 15–18 for rock
V Winch: point and click an anchor; right stick + A on a controller. V with a line attached unhooks it
Z / Shift+Z Winch in / pay out (- and = change the saved speed, 0.1–20x; default 4x)
O Tow strap: hooked on foot (get out, hold E at a recovery point, walk the end to the other vehicle's point, hold E); O in the seat just says so
U Autopilot on/off: drives to the place last picked
Shift+U Opens the autopilot page: where to, speed, roads (rebindable)
Shift+J Opens the jobs on offer here (rebindable)
Tab Switch to another vehicle
R Repair in place. R twice quickly: respawn at the start (in a level: restart the attempt)
T Real recovery: back on your wheels where you are, damage stays. Arcade: repaired, upright
C Camera: chase / orbit / cockpit / drone (WASD fly, Q/E down/up, drag look; the truck stays put)
F10 Photo mode: hide the HUD
Mouse drag, wheel Look around (drag up past level to look up at the sky), zoom
P Parking brake on/off (stays set until released; getting out sets it; the P light on the HUD)
F6 Pause (single player; Esc always opens the menu)
X Traction control on/off
F11 Fullscreen
H Controls overlay
F3 Debug screen (FPS, timings, position, vehicle, wheels, network); Shift+F3 adds a frame-time graph (rebindable)
J Get out of / into the vehicle
I On foot: the truck's inventory
Left Ctrl (hold) On foot: crouch. Your eyes ease down to 60% over about a third of a second, you walk at 45% speed (no running or jumping), and your body kneels in third person and for other players (the walk network message carries a sixth field, crouch 0..1; older builds ignore it, net::kVersion is unchanged). Good for looking under a truck; repair prompts work as usual. A low overhead keeps you down. Esc → Settings → Controls → CROUCH ON FOOT makes it a toggle. Rebindable. Pad: L3 on foot
F12 Dev menu (below)
Grave (the key under Esc) Flip the keyboard between GAMEPLAY KEYS and DEV KEYS (below)

Keybinds

Esc → Settings → Controls lists every action in groups (DRIVING, RECOVERY, ON FOOT, CAMERA AND VIEW, GAME, MENUS, FREE CAM, DEV), each with its key and its pad binding (W / RT). OK (Enter, or A on the pad) on a row, then press a key or a pad button: a key becomes the key binding (Shift+key makes a combo like the lights' Shift+L), a pad button the pad binding (hold LB and / or VIEW with it for a chord like LB + A; VIEW tapped alone is a binding of its own). Esc or Start cancels; Backspace clears the key. On a row, R (Y on the pad) puts that action's defaults back and T (X on the pad) clears the key (the pad button, from the pad). A key or button another action has in the same place (the truck, on foot, a menu, the free cam) is swapped over to the old one, or left without one if that would clash elsewhere; the page says which. The same key may do different jobs in the truck and on foot (E, G, F) and a dev tool may share a key with a gameplay action (the key mode decides). RESET ALL TO DEFAULTS puts every key and button back. Layouts are the key_* and pad_* lines of settings.txt (Shift combos add 4096 to the key code; a file from before the pad bindings gets the default pad map). The MENUS group is the menus' own keys (up, down, left, right, OK, back, the tabs, the garage's extras, the repair dialog's two choices); Esc, Enter and the arrows, and the pad's A, B and Start, always work in the menus whatever is bound, so the menus can't be lost. Every hint and the controls overlay (H) show the keys as you set them, or the pad's buttons when the pad was the last thing used. The table with each action's default is kInfo in src/keybinds.cpp; to make a saved layout the new defaults, run F12 → TOOLS → EXPORT KEYBINDS AS DEFAULTS (it writes build/keybinds-defaults.txt, the first two fields of every row) and paste it over the table's.

Dev menu and dev keys

The test and debug tools are not loose keys any more. F12 (or Esc → SETTINGS → DEV tab) opens the dev menu, which works with the mouse, keyboard and controller: SPAWN VEHICLE (swap the one you drive for the Blazer, Bronco, 4Runner, Tacoma, Jesko or Baja Bug), SPAWN AHEAD (parked or AI vehicles, remove this one), TELEPORT (map spawn, each obstacle section, any place), WORLD (time of day, slow motion, reload the map), VEHICLE (repair, respawn, flip upright, refuel), VIEW (free cam, beam views, FPS counter) and TOOLS (level editor, new section, model lab, reload the new build, a scenario's checks list). Teleport, reload the map and refuel are refused in a multiplayer session; the rest does for guests what the old keys did.

FREE CAM (F8 in DEV KEYS mode, or F12 → VIEW → FREE CAM; src/freecam.*) is the drone camera as a dev tool. WASD fly, Q/E down/up, drag looks, Shift goes three times as fast, and the mouse wheel (or - and =) steps the speed from 3 m/s to 800 m/s for crossing kilometres; the procedural world's window and the Backcountry's terrain stream in round the camera. X flies through the ground. The vehicle under the crosshair is outlined and named. Click (or G) picks it up: it hangs in front of the camera, held rigid and at rest, and follows as you fly; R (Shift+R the other way) or Ctrl+wheel turns it 15 degrees; click or G again sets it down upright on its wheels at the crosshair, and a right click (or F) lets go of it where it hangs. B opens a spawn picker (Enter or click: at the crosshair; Shift: already carried). V drives the carried or targeted vehicle. F8 or Esc goes back to your vehicle's camera. Any car can be carried (yours, parked, AI); in multiplayer only the host carries, spawns and switches (the moves reach the others in its states), and a career world needs DEV KEYS on.

For quick testing the old keys come back in DEV KEYS mode: press the grave key (under Esc) to flip between DEV KEYS and GAMEPLAY KEYS (a DEV KEYS tag shows top left; the mode is saved, GAMEPLAY by default; also Esc → Settings → DEV HOTKEYS, or the dev menu). In DEV KEYS mode: 1-6 swap vehicle (Blazer, Bronco, 4Runner, Tacoma, Jesko, Baja Bug), I parked vehicle ahead, K AI traffic, Delete remove vehicle, N beam view, [ ] slow motion, F2 editor here, F8 free cam, J a scenario's checks list. F3 (debug info), F5 (load the new build), F1 (back from a playtest), F12 and the grave key work in both modes. In GAMEPLAY KEYS mode they do nothing (I is the truck inventory on foot, J gets out/in).

Controller

Xbox, PlayStation and generic pads work through SDL2's game controller API: plug one in (or unplug it) at any time and the game says CONTROLLER CONNECTED: <name>. The HUD hints show the pad's button names (A / CROSS and so on) while it was the last thing you used; touch the keyboard or mouse and they go back. --no-pad (or CZ_NO_PAD=1) leaves controllers alone. The pad does nothing while the game window doesn't have the focus.

Driving is analog. The left stick is a real analog steering input: a radial deadzone (0.12 by default), a response curve, and a speed-sensitive ratio. Full stick is what the tires can hold at that speed (the same limit the keys use, a little more room), so it is full lock when parking or crawling and a few degrees at 130 km/h; half a stick is half of that. RT is the throttle and LT the brake, both analog; LT at a standstill puts the car in reverse (RT while rolling backwards brakes, then drives forward), exactly as holding S does.

Every action has a pad binding (the defaults below), and every one can be rebound under Settings → Controls. The pad has three layers: buttons alone, LB + a button, and VIEW (Back / Select / Touchpad) + a button; LB + VIEW + a button are the dev tools (DEV KEYS mode). VIEW tapped on its own is the map.

Button Action
Left stick Steer (on foot: walk; the drone and free cam: fly)
RT / LT Throttle / brake (LT at a stop: reverse; the drone: up / down)
A Handbrake (hold; on foot: jump)
X / Y Shift down / up (switches to manual); on foot: hold X to work, Y the truck inventory
B On foot: put down what you carry
Right stick Look around (the chase camera recentres on its own)
R3 (hold) Look back; let go to reset the view
RB Camera: chase / orbit / cockpit / drone
D-pad up 4x4 mode (L)
D-pad left / right Front / rear locker (on foot, left: pour the fuel can)
D-pad down Front sway bar disconnect (on foot: crouch)
L3 Headlights
VIEW (tap) The map: sticks or D-pad pan, RT / LT zoom, A sets the waypoint, X pings GO HERE at the centre, Y pings HELP at your truck, VIEW or B closes (keys: the menu keys, WASD, Z / X, Enter, T / R)
Start (Menu) Pause menu (always)
LB + D-pad up / down Winch / tow strap hints (the hook-up itself is on foot: hold X at the bumper)
LB + RT / LT Winch in / out
LB + right stick up / down Winch speed up / down
LB + D-pad left / right Air down / pump up the tires (hold, stopped)
LB + A Repair (twice quickly: back to the start; a career asks first)
LB + B Back on its wheels
LB + X Traction control on/off
LB + Y Get out / get in
LB + RB Manual / automatic gearbox
LB + L3 Autopilot on/off
LB + R3 (hold) Horn
LB + Start The controls list (shows the pad's map as bound)
VIEW + A Parking brake
VIEW + B Garage
VIEW + X Steering assist
VIEW + Y Jobs on offer here
VIEW + RB Next vehicle
VIEW + D-pad up / down Throttle limit / autopilot: where to
VIEW + D-pad left / right Chat / hide the HUD
VIEW + L3 (hold) / R3 The full HUD / debug info
VIEW + Start Fullscreen
VIEW + right stick The dev menu (down), DEV KEYS / GAMEPLAY KEYS (left), back to the editor (right), load the new build (up)

Menus, the title screen, the level list, the garage, the inventory, the update card and the free cam's spawn picker: D-pad or left stick move (hold to repeat), A selects, B or Start goes back, LB / RB switch the settings tabs and the garage's categories (the garage: X tries a part on the truck, Y puts the factory part back, VIEW the speedo recalibration, RT / LT zoom, the right stick turns the model; the career worlds: X deletes one; the CONTROLS tab: Y defaults, X clears). The career repair dialog (R / LB + A): X repairs on the spot, Y respawns repaired at the nearest station, or the D-pad and A; B (or LB + A again) cancels (keys: 1, 2, the arrows and Enter, Esc or R again). The free cam (DEV KEYS: LB + VIEW + L3): A picks up / sets down, B lets go, X turns it (LB + X back), Y spawns, RB drives it, L3 through the ground, D-pad up / down the speed, Start leaves. Hot-plugging is live, and with several pads connected the one last used is the one that plays. With a mouse, point and click; middle-drag looks and the wheel zooms.

Rumble (settings, CONTROLLER page: OFF / LOW / HIGH): a thump on impacts, a rumble over rough ground, a buzz from tires sliding and from the engine on its limiter. It only runs while the pad is the last thing you used and the window has the focus. The same page sets STEERING (SOFT / NORMAL / SHARP: how the stick maps to the wheels) and STICK DEADZONE (SMALL / MEDIUM / LARGE). Multiplayer needs nothing: each machine reads its own pad.

Main menu and levels

Launched plainly, the game opens on the main menu, a screen of its own (no world behind it): free drive (pick map and vehicle), mode (sandbox or career), levels, multiplayer, world editor, garage, settings. Levels are races (laps through gates) and sprints (start to finish through gates) with medal times, damage/time limits and a no-repairs rule. Seven come with the game (Frontier GP, The Wall, Mesa Climb, Snake River Ford, Summit Run, Widowmaker, Boulder Gully); your own are .czl files in ~/.config/crumplezone/levels or ./levels. --level NAME starts one. In multiplayer the host picks the level and everyone gets it (edits and all), starts together, and sees a live leaderboard.

Playing together

  • Remote cars: buffered motion uses a steady clock so varying packet latency does not make cars jump backwards. Steering, wheels and engine RPM interpolate between states; repairs/recovery jump directly to the new position. Nearby engines use the same car-specific synthesizer as your own, with distance volume and stereo positioning.

  • Lights: Shift+L (pad L3) shares AUTO / LOW / HIGH / OFF with everyone, including while parked. Brake and reverse lights follow the owner's controls.

  • Compatibility: this build uses network protocol 3. All players need this updated build; older releases cannot join it.

  • Map (M): the whole map, north up: trails, water, repair shops, places, everyone's trucks. Wheel zooms, drag pans, left click sets your waypoint, right click pings GO HERE for everyone (Shift: HELP). Shift+M is now manual/automatic.

  • Pings: middle click pings GO HERE where you point; Shift+middle click pings HELP at your truck. Everyone sees them in the world and on the map.

  • Chat: Enter, type, Enter. Meet up (Esc → Multiplayer) parks your truck behind a buddy's (again for the next one). Name tags float over your buddies' trucks (and over them on foot).

  • On foot (J): get out (stopped) to spot a line or walk the trail. You see through your own eyes: the mouse looks around, WASD walk where you look, Shift run, Space jump, Left Ctrl crouch; you wade, swim, and climb over rocks. Hooking a winch line or tow strap is done by hand: hold E at the fairlead (or a recovery point) to grab the line, walk it out (it pays out of the drum, as far as there is line), and hold E at a tree, boulder, ground spot or another vehicle's recovery point to hook it; hold E at either end to unhook. G lets go. Reeling in and paying out (Z, Shift+Z) work from the seat or on foot once it's hooked; F pours your truck's spare can into the nearest truck (a buddy's too). To get back in, aim at the door handle (a small blue circle on the handle itself; on a buggy or side-by-side, the cage's side by the seat) and press E: J only gets you out. Any vehicle with nobody in it can be got into that way: a parked one, one you spawned, a wreck, AI traffic once it's stopped (it's yours then, no AI); the one you left stays parked on its handbrake. In multiplayer a buddy's truck while they're on foot (or the host's parked ones) is handed over to you: you drive it and the others see you in it, and they can take it back the same way once you're out; if they're driving, you ride along (E at their passenger door's handle; their truck on your screen, C for the passenger's seat) and J gets you out beside it. If two go for the same one the host settles who was first; someone who leaves with another's truck leaves it behind, parked, the host's.

  • Exploring: every named place on a map starts undiscovered ("?" on the map); get within 30 m to find it. Your discoveries are kept between sessions.

  • Fuel: engines burn fuel for the power they make (setting FUEL: OFF / REAL / FAST, default FAST: 4x). Run dry and the engine dies. Shops fill the tank and the spare can; the Bronco and 4Runner carry a 20 L can.

  • Pumps and fuel cans: every fuel pump works. On foot, aim at it and press E to take the hose, walk it to the filler (a marker on the body, where each vehicle has it) and press E: fuel flows until the tank is full or you press E there again, with the litres and the cost on the HUD. Hang it back on the pump, or walk too far and it springs back; drive off with it in and it pops out. A career pays $2 a litre at the pump, and every station has one; sandbox is free, and a station's pad still fills you there. A FUEL CAN (a station's rack, caches, wrecks; always in sandbox's back) is taken from the back of the truck and poured at the filler with a hold of E: 20 L, whatever fits. The empty can stays yours: hold E at a pump with it in hand to fill it ($40).

  • Wrecks: rusting cars, vans and trucks lie out in the country with no sign or marker, in the scrub, in gullies, among trees, at the foot of cliffs, some rolled or half buried. Hold E at one to search it: about half hold something (fuel, parts, tools, recovery gear, cash). In a career it's yours; in sandbox it only says what you found. A search counts for everyone in the session.

  • Finding games: Menu > Multiplayer > JOIN lists games hosted on your local network. It asks every network adapter's subnet (UDP 27016) and also listens for hosts announcing themselves (UDP 27017), so either direction getting through a firewall is enough. Pick one to join, or type an address. On Windows, allow the game through the firewall on Private networks the first time you host or search (your game port, 27015 by default, and UDP 27016 and 27017 for finding games).

World editor

Build your own worlds and levels: title screen → WORLD EDITOR (a new level on the map picked), Levels → OPEN IN THE EDITOR (the game's levels open as your copy), or F2 while driving in DEV KEYS mode (F12 → TOOLS → LEVEL EDITOR otherwise) (F1 leaves a playtest and returns to the editor). --editor opens it on launch.

  • Fly: WASD, Space up, Shift+wheel up/down, right-drag to look, Shift fast, wheel to fly forward.
  • 1 Sculpt: raise, lower, smooth, flatten (to the height you click) with a round brush; Q/E, [ ] or Ctrl+wheel sizes it (every brush tool), - and = set the strength, Shift is fine.
  • 2 Paint: grass, dirt, mud, sand, desert sand, gravel, rock, red rock, scree, snow, ice, concrete, tarmac, wet tarmac. It drives like it looks.
  • 3 Water: click in a hollow to fill it (dig a basin first); Shift+click dries.
  • 4 Objects: rocks, ramps/blocks (tilt them; rock slabs grip like rock), logs, trees, plants (the PLANTS tab: leafy, flowering and juniper shrubs, sagebrush, ferns, reeds, cacti, yucca, heather, tumbleweed, mushrooms, mossy rocks, wildflowers; scenery only, nothing to hit), repair shops. Click to place, click one to select and drag it, Q/E size, Shift+Q/E turn, Delete removes (the map's own objects too). Drag an object to move it: the point you grabbed stays under the mouse while it rides the ground (and climbs onto rocks and blocks). Hold Shift to keep it on the X axis, Ctrl on Z, Space (or Alt) on Y to raise or sink it (it stays at that height); a coloured line shows the axis and the grabbed point follows the mouse along it. Right-drag an object to turn it any way, like a trackball: sideways turns it about the vertical, up and down tips it away from or towards you; with Shift, Ctrl or Space it turns about X, Z or Y only. The selection also shows a gizmo: drag its arrows to move along an axis, its rings to turn about one. Rocks, blocks, logs and structures turn freely; repair shops and fences only about the vertical; trees and bushes stay upright. A group moves and turns about its middle. GRID SNAP snaps moves to the grid and turns to 15 degrees. Esc, or clicking the other button, cancels a drag and puts everything back. Ctrl+drag from empty ground or an unselected object box-selects, Shift+click adds or removes, Shift is fast fly for WASD. Each drag is one undo step.
  • 5 Course: the first click sets the start (facing the way you look), then each click adds a gate; drag to move, Shift+Q/E turn, [ ] width; the last gate is the finish.
  • 6 Settings: name, mode (free drive / race / sprint), laps, vehicle, time of day, repairs, damage and time limits, medal times.
  • Ctrl+Z / Ctrl+Y undo and redo, Ctrl+S saves to ~/.config/crumplezone/levels, F5 plays it (F1 brings you back), Esc leaves. Offline only.

Pause menu and settings

Press Esc to pause and open the menu. Use the mouse, or W/S to select, A/D to change and Enter to confirm. Esc goes back.

  • Vehicle: pick any of the seven vehicles, then press Enter (or click) to drive it.
  • Settings:
    • Game: speed in km/h or mph, time of day (CYCLE: dawn, day, dusk and night go round, a whole day in 6 to 96 real minutes, 24 by default; or held at MORNING, NOON, EVENING or NIGHT; the clock carries on from where you left it), volume, music volume (default 40%, 0 turns it off; it sits under the master volume), field of view.
    • Graphics: adaptive quality (on/off), a quality preset (low / medium / high / ultra), shadows, anti-aliasing (MSAA), ambient occlusion, bloom, clouds, grass, scanned scenery (photo-scanned ground and props: off / low / high / ultra), render scale (50–200%).
    • Display: fullscreen, vsync, FPS counter.

Settings are saved to ~/.config/crumplezone/settings.txt.

Vehicles

All seven are built from short side-profile maps plus a parts list in src/vehicles.cpp (where every heavy item sits, the engine's size and position, the suspension type and its ride frequency), so adding a new one is mostly a matter of drawing it in text.

Vehicle Drive Weight (front/rear) Engine Suspension front / rear
Honda Civic Si (2022) Front-wheel, helical LSD 1,318 kg (60/40) 1.5 L turbo four, 6-speed manual MacPherson strut / multi-link
Koenigsegg Jesko Attack Rear-wheel, mid-engine 1,420 kg (42/58) 5.0 L twin-turbo V8, 9-speed Double wishbone / double wishbone
Ford Bronco 4-door 4x4 with low range 2,214 kg (56/44) 2.7 L twin-turbo V6, 10-speed auto Double wishbone / solid axle
Toyota 4Runner (2002 Limited, built) 4x4 with low range 2,100 kg (54/46) Supercharged 3.4 L V6, 4-speed auto Double wishbone / solid axle
Rock buggy (Ultra4 class) 4x4, 4.3:1 low range, both lockers ~1,820 kg (55/45), estimate 6.2 L V8 (450 hp), 4-speed auto Solid axle, 4-link / solid axle, 4-link; 16-17 in of travel
Turbo side-by-side (RZR / Maverick class) 4WD, front diff lock ~800 kg (44/56), estimate 900 cc turbo triple (195 hp), CVT (5 steps) Double wishbone / double wishbone; 16-18 in of travel

The rock buggy and the side-by-side are the two crawl and rough-ground specials (keys 5 and 6). Both are tube-frame vehicles: the lattice is the chassis and cage and isn't drawn; the roll cage, frame, bumpers, seats and exhaust are tubes and parts bound to it, and only a nose cone and tail (buggy) or hood, fenders and tail (side-by-side) carry skin. They have no doors, glass or covers.

Rock buggy Turbo side-by-side
Class figures An Ultra4 / King of the Hammers car: LS3-class V8 (crate rating 430 hp at 5,900 rpm, 424 lb-ft; these run ~450 hp), 4L80E 4-speed auto behind an Atlas-style two-speed case (low 4.3:1), 5.38 axles A Can-Am Maverick X3 Turbo RR / Polaris RZR Turbo S: a 900 cc Rotax-class turbo three (195 hp, ~85 mph limiter), CVT
Size 4.70 x 2.22 m over the tires (1.88 m track), 2.90 m wheelbase, 0.62 m under the frame, 1.70 m to the cage top 3.35 x 1.70 m (1.46 m track), 2.60 m wheelbase, 0.40 m under the skid plate
Tires 40x13.5-17 mud-terrain on beadlocks, 30 psi (the game airs down to 12; a soft, sticky compound on rock) 32x10R15 all-terrain, 14 psi
Suspension Solid axles on long four-links, 0.41 m front and 0.44 m rear wheel travel, no sway bars; the front axle steers on kingpins Double wishbones all round, 0.41 m front and 0.46 m rear travel, light bars
Drive 2H / 4H / 4L; selectable front and rear lockers 2WD / 4WD (center locked); front diff lock
Numbers 0-100 km/h ~5.2 s (4H), limited to 150 km/h 0-100 km/h ~4.0 s, limited to 130 km/h

Weights, travel, and the Atlas ratio are class estimates, not one builder's car (marked in src/vehicles.cpp). Measured against the Bronco in the tests: the buggy climbs a 0.65 m square ledge with room to spare (about 0.7 is its limit; the Bronco 0.45 m, the side-by-side 0.3 m), a 48 degree slickrock slab (the Bronco slides back), and walks through the twister with open diffs where the Bronco bogs down; ramp travel index ~960 against the Bronco's 580. The side-by-side is quickest through the whoops lane (53 km/h average at a 55 km/h cruise, level, undamaged) and 20% faster than the Bronco across 50 m of mud or sand. At that pace the Bronco, 4Runner and buggy slow, stall or roll. | Toyota Tacoma TRD Off-Road (2019 Double Cab) | 4x4 with low range | 2,040 kg (55/45) | 3.5 L V6, 6-speed auto | Double wishbone / solid axle on leaf springs |

The 4Runner is one particular truck, the Bring a Trailer car from December 2021: black over silver, 2 in body lift and Old Man Emu coils on 35x12.50R17 KO2s and bronze wheels, steel bumpers with a winch and swing-out spare, rock sliders, snorkel, roof basket and a Magnuson supercharger. Its garage "AS BUILT" options are that truck; the others take it further (BIG V6, BIG LIFT, LOCKERS, CRAWL GEARS...).

The Tacoma is a stock 3rd-gen TRD Off-Road: cab and open bed as separate boxes on one long frame, Bilstein shocks, a rear e-locker that only works in 4L, a skid plate and all-terrains. Its garage: TUNED V6, SUPERCHARGED V6; LIFT KIT, BIG LIFT, LOWERED; LOCKERS, CRAWL GEARS.

1972 Chevy Blazer (K5)

Key 8. The first-generation K5: a 104 in wheelbase box with a white removable hardtop, a 350 small block (165 hp / 280 lb-ft net, carbureted), the SM465 four-speed with its 6.55:1 "granny" first, an NP205 transfer case (2H, 4H, 4L), and leaf springs at both ends with the front axle steering on kingpins. Front discs, rear drums, no ABS, open diffs. About 1,850 kg. Garage: BIG V8 (the 454), HOT ROD V8; LIFT KIT (4 in and 35s), SOFT SPRINGS; AUTOMATIC, LOCKERS.

VW Baja Bug (1969 Beetle)

A 1969 Type 1 Beetle built for the desert: fenders bobbed front and rear, a short fiberglass nose with two round lamps and a tube push bar, the rear apron and engine lid cut away so the air-cooled flat four stands bare under a tube exo-cage, a stinger exhaust, a light bar over the windshield, the spare strapped in where the back seat was. Lifted torsion-beam front and IRS trailing arms on long-travel shocks (~21 cm front, ~28 cm rear), 30x9.50R15 all-terrains at 22 psi. A built 2.0 L dual-carb Type 1 (~115 hp, ~160 N*m, estimate) in the back driving the rear wheels through the Type 1 four-speed transaxle (3.80 / 2.06 / 1.26 / 0.93, 4.375 final), open diff, drums all round, no ABS. About 900 kg, ~43/57. In the tests: 0-100 km/h ~8.6 s, ~176 km/h flat out, 0.36 m under it, approach / departure / breakover ~46 / 37 / 37 degrees, ~0.7 g on the skidpad; it takes the proving ground's kicker at 70-76 km/h, swings back level in the air on its tail-heavy weight and lands on its long travel with nothing broken (baja/kicker-jump), and shrugs off a 2.5 m flat drop (baja/flat-drop). The engine is hung out behind the rear axle (rearEngine: its transaxle ahead of it) and drawn as an air-cooled flat four (crate_engine_flat4, also in the model yard). Garage: QUIET ENGINE, BIG ENGINE; LIFT KIT (33s), LOWERED; LIMITED SLIP, SAND GEARS. Dimensions from the stock 1969 Beetle (2,400 mm wheelbase, 4,031 x 1,549 mm); the cut nose and tail, the build and the weights are estimates.

How a vehicle is built

  • Body structure. A lattice of nodes and beams that is held in shape by a stiff chassis frame. It doesn't flex or shake when you drive, but it crumples in a crash: where the metal bends for good, the frame lets go and takes on the new shape. The floor rails, sills and crossmembers are stronger members, and every point something bolts to (spring towers, arm and engine mounts) is reinforced.

  • Ladder frames (Bronco, 4Runner, Tacoma). Two boxed steel rails with crossmembers carry everything: the suspension brackets, the engine mounts and the body, which sits on rubber body mounts and is only a skin by comparison. Each rail holds its shape like real steel: springy up to its yield point, then it kinks and keeps the kink (a whole rail section bends together, it doesn't fold at one node). A press midway between the axles sets the Bronco's boxed frame at ~88 kN, the 4Runner's at ~53 and the Tacoma's (longer, open C-channel under the bed) at ~39. Bare, the frames twist 11, 3.6 and 2.9 kNm per degree; bolted to their bodies, 25, 15 and 23. A suspension bracket breaks loose at ~70 kN, so a hard hit tears a bracket before it folds the rail.

  • Parts that touch. The tires collide with their own body and the frame rails: a wheel pushed up past its travel dents the fender liner and the panels above it, a bent arm can drive the tire into the door, and a wheel knocked inboard meets the rail. Each wheel well knows what tire it was built for (and what size fits before it rubs, ~35s on the Bronco, ~32s on the Tacoma), so only tires bigger than that or wheels knocked out of place scrape. A loose panel can swing out but not in: an unlatched door opens to ~70° on its check strap and stops there, a hood to ~80°, and none of them pass into the cabin or the engine bay (flung open hard, the strap tears). Anti-roll bars, arms and links bend and keep the bend; engine and body mounts squash onto rubber snubbers and tear or take a set beyond them.

  • Weight. Every heavy item is placed where it really sits: engine, gearbox, seats, dashboard, fuel tank, battery, radiator, exhaust, spare wheel. That sets the front/rear balance, the center of gravity height and how the car pitches and rolls.

  • Engine and gearbox. One heavy block on rubber mounts. It rocks under throttle, pushes back on the body and the differential (squat under power, axle wind-up on the live axles), and in a big crash it's shoved back and can tear off its mounts.

  • Suspension. Real linkages:

    • Double wishbones with ball joints, a coil-over and a tie rod (or toe link).
    • A twist beam on the hatchback.
      • On the rock buggy, live axles front and rear on long four-links: the front one steers, with knuckles turning on kingpins at the tube ends and tie rods from the axle.
    • On the Bronco and 4Runner, a live axle on trailing links with a panhard rod.
    • On the Tacoma, a live axle on leaf springs: a fixed front hanger, a swinging shackle behind, inter-leaf friction that firms the ride over small bumps, and axle wrap (the housing twists the springs under torque until they hold it).
    • Anti-roll bars.

    Spring and damper rates come from each vehicle's ride frequency and the actual motion ratio of its linkage. Dampers are firmer in rebound and give way on sharp hits. Bump stops are progressive rubber. The geometry has anti-dive and almost no bump steer.

  • Steering. A rack moves the tie rods and the knuckles turn on their kingpins, with Ackermann geometry. A hard knock can bend a tie rod, and the car then pulls.

  • Driveline. Prop shafts and half shafts. If one is torn off, the wheels it drives lose power.

  • Underbody. A solid axle's diff and tubes hit the ground and the rocks (the diff is the lowest thing on the truck: hang it on a rock and the axle's held up), and on a 4x4 the transfer case's skid plate hangs under the frame between the axles, where a ridge high-centres it. Clearance and angles come out at the real trucks' (the Tacoma's 9.4 in, 32° approach, 23.5° departure, 21° breakover: structure/clearance).

  • Panels. The hood, doors, bumpers and trunk lid (rear doors on the van) are separate sheets pinned on with hinges, latches and clips. In a crash, clips and latches break: doors swing open on their hinges, hoods pop up, and bumpers fall off.

  • Brakes and tires. Per-wheel ABS, brake pressure that takes a moment to build, brake torque that reacts through the knuckles (nose dive), rolling resistance, and tire forces that act at the contact patch (which is what rolls the body).

  • Stability control. Above ~10 km/h, if the truck yaws faster than the steering asks (or its rear slides), it brakes the outside front wheel and trims the throttle, as real ESC does. It's off in low range and with traction control off.

The garage: a few clear choices

G opens the garage. Five sections: ENGINE, SUSPENSION, TRANSMISSION, WHEELS, TIRES. Each has the factory part and two or three more, with plain names: a better and a best engine ("TUNED V6", "BIG V8"), a lift and a lowered setup ("LIFT KIT", "BIG LIFT", "LOWERED"), gears and lockers ("LOCKERS", "CRAWL GEARS"). WHEELS has three sizes, the same on every vehicle: STREET WHEELS (low tires on 20 in rims), BIG WHEELS (35 in tires) and HUGE WHEELS (40 in); wheels too big for the wells come with the lift to clear them. The full list, and what the longer list before it (every vehicle's parts on every other) became: docs/parts-simplified.md.

Tires: STREET, ALL-TERRAIN, MUD and RACE, each with its own grip on every surface and its own look. Race tires (slicks) have the most grip on dry pavement and almost none in mud, snow or wet; mud tires clear mud; all-terrains are the all-rounder, snow included.

Snow chains aren't a tire: the off-roaders carry four in the back. On foot (J), press E at the back of the truck for its inventory and choose the chains to take one, hold E at a tire (stopped) to wrap it on, and hold E again to take it off. Chained tires grip ice, packed snow and mud far better and skate on pavement; keep under ~50 km/h on them: past 60 for a couple of seconds they snap.

Career: start stock, earn the rest

Main menu → MODE switches between SANDBOX (every part, any time: the garage above) and CAREER. A career starts every vehicle on its factory parts with $1,000; the rest you find, win or buy:

  • Supply caches: three by the proving ground's model yard (and ten each on the Frontier and in the Backcountry, off the map list for now), out where it takes some getting to (the top of THE WALL, the summit, the wallow, the old mine, the cliff overlook...). A green marker shows the ones within ~250 m. On foot (J), hold E at the crate: its part or its cash is yours. The best finds are at the hardest places (the Blazer's BIG V8 at the top of THE WALL, race tires at the summit, the buggy's BIG V8 at the cliff overlook).
  • Rewards: a job done pays $1,200 (everyone on it is paid); a level's medals pay $400 / $800 / $1,500 the first time, and a level's first gold brings one of the best parts.
  • The shop: at a repair station, the garage sells everyday parts and serious ones (dearer); the very best (race slicks, the big-power engines) aren't sold. B (pad: Y) buys the part shown.
  • Fitting: the garage fits only parts you own, and only at a repair station. A part, once owned, fits every vehicle that offers it.
  • Anchor gear: you start with 2 tree straps, 1 chain sling and 2 ground stakes; stakes, rock bolts and ice anchors are used up (see Winch and Anchor gear below). The rack sells all five kinds.
  • Tools and repair parts: you start with a lug wrench and a jack. Caches hold more tools and spare parts, and each station has a rack beside the shed: walk up and hold E to buy a socket set, a hammer, a CV axle... (see Trail repairs below).

Each player's career is their own (~/.config/crumplezone/career.txt, and a garage of its own, garage-career.txt) and comes with them into anyone's game; a cache opened in a session counts for everyone there.

Damage

  • Bodywork dents permanently and tears apart. Bent metal gets stiffer as it crumples, and crushed metal barely springs back, so a 50 km/h wall hit gives about 0.3–0.5 m of crush and a small rebound, like a real crash test.
  • Panels come loose: bumpers drop off, hoods pop open, doors swing open to their check straps or come off.
  • Windows shatter once their frame bends: the bonded windshield at about 5%, side and back glass (loose in rubber channels) at about 7.5%.
  • Tires blow out on hard rim strikes, such as big landings or kerbs taken at speed. You then run on the rim with much less grip, and the next big hit lands on steel.
  • Engine: a crushed engine bay loses power, smokes, and eventually dies. Torn engine mounts hurt it too.
  • Suspension and steering bend: a bent tie rod or control arm knocks the wheel out of line, and the car pulls.
  • Drive shafts snap, and the wheels they drive lose power.
  • Wheels come off when their suspension mounts break.

4x4

The Bronco, the 4Runner, the Tacoma, the rock buggy and the side-by-side have real transfer cases and selectable lockers (the side-by-side has a front diff lock). The HUD shows a small driveline next to the gauges: wheels light up when they're driven, the prop shaft is solid when front and rear are tied together, and a red block marks a locked axle.

Truck Modes (L) Lockers
Bronco (part-time, advanced 4x4) 2H; 4A (all four driven, center free, fine on pavement); 4H and 4L (front and rear shafts locked together) rear e-locker; front too with the garage's 4.70 AND LOCKERS (Sasquatch)
4Runner (full-time multi-mode) 2H; 4H (center diff open); 4H LOCK; 4L LOCK rear e-locker; ARB front and rear with the garage's locker options
Rock buggy (Atlas-style two-speed case) 2H; 4H and 4L (shafts locked together; it leaves in 4H) air lockers front and rear, in any range
Side-by-side (on-demand 4WD) 2WD; 4WD (the clutch ties the shafts; no low range) front diff lock (F); the rear is a limited-slip
Tacoma (part-time) 2H; 4H and 4L (front and rear shafts locked together) rear e-locker (4L only)
  • Open diffs: each axle splits torque equally, so a lifted wheel spins and the other gets almost nothing.
  • Lockers: both wheels on the axle turn together.
  • 4H and 4L: front and rear turn together. On dry pavement this binds the driveline in tight turns, just like the real thing, so use 4A or 2H there.
  • Low range: multiplies every gear (2.72:1 Bronco, 2.57:1 4Runner and Tacoma, 4.3:1 rock buggy: about a 57:1 crawl ratio in first).
  • Locker rules, as on the real trucks: the Bronco's front locker only engages in 4L; the 4Runner's factory rear e-locker only in 4L LOCK, the Tacoma's rear e-locker only in 4L (the ARB lockers from the garage work in any mode). Leaving low range drops them.
  • Axle shafts break: the shaft carries the engine's torque plus whatever a locker forces through it. Full throttle in low range with a locked axle and a wheel in the air, or a front locker at full lock, can snap a CV joint (IFS CVs take 65% of a solid-axle shaft, less at steep angles). That wheel freewheels until a repair station fixes it.
  • Sway bar disconnect (Y): more articulation for crawling, more body roll on the road. Ramp travel index on a 20° ramp: Bronco ~550, ~610 disconnected; 4Runner ~520, ~570; Tacoma (no disconnect) ~470.
  • Tire pressure (9 / 0): airing down softens the tire into a longer patch, about +1.2% grip per psi off pavement (15 psi climbs a 41° granite slab that 35 psi spins out on). The price: the sidewall rolls over in fast corners and the rim is closer to the rocks, so a fast hit pinches a tire. Hold 9 to deflate at 5 psi/s; hold 0 to inflate at 2 psi/s with onboard air or 8 psi/s at a station. Airing works below 0.5 m/s, stops at 12–40 psi, and produces an air hiss. Lower pressure compresses the sidewall, lowers the vehicle slightly and widens the visible tire; rims retain their size.

Autopilot

Shift+U (rebindable) opens the autopilot page to pick where and how; U starts and stops it (steering or the pedals take over too).

  • Drive to: the nearest repair station, any station, the trailhead, the summit lookout, the crawl park, the Widowmaker Spur, Boulder Gully, the lake (proving ground: spawn, crash wall, jumps, washboard), wherever the camera is looking, following any other vehicle (yours or a buddy's), or cruising the loop road with traffic.
  • Speed: 5–100 km/h. It slows for bends, steep descents and rough ground, and stops at the end.
  • Route: roads only, roads and trails (prefers them, cuts across when it pays), or anywhere it can get through.
  • Route: A* over the map (2 m cells) from slope, side slope, surface, and what's on the ground. Rocks, logs and ledges cost in proportion to how much of what this vehicle can climb they take; anything taller than it can climb at its best (low range, lockers, aired down), trees, walls and deep water are off limits. So a Bronco's route crosses a 0.3 m rock the Civic's goes round.
  • What it sees: ten times a second it scans the ground ahead: exact heights of the terrain, boulders, ledges, logs, trees, walls and other vehicles. It tries about 50 lines (hold a steering angle for a third, two thirds or all of the next 9–20 m, then head back to the route) and drives each one in its head a quarter meter at a time: where every tire sits and what step or drop it meets, whether the diffs, belly or bumpers touch, how far the truck leans and pitches. Lines that hit something, lean past a safe angle or need a ledge taller than the truck can climb are out. The rest are scored on how far they stray from the route, how slowly they'd have to be taken, and how rough they are. So it straddles a small rock, puts a tire up on a bigger one, and goes round one that would mean crawling or scraping if there's room.
  • What it can climb: measured on square ledges: the Bronco climbs 0.15 m in 2H, 0.30 m in 4H and 0.45 m in 4L; the 4Runner 0.15 / 0.20 / 0.35 m; the rock buggy 0.7 m in 4L with lockers at 12 psi (its table has a 1.2x factor for 40 in tires and 16 in of travel); the side-by-side 0.3 m. Lockers and aired-down tires add a little. If it gets stuck on something it thought it could climb, it remembers that it can't.
  • Setup: 2H on pavement, 4WD on dirt and gravel, the center locked on loose, steep, sandy, muddy or snowy ground, low range for ledges, rock and steep grades (it slows to shift into or out of low). Lockers go in for ledges, side hills and wheel spin and come out for tight turns (a locked front axle won't turn and snaps CVs) and above 25 km/h. The sway bar comes off for crawling. Before a long rocky or sandy stretch, or a ledge it can only climb aired down, it stops and airs the tires down to 20 psi, and it pumps them back up at a repair station. It eases off on low grip: slow on snow and mud, very slow on ice.
  • On screen: the route on the ground, the line it's taking (green), the lines it tried (faint; red where they hit something), brackets on what it sees (ROCK 0.45M: OVER / AROUND LEFT / STRADDLE / BLOCKED), what it's doing ("LEDGE 0.38 M: CLIMBING IT"), and its setup (4L, lockers, sway bar, psi, how tall a ledge it can climb right now). It announces each shift and locker change.
  • Crawling: on ledges in low range it keeps first gear and walks up to each one.
  • Stuck:
    • Against a ledge on full tires, it stops and airs down to 20 psi, then tries again.
    • Otherwise it leans on the throttle, then backs off at a walk and tries again with more drive.
    • Stuck twice at the same spot, it plans a new way round.

Multiplayer

Up to 8 players on one map. One of you hosts; the rest join.

  • From the menu: Main menu (or Esc) → Multiplayer. The page has two halves:
    • HOST A GAME (left): name your game, pick the map, how many players (2-8) and the PORT (click it or arrow down to it, type digits; 1024 to 65535, default 27015; remembered), START HOSTING. Friends on your network see it in their list; the hosting card shows your address for anyone who has to type it.
    • JOIN A GAME (right): games hosted on your network show up by themselves (game name, host, map, players); pick one. Games on another network: type the address (IP, or IP:PORT if the host picked another port) and JOIN THAT ADDRESS. Games found in the list are joined on whatever port their host announced. A card says while it connects (Esc cancels) and says why if it can't.
    • In a game, the same page shows who's in it with their pings, MEET UP, and LEAVE (STOP HOSTING for the host).
  • From the command line:
    • Host: ./crumplezone --map 1 --host (the menu's port, 27015 unless you changed it), or --host 28123 for this run only
    • Join: ./crumplezone --join 192.168.1.20 (port 27015) or --join 192.168.1.20:28123 (or HOST:PORT), with --name YOURNAME if you like
  • Any port works, so two games on one machine, or a router that already uses 27015, are fine: host on one (say PORT), and tell your friends IP:PORT. Hosting needs 1024 or above; joining takes any. If the port is taken, the game says "PORT N IS IN USE: PICK ANOTHER IN THE MULTIPLAYER MENU".
  • Over the internet, the host needs TCP and UDP PORT (27015 unless you picked another) forwarded on their router. On a LAN it just works. Finding games on the LAN uses fixed UDP 27016 and 27017 whatever the game port is (LAN only: nothing to forward); a found game announces its real port. Set a password (PASSWORD on the Multiplayer page, or --password) before you open a game to the internet: players must know it to join, and it is never sent over the network (only a proof of it). Nothing else in the game is encrypted, so for anything private use a VPN such as WireGuard or Tailscale.
  • How it plays:
    • Your own truck runs on your machine, so driving has no lag. The others see it, dents and all, about 0.1 s behind (about 40 KB/s per moving truck).
    • Other players' trucks are solid: you can bump them, winch to them, and strap them (V, O). A line between two players' trucks pulls on each truck on its owner's machine, so a buddy can tow you to a repair station while you steer.
    • Name tags float over the others' trucks, the compass points to them, and the player list (top right) shows everyone's ping.
    • The host's parked trucks and crash props are shared. The host picks the map and the time of day (its clock goes out every second), and there's no pausing or slow motion while you're in a session.

Dedicated Server

For internet play or persistent sessions, run a dedicated server instead of having one player host:

make build/crumplezone-server
echo 'a long random password' > ~/cz-password && chmod 600 ~/cz-password
./build/crumplezone-server --port 27015 --map 1 --name "My Session" --password-file ~/cz-password

--port takes any port from 1024 to 65535 (27015 if you leave it out); CZ_PORT=28123 in the environment does the same (the option wins), which suits a systemd unit. Anything else is refused with a message (--port 80 and --port 99999 both are).

Players join with ./crumplezone --join YOUR_SERVER_IP:PORT --password 'a long random password' (or the PASSWORD field on the Multiplayer page, then type the address). The server runs headless (no window), has 7 guest slots, keeps the shared world (parked trucks, crash props, everyone's vehicles for whoever joins later) and runs no physics of its own. It needs only TCP and UDP PORT (27015 by default) open. Options: --port (or CZ_PORT), --map, --name, --players, --password / --password-file / the CZ_PASSWORD variable, --bind IP, --lan, --help.

Run it safely (details and a hardened systemd unit in docs/multiplayer.md; what is checked and why in docs/server-security.md):

  • Use a password. Without --password anyone who can reach the port can join (the server warns). Prefer --password-file or CZ_PASSWORD to --password (which shows in ps).
  • Never as root. The server refuses to start as root (--allow-root overrides, don't). A dedicated user, or systemd DynamicUser=yes.
  • Firewall: only the game port, TCP and UDP PORT (27015 by default). Nothing else needs to be reachable; the LAN discovery ports (UDP 27016/27017, fixed, LAN only) are off on the server unless --lan.
  • The server drops connections that stay silent, flood, send malformed or oversized messages, or guess passwords (five wrong guesses lock an address out for a minute).
  • Traffic is not encrypted. For privacy, put the server behind a VPN and --bind it to the VPN address.

Recovery

The idea: trucks break, and your buddies get you home. (Until multiplayer lands, a buddy is any other truck: Tab into it and drive.)

  • Winch (V, Z, Shift+Z): the Bronco, 4Runner and rock buggy carry a 9,500 lb winch, the side-by-side a 4,500 lb one (20 kN), with 30 m of line and a 30 m extension (60 m total). The line is hooked on foot (J, hold E at the front of the truck, walk it to a tree, boulder, vehicle recovery point or ground anchor, hold E; what each takes is under Anchor gear below); V from the seat only reminds you. The default 4x speed reels in at about 0.52 m/s unloaded; -/= or Settings → WINCH SPEED adjusts 0.1–20x (up to 2.6 m/s). Speed falls under load, the drum stalls at rated pull, and the line breaks past about 90 kN.

  • Anchor gear: what the winch line ties to depends on what you carry. Every target in reach stays listed; one you can't use is greyed with the reason ("NO GROUND STAKES LEFT", "CAN'T STAKE ON ROCK: NEEDS A ROCK BOLT", "TOO DEEP TO STAKE"), and the auto-pick (V with no choice) skips it. The HUD line above the fuel gauge shows the counts: STRAPS 3 SLING 2 STAKES 4 BOLTS 2 ICE 2. All the numbers are in src/anchors.h.

    Gear Works on Used up?
    TREE STRAP trees, stumps, poles at least 0.15 m through no: comes back when the line comes off
    CHAIN SLING boulders at least 0.45 m in radius (rock slabs aren't anchors) no: comes back
    GROUND STAKE dirt, grass, gravel, sand, mud with under 15 cm of water on it yes: left in the ground (a line back to the same stake is free)
    ROCK BOLT bare rock yes
    ICE ANCHOR snow and ice yes
    Another vehicle always no gear

    Nothing sets on pavement or scree, or under more than 15 cm of water. Sandbox starts with 3 straps, 2 slings, 4 stakes, 2 bolts and 2 ice anchors, and a repair station (park on the pad) or a full reset (R R) refills them free. A career starts with 2 / 1 / 2 / 0 / 0 (saved with the career as stock N ANCHOR:...); buy more off a station's rack on foot, or find them in supply caches (bolts and ice anchors are scarce).

  • Tow strap (O): get out, hold E at your front/rear recovery point to grab the strap, then hold E at the other vehicle's front/rear point within 9 m. The 9 m kinetic strap breaks at 130 kN. An unattended vehicle rolls in neutral with both brakes released and steers to follow. See engine audio, recovery and gearing for controls, audio previews and validation.

  • Repair stations: park on the pad and stop. The crew fixes everything (dents, panels, glass, tires, shafts, engine, hydrolock) in 4 s plus time per thing broken; moving resets the work. Towed trucks get fixed too, and the strap comes off.

    • Mountain: Trailhead Garage (in the lot), Crawl Park Pit (by the dome), Halfway Hut (a pull-off on the summit trail, where the Widowmaker Spur leaves it).
    • Backcountry: Trailhead Camp, Sawmill Camp, Far Side Camp and Pass Hut.
    • Proving ground: the shop beside the spawn.
  • Trail repairs (on foot, hold E): walk up to what's broken and fix it yourself, with your own tools and a spare part: a CV axle (socket set and hammer, the corner jacked up), a tie rod (wrenches and hammer), a bent control arm or sway bar link (socket set or wrenches, pry bar), a drive shaft (wrenches), a new tire on the rim (tire irons, jacked up), a flooded engine (socket set and spark plugs). The prompt says what you're missing. Wheels come off and on with the lug wrench once the corner's jacked: take the jack out of the back (E at the back opens a small inventory grid, five slots across, with a model for every tool, part and piece of recovery gear and the gate left shut; choose one to take it in your hand, choose the one you hold to put it back; the mouse, WASD or arrows with E, and a pad's D-pad with A all work), put it under the corner (on a truck, the hi-lift's arm reaches in under the body to a jack pad, a flat plate welded under the frame rail just beside the wheel well: behind a front wheel, ahead of a rear one), then hold E on it to raise it: the frame lifts and the wheel hangs clear (and again to lower it). Chains and the jack ride in the back, apart from the spare. The work shows in first person: the wrench round the lug nuts, the wheel sliding off its studs, the chain wrapping round the tread, the hammer at the hub, the new part going in. In sandbox you have every tool and endless parts.

  • Real or arcade (Settings → Recovery): in Real (the default) damage stays until a station fixes it: T only puts you back on your wheels and R tows you to the start as you are. Arcade keeps the old instant repair.

  • Compass (top): headings, the nearest repair station and the summit, with distances.

Maps

Pick the map in the main menu; the game remembers it. All maps are on the list (and in the editor). From the command line, --map N: 0 proving ground, 1 mountain, 2 freeway, 3 Frontier, 4 Backcountry. (The seeded Wilderness map was removed for now, commit c735d9e has the generator; 5 is now the plain open country the obstacle-section levels are set in: rolling land with nothing laid out on it. The game ships a level for each obstacle section on it: STEEP HILL, MUD PIT, ROCKY RIVER, ROCK WALL, DUNES, CLIFF SHELF and TIMBER, each on country of its own kind.)

Backcountry

6 x 6 km. The trails below are in the middle, the old 1.2 km map (Elk Valley). Round it is open country to explore off-trail, in eight districts:

  • North: Timber Basin (forest, north-west), Copper Ridge (ranges of rock ridges with snow on top and open valleys between) and High Lakes (an alpine plateau, north-east).
  • East and west: Ranger Flats (meadows, west) and Bear Creek Canyon (a gorge Elk River has cut through a plateau, east).
  • South: Lakeshore (a 1 km lake with a sandy beach, south-west), the south uplands, and Badlands Wash (mesas, sand and hardpan, south-east).

Elk River runs right across the map. Outside the middle it is about 0.9 m deep (snorkel water), with a 0.4 m riffle every 500 m to wade.

The trail network (src/bctrails.cpp; drawn on the M map in its ratings' colours, names when zoomed in; a rating sign with the trail's name at both ends of each): about 45 km of marked trails and two-tracks out into the new country.

  • Green two-tracks link the districts: Ranger Road (the trailhead down through Elk River's canyon at Ranger Ford to the ranger station), Timber Road, Copper Valley Road (Ranger Flats under Copper Peak to High Lakes, across Copper Creek), Lakeshore Road, South Fork Road, Rim Road.
  • Blue trails to the places off them (the fishing shack, the badlands and the Lost Mine, the Bear Creek ford, the falls, the north rim and High Lakes, the loggers' camp, the cabins); black over the high ground (Copper Ridge, the summit ridge, High Lakes Peak, Bald Knob, the spur up Copper Peak); and faint two-tracks (tan on the map, a cairn at each end) everywhere else.
  • COPPER PASS (red, 2.9 km), over the big mountain: from Pass Hut up the Notch (a rock garden and four rock ledges in the crags), down across Copper Creek, up the Scree and seven tight switchbacks, through the Choke (two boulders a truck's width apart, rock steps between), then the Shelf: a ledge climbing diagonally across the Rimrock, a 32 m cliff band round Copper Peak (312 m, snow on top, the highest ground on the map), the drop growing beside it, with the Slab (one huge rock jutting out over the drop) to drive out onto; over the saddle (COPPER PASS lookout, 205 m) and down to the Surveyor's Cabin. A set-up rig (low range, lockers, aired down) makes it; a stock car stops at the first rocks.
  • Obstacle trails built from the proving ground's sections, longer, in country of their kind: Timber Trail (timber, a mud pit, timber; Timber Basin), Boulder Gully (steep hill, rocky river, steep hill; the south uplands), Slickrock Crawl (rock wall, cliff shelf, rock wall; the edge of the badlands).
  • Rock: big boulders (car-sized and bigger) all over the new country, outcrops, tors, slabs to drive up, boulder fields; Slab City (a playground of slabs and boulders by Ranger Flats), Balanced Rock (on Copper Valley Road) and the Tors (south uplands). Bushes, copses, lone trees and logs fill the open country.
  • New places: Copper Peak, Copper Pass, the Notch, the Switchbacks, the Shelf, Copper Creek Crossing, Bald Knob Fire Lookout, four cabins (Line Shack, Prospector's Cabin, Beaver Pond Cabin, Copper Mountain Hut), and eleven supply caches at the hardest spots (the summit register, under the Slab, the obstacle trails' ends).

Forested hill country for crawling, mudding and exploring with buddies. You start at Trailhead Camp in the south and a network of trails (about 4 km in all) radiates from it, each its own challenge and rated on its signs: green easy, blue, black hard, red extreme. Elk River runs east to west across the middle, and the trails loop so a group can split up and meet again: Mud Run → Sawmill → ford → Far Side Camp on one side, Creek Crawl → mine → Slickrock Ridge → deep crossing → Far Side Camp on the other. Fuel is something to plan for (the camps have the shops).

  • The Mud Run (black, 580 m): a forest track east of camp to Sawmill Camp, worn into deep ruts, with five mud stretches and four bog holes (0.4–0.6 m of water over a mud bottom, wider than the trail so there's no way round). A 2WD car stalls in the first mud; a 4x4 in low range with lockers, aired down, wades through all four.
  • Creek Crawl (red, 375 m): up a gully with a trickle of water over its bed: boulder gardens and eight rock ledges from 0.2 m to 0.45 m (the same as the autopilot's best-set-up climb), to the old mine (portal, ore cart on rails, tailings, office). A Civic stops at the first boulders; a Bronco in 4L with lockers crawls the lot.
  • Slickrock Ridge (black, 440 m): from the mine along a bare rock spine over Slab Point (a lookout with a cairn and a bench), with off-camber slabs (the tread leans toward the drop, one way and then the other) and three rock drops, steeply down to Elk River.
  • Deep crossing (black): the ridge wades the river across a ~0.9 m pool with a current of about 1.2 m/s. The 4Runner's snorkel makes it; a Civic's engine drowns. It comes out on the way to Far Side Camp.
  • Ridge Road (green, 230 m) and the ford: Sawmill Camp to Far Side Camp, across the ford (0.4 m of gravel, a current of about 0.9 m/s: a truck wades it at walking pace).
  • Heartbreak Hill (red, 175 m): from Sawmill Camp straight over the hill beside the Ridge Road: loose gravel up a ~30% face, rocks in the tread, and down the far side.
  • Sand Wash (blue, 520 m): east from Sawmill Camp down a dry wash (soft sand, boulders along it) to a dune bowl, once round it on the ring trail, and out to the Mud Run. The tires sink: air down.
  • Shelf Road (black, 270 m): from Far Side Camp north along the rim of a canyon: a one-truck shelf with a sheer 15–25 m drop on one side (orange posts mark the edge; go over it and you land on the canyon floor), the Cliff Overlook pull-out, and a trail map. Wreck Spur (green, 200 m) runs up the canyon floor beside a stream to the wreck site, an old pickup on its side.
  • High Pass (blue, 435 m): the shelf road goes on up three switchbacks to Pass Hut (a repair shed and a cabin at 80 m), through snow: packed snow with two patches of black ice and a frozen pond by the hut.
  • Tower Road (green, 670 m): from the hut down the east side to the fire tower (a four-legged tower on a hairpin) and on to the ford. The cabin spur (175 m) leaves it for Trapper's Cabin on the river.
  • Repair stations: Trailhead Camp (it has a wash-down bay), Sawmill Camp (old mill, a stack of logs), Far Side Camp, and Pass Hut.
  • Places to find: 16 named places besides the camps (the autopilot menu lists them): Creek Crawl foot, the old mine, Slab Point, the deep crossing, the ford, Heartbreak Hill, the Mud Run's start and its third bog (THE SINK), the sand wash, the dune bowl, the shelf road, Cliff Overlook, the wreck site, Snow Corner, the fire tower, Trapper's Cabin.
  • Water and land: Elk River and the creeks run with a current on the height grid; trees (pine, broadleaf, snags) thicken away from the river, boulders and logs lie about, and every surface type is somewhere on the map.
  • In multiplayer: the Mud Run bogs and the Creek Crawl are made for winching each other out. Jobs and scouting runs use the places above.
  • Music: the mountain's airy folk.

Frontier

Everything in one 1 km map. You start in the paddock in the middle.

  • Race circuit: 1.4 km of pavement with kerbs: a 400 m straight, sweepers of 85-120 m radius and one 20 m hairpin; a wet skidpan in the paddock. The HUD times laps from the checkered line; leave the circuit and the lap doesn't count.
  • Rally stage: a 4 km loop of gravel, sand, mud and dirt that links everything. It runs from the paddock through the desert and the foothill forest, crosses both rivers twice at shallow gravel fords, follows the lakeshore and passes a mud bog in the south meadows.
  • Desert (west):
    • wind-rippled dunes of soft sand and cracked hardpan
    • a red-rock mesa with MESA CLIMB, fourteen 0.32 m ledges up its east face
    • a butte, a slickrock bowl, and a dry wash choked with boulders
  • THE WALL: twelve rock ledges up a gully lined with boulders, off the rally stage in the western hills, to a lookout. Climb it in 4L, aired down.
  • The range (north):
    • pines up to the treeline
    • a switchback trail about 140 m up to the summit, through a boulder garden and scree
    • snow on top, and a frozen tarn under the summit
  • Water:
    • Snake River comes down out of the range into Echo Lake, which has a sandy beach.
    • A muddier river drains the lake west across the south and spreads into a mud delta.
    • Both rivers have current. Deep water floats a car off downstream and floods its engine. The fords are 0.4–0.5 m deep, which a truck can wade at walking pace.
  • Blackwater Bayou (south-east, black): a swamp in the lowlands below Echo Lake, about 300 × 170 m of mud flats, grassy hummocks, still brown water a hand or two deep, drowned snags, reeds, fallen logs and stumps. A 740 m mud trail marked with orange-topped posts leaves the rally stage just south of the third ford. It runs east along the north side, round the far end, back west along the south side, and out through the old bog onto the stage again.
    • On the way: a corduroy of logs over the first wet stretch, a churned trough with mud waves, and 15–20 puddles from 4 cm to 30 cm deep.
    • THE WALLOW (north leg) and THE SINK (south leg): pits wider than the trail, 0.4 and 0.5 m of water over a mud bottom, with a 20–30% slimy climb out. A Civic drops in and can't get out. A Bronco in 4L with lockers, aired down, wades through. Each one has a black sign before it.
    • MUD HILL (red): an island in the middle, 7 m high. Its climb cuts straight across the loop from the north leg to the south leg: up a mud face of ~20% (30% at the steepest), over the top, and down the far side.
  • Cold Creek (north-east, blue): a glacial valley cut into the range east of Snake River, under snow.
    • The snow road leaves the stage at its north-east corner. It's a dirt track to the snowline, then packed snow up the valley floor at 8% at most, with ploughed banks, wheel tracks and orange snow poles. On the way it crosses the frozen creek on the ice and has two patches of black ice.
    • The valley: 80 m wide between rock-banded walls, with snowfields drifted into long, low waves and groves of snow-laden pines. A frozen pond sits on the east side. Cold Creek Lodge at the head has a log cabin and a repair shed.
    • The snow is real snow (grip about a third of pavement, and the tires sink in), and the ice is ice. A 4x4 drives up the road at 30 km/h; take it easy on the ice.
  • Repair stations: in the paddock, at the desert outpost, at the lakeside garage, at the mountain hut, and at Cold Creek Lodge.
  • Surfaces: every surface type is somewhere on the map.

The autopilot (Shift+U) can drive you to the paddock, the mesa climb, the slickrock bowl, THE WALL, the summit, the tarn, the Snake River ford, the beach, the bog, the delta, Blackwater Bayou, the edge of THE WALLOW, the top of MUD HILL, Cold Creek valley or Cold Creek Lodge.

Mountain

You start at a gravel trailhead in a valley under a 210 m massif.

  • Summit trail: a dirt track that spirals 1.3 km round the massif to a lookout at about 140 m. Grades reach 24%, there are rocks along the edges and in the tread, and it fords a dry rocky creek near the bottom.

  • Crawl park (west of the lot): side-by-side lanes:

    • Twister: offset mounds that lift diagonal wheels. Open diffs stall here; lockers walk through.
    • Boulder field.
    • Rock ledges: 0.3 m steps up to 1.5 m and back down.
    • Logs: they get thicker as you go, and they're slippery.
    • V-notch: big rocks either side of a trench.
    • Slickrock dome: grippy granite, about 30 degrees.
  • Whoops lane: east of the lot.

  • Valley loop: a gravel road round the valley. AI traffic drives it (K).

  • Scenery:

    • pine forest up to the treeline
    • broadleaf trees, bushes and grass in the valley
    • boulders everywhere
    • bare rock and snow up top
  • Lake: east of the trailhead, with reeds, picnic tables and a fire ring. Wade in carefully: water above the air intake hydrolocks the engine (the 4Runner's snorkel takes its air at roof height). The proving ground has a pond out in the hills.

  • Widowmaker Spur (black): a knife-edge ridge leaving the summit trail on the east face (~55 m up) and running 160 m out to a pinnacle. It holds its height while the mountain falls away, so the drops either side grow to 40–60 m. On the way out: a loose scree descent, a 3.2 m knife edge, an off-camber slab climb, two rock ledges, another off-camber stretch, scree with boulders, and the pinnacle to turn round on. Reflector posts mark the edges; go over one and you tumble all the way down.

  • Boulder Gully (red): a ravine up the west peak, reached by a track from the crawl park's north edge across the creek. It's 110 m long and about 30 m high, choked with boulders (the big ones toward the walls), with three rock ledges and two loose scree pitches at up to 40%. It needs both lockers.

  • Scree: loose broken stone (grip 0.6) on stretches of the upper summit trail, the spur and the gully.

  • Trailhead: a split-rail fence, a log cabin, a trail map, and signs at each crawl lane rated green, blue, black or red.

  • Rocks: irregular faceted boulders, outcrops on the slopes and scree up top. Each one collides exactly as drawn.

  • The woods: fallen logs and stumps, which are solid.

  • The sky: cloud shadows drift over the land.

  • Mud in the middle of the creek bed (the ford is packed gravel), a sandy beach round the lake, and snow on the gentler ground above the lookout.

Freeway

A straight six-lane divided freeway across farmland that never ends, for top speed: three 3.6 m lanes each way, a concrete median, guardrails, lamp posts every 50 m, sign gantries, and a rest area with a repair shop (off the eastbound side, down a gravel slip road) every 400 m. Start in the middle eastbound lane. The HUD shows how far you've driven and your best speed.

It never ends because everything repeats every 400 m, and whenever you get 200 m from the middle, the sim moves every vehicle, line and route back 400 m onto the identical stretch. Physics and the view can't tell (tested: no change in speed, lane or the gap to a car behind). Not in multiplayer: there it's just the 1.2 km of the map.

Top speeds on it (freeway/top-speed): Jesko ~413 km/h (drag-limited, 9th gear, after ~7 km), Civic Si ~200 km/h, Bronco 161 km/h, 4Runner 171 km/h and Tacoma ~180 km/h (governed, like the real ones).

Proving ground

The grid test pad has:

  • the model yard (south-west of the spawn): every model in the game in the design picked in the model lab, in rows by kind, its name over it as you walk up; the solid ones are solid. Three supply caches stand beside it (career). The model lab (main menu → MODEL LAB, or crumplezone --lab) shows each model's designs side by side as the game draws them: pick one, tweak its settings, or flag it for a redo with a note; the picks save to assets/models/choices.txt and the game uses them. build/modelsheet (make build/modelsheet) draws contact sheets of every model to build/review/models/.
  • a concrete crash wall about 115 m ahead of spawn
  • a kicker and landing ramp
  • a row of poles
  • a stack of foam crash boxes
  • a line of concrete barriers
  • a washboard of bumps
  • a banked ramp
  • an 8 m platform to drive off

The surface course, north-west of the pad: six 70 m strips side by side (wet asphalt, gravel, sand, mud, snow, ice) on a concrete apron, to feel the difference. Spawn on it with --spawn -112,94,0 (sand; the strips are 9 m apart from z = 76).

A link road leaves the north side of the pad (+Z, to your right at spawn). It joins a two-lane loop road that winds through wooded hills. Grass has less grip than pavement.

Surfaces and tires

Each surface has its own grip and its own way of letting go, and each tire tread gets on with each surface differently.

Surface Grip How it behaves
Pavement 1.0 Bites at a few degrees of slip, then lets go: a locked or spinning tire has ~70% left
Wet asphalt 0.68 Less grip, lets go sooner; past ~80 km/h the tires aquaplane (half the grip again at 140)
Rock (granite) 1.0 Like pavement
Dirt 0.82 Softer: grip builds more slowly with slip and stays when sliding
Grass 0.72 Soft, a little drag
Gravel 0.68 Loose: slides are progressive, and a locked wheel piles stones up in front and stops about as short as ABS (shorter, often)
Scree 0.6 Loose broken stone, rolls under the tread
Sand 0.58 The tires sink in (~3–6 cm, deeper at high pressure) and drag (rolling resistance ~10x pavement); spinning digs them down to 11 cm (and they stay down until you roll out); aired down they float (rolls 1.5x further). Keep your momentum. Soft to land on: see below
Mud 0.4 Slick, sinks deep, and packs into the tread as you go (the tire turns into a slick) until wheel speed flings it out. Mud-terrain lugs shed it best
Snow 0.32 Sinks a little, progressive slides, long stops
Ice 0.1 Almost nothing to steer or stop with, little rolling drag: stops take 8x as far as on pavement
Tread Fitted to Good at Bad at
Street Civic Pavement Mud, snow
Semi-slick (Cup 2 R) Jesko Pavement: stiff, bites at ~5° Everything else: wet (and aquaplanes sooner), mud (it barely moves), snow, grass
All-terrain Bronco, 4Runner Dirt, gravel, sand, snow, mud A little softer on pavement
Mud-terrain 37 in tire options Mud (sheds it), dirt Ice and wet pavement

ABS and traction control aim for the slip that grips best on that tread and surface (they let a tire dig more on loose ground). Traction control also stops engine braking from dragging the driven wheels into a slide on ice and snow (engine drag control). The HUD shows what you're on, your tread, and how far you've sunk or whether the tread's packed with mud. Tires throw what they're on (roost) and spray off wet asphalt.

Soft landings. Sand, mud and snow give under a hard landing. Past what the ground can bear under a tire (~120 kPa for loose sand, more the deeper it goes: estimates), the tire digs a crater instead of squashing onto its rim (up to 22 cm in sand, 20 in mud, 16 in snow), and the ground keeps the energy instead of bouncing it back. Body panels hitting it plough into a crush layer (a soft spring, packed hard 25–40 cm down) that doesn't push back as they lift out. A Bronco dropped flat from 5 m takes about a tenth of the damage in sand that it does on rock, with a third less peak deceleration; from 8 m rock pinches two tires on their rims and sand none; a jump landed 35° nose-down does far less (surfaces/soft-landing). It's still in a hole afterwards: ease out of it (floor it and the tires spin and dig in).

Tracks and sinking. Every tire on loose ground leaves a track the width of its tread, laid on the ground as a groove: a darker floor with the tread's lugs printed in it, walls shaded by the light, and in sand, mud and snow the ground it shoved aside banked up either side, as deep as the tire sank (deeper and darker where it spun). Fainter on dirt, gravel and grass; black rubber on pavement where a tire slides. Tracks are drawn multiplied into the ground under them, so they take its light: sun, shadow, headlamps, night. The last ~12000 segments stay (about 600 m behind each wheel of one truck; the oldest fade out), for every car including other players'. A tire sunk into sand, mud or snow sits down in a collar of the ground it pushed aside, so you can see how far it's in.

Graphics

  • HDR pipeline: the scene renders into a floating-point target (with MSAA), then goes through screen-space ambient occlusion, bloom and ACES tone mapping.
  • Sun (and moon) shadows: two cascades, a sharp one around the car and a wide one out to the treeline, with soft filtered edges.
  • Day and night (src/daylight.cpp): a clock runs the sun across the sky (38° north in early summer: up at about 5:20, down at about 18:40). The sky, ambient light, fog color and exposure follow it through golden hour, a red and orange sunset and the blue hour into night. At night the moon (just past full, low in the south, shaded by its phase) takes over as the key light and casts weaker, bluish shadows; stars fade in at dusk and wheel round the pole with the clock. Exposure opens up and a touch of blue night vision keeps the dark readable.
  • Sky: the gradient with a glow round the sun, and drifting procedural clouds lit by the sun or moon, which also show in paint and glass reflections.
  • Headlights (src/lights.cpp): every car's low or high beam is a real light: two spot lights per car with a flat low-beam cutoff, a hot spot and distance falloff, lighting the road, scenery, grass, water, dust and other cars (the nearest 8 cars with their lamps on). The lenses glow (and bloom), tail lamps light up with them and brighten when braking, reversing lamps come on in reverse. A lamp goes dark once the bodywork under it is crushed or the panel it's on is gone. Yours are on Shift+L (AUTO turns them on at dusk); AI, autopilot and other players' cars switch on at dusk, parked ones stay dark.
  • Atmosphere: height fog that thins up the mountains.
  • Terrain:
    • two-tone meadow with dry patches
    • rock with strata on steep ground
    • snow on high tops
    • craggy rim mountains, and a mountain range out to the horizon (visual only; the physics map is unchanged)
  • Photo-scanned ground (src/groundtex.cpp, src/groundshader.cpp, assets/ground/): ten CC0 Poly Haven PBR sets (colour, normal, AO/roughness, height) in two texture arrays. Each 1 m cell's paint picks a mix of materials (mud, dirt, leaf litter, two grasses, gravel, pale and orange ground, rock, snow); neighbouring cells blend through a noise-wobbled, height-aware border (the knobbly material shows through first). Normal and ARM maps light it; a second, turned and rescaled sample and large patches of lighter and warmer ground break up the tiling; steep banks are mapped from the side (triplanar); detail fades out with distance. Paved ground, ice, the freeway and the race circuit keep the code-made look. Tire tracks, rut lips, puddles in mud, the wet shore, editor painting and night lighting all work on it. SCANNED SCENERY (settings) sets how many layers and taps it takes and the texture size; OFF is the code-made ground.
  • Scanned props (src/propdraw.cpp, baked into assets/props/ by tools/bakeprops.cpp): Poly Haven scans drawn instanced with their colour, normal and AO/roughness maps, lit and shadowed like everything else (they cast shadows too), each at one of three levels of detail by distance, culled to the view. Pines are fir and pine saplings scaled to the tree, snags and logs are dead trunks (a log fitted to its collider), bushes are shrubs, cliffs lie on the steep faces, and round the camera grass, ferns, stumps and branches grow off the trails, water and pads. Far trees are billboards baked from eight sides. Boulders are the scans too, and so is what you hit: World::addRock places the scan's convex hull (48 corners at most, in rocks.hull) scaled and turned at random, and the renderer draws the scan in the same frame. Without assets/props (or with SCANNED SCENERY off) the scenery is the code-made one, and so are the rock hulls without the bake.

Vehicle visuals

Body

  • The general body shell subdivides the physics skin twice (Catmull-Clark), with crisp shoulder and roof lines. Dedicated shells can replace it while following the same physics.
  • The rock buggy and the side-by-side are tube-frame vehicles: their cage, chassis rails, bumpers, seats, harnesses, exhaust, winch and light bars are tubes and small parts bound to the physics lattice (so a hit bends them with it), and only the nose cone and tail (buggy) or hood, fenders and tail (side-by-side) carry body skin. The exposed V8 and the four-link axles show.
  • The Jesko has a dedicated curved hood, canopy, rear haunches and open wheel arches, with swept lamps, side intakes, a shaped wing and center exhaust. Its shell uses Koenigsegg's published dimensions: 4,626 × 2,030 × 1,210 mm, on the existing 2,700 mm wheelbase. Surface contours are hand-shaped approximations, not factory CAD.
  • Its hood, doors and engine cover have separate mesh seams and follow their physical panels. The glass follows physical breakage, and garage ride-height changes move the shell too. The collision solver continues to use the coarse physics cage. The spring package is an equivalent inboard inclined coil, not a full Triplex rocker simulation.
  • The 4Runner, Bronco and Civic have sculpted shells built from their real lines (the Bronco's black hardtop, exposed door hinges, squared flares and round lamps; the EF hatch's wedge nose, wide flush lamps and moonroof). They dent, and their doors, hood and gate open, with the physics.
  • Every visual vertex is a fixed weighted mix of physics nodes, so dents and tears appear exactly where the physics puts them.
  • Details are drawn per pixel: framed side windows with pillars, windshields, headlamps with reflectors, tail lamps that brighten under braking, a grille, black bumpers and side skirts, door seams and handles, and number plates.
  • Paint has a clear-coat that reflects the sky.

Glass and cabin

  • Windows are tinted and see-through. Inside are seats, a dashboard and a steering wheel.
  • Shattered windows become real holes.

Wheels

  • Rounded tires with tread blocks and grooves.
  • Dished five-spoke rims with lug nuts and a center cap.
  • Brake discs that spin, and calipers that don't.

Running gear

  • Drawn every frame from the live physics: wishbones with ball joints and bushings, knuckles, tie rods and the steering rack, coil-overs that compress as you drive, anti-roll bars, the twist beam, live axle housings with their links, prop and half shafts, differentials and the frame rails.

Under the hood and underneath

  • The engine (block, head or two V-banks, valve covers, intake, headers, pulleys, alternator and belt) and the gearbox ride on the physical engine block, so you see them rock on their mounts. You'll see them once the hood pops open.
  • Radiator, battery, exhaust with muffler and chrome tip, fuel tank, mirrors and wipers are attached to the body, so they crumple with it.

Panels

  • Each bolt-on panel is drawn from its own nodes with a crisp gap around it, so a door swings open as a door and a hole shows where a panel came off.

The Jesko's mesh checks run without a graphics window:

make build/test_jesko_visual
nice -n 15 ./build/test_jesko_visual

They cover dimensions, rigid transforms, detached doors and hoods, broken glass, garage ride heights, and a 50 km/h wall impact with finite, deforming surfaces.

HUD

The HUD stays out of the way:

  • Bottom right: a gauge cluster with tachometer, redline, needle, speed, gear, and TC-off / autopilot / handbrake lights.
  • Bottom left: a small vehicle card. It shows a damage bar, the weight and front/rear balance, and warning pills (for example ENGINE DAMAGED, DRIVESHAFT BROKEN, STEERING BENT, LEFT DOOR OPEN or FRONT BUMPER OFF).
  • Top center: short toasts that fade out.

Help only appears when you press H.

Effects and sound

Engine sounds. Every engine has its own voice (EngineTone in src/engineaudio.h): its exhaust (the pipe's resonance, how open it is), a big cam's lope at idle, its intake or carb roar, valvetrain tick, a thin-to-deep timbre, pops on the overrun, and small cylinder-to-cylinder differences of its own. So two V6s or two V8s don't sound alike, and each changes as the revs sweep its harmonics across its exhaust's resonances.

  • Tire smoke on pavement and dust on grass
  • Skid marks, and tire tracks pressed into loose ground (see Surfaces and tires)
  • Sparks from scraping metal
  • Glass shards
  • Engine smoke
  • Brake lights
  • Procedural engine, tire, wind, crash, glass and blowout sounds
  • Each engine has its own voice, built from the vehicle's spec:
    • Firing pitch: set by the cylinder count, rpm / 60 × cylinders / 2.
    • Depth: bigger engines sound deeper.
    • Character: a lumpy four (Civic), an even, howling flat-plane V8 (Jesko), smoother V6s.
    • Turbos: spool whistle and a blow-off valve when you lift (Jesko, Bronco).
    • Supercharger: Roots blower whine that tracks the revs (4Runner).
  • Background music, generated live (no recordings), one mood per map:
    • Proving ground: mellow lo-fi. Swung drums, 7th/9th chords on an FM electric piano, a sub bass, vibes and a picked guitar.
    • Mountain: airy pads, fingerpicked plucks (Karplus-Strong), a breathy flute and bells, sometimes in 3/4.
    • Freeway: synthwave. Pumping saw bass and pads, a pulse arpeggio, a gated snare and a saw lead with echo.
    • Frontier: a desert road trip. Open pads, a twangy picked guitar with a dotted echo, root-fifth bass, cross-stick and shaker.
    • Backcountry: the mountain's airy folk again.
    • A seeded generator picks the key, mode and tempo and writes chord progressions (4–8 chords). Melodies come from a two-bar motif (statement, sequence, cadence) that lands on chord tones.
    • Every 30–90 s a new section adds or drops layers, and may change the progression or the key. Changing maps crossfades over 4 s.
    • The music sits about 8–14 dB under the engine at the default setting and costs under 1% of one CPU core.
    • To review it offline, build/review/music/musictest.cpp renders each map to WAV and writes spectrograms, levels and a note trace.

Scanned assets

The scans are CC0 from Poly Haven. The raw downloads stay out of git:

python3 tools/fetch_polyhaven.py assets/source/polyhaven   # ~154 MB, md5-checked
python3 tools/fetch_polyhaven.py assets/source/polyhaven --moab   # Moab's sandstone set at 2k, ~190 MB
python3 tools/fetch_ambientcg.py assets/source/ambientcg Rock029  # ~60 MB (zip kept)
python3 tools/ground_layers.py ph assets/source/polyhaven/textures cliff_side ...   # 2k -> assets/ground's 1k sets
make bake                                                  # -> assets/props (committed): 3 LODs, atlases, hulls, billboards

make bake (needs ImageMagick's convert) simplifies each solid scan to three levels of detail (rocks about 1,500, 400 and 100 triangles), unwraps each level and bakes the full scan's colour, normal and AO/roughness onto it, cuts each rock's convex hull down to 48 corners (rocks.hull, the format World::addRock uses), thins the leaf and needle cards for the lower levels (dropping cards, scaling the rest up, inside a triangle budget) and renders the trees' far billboards. CZ_PROPS_DIR=DIR points the game and the tests at another bake.

The ground has no grass, sand or asphalt scan yet: grass is two scanned grounds tinted green, sand the pale ground warmed, asphalt the code-made look. CC0 sets that would fill the gaps (names to check against the sites): Poly Haven leafy_grass, aerial_grass_rock (grass), coast_sand_01, aerial_beach_01 (sand), asphalt_02 (asphalt); ambientCG Grass001-Grass005, Asphalt012.

Credits

  • Scanned rocks, cliffs, trees, plants, logs and ground materials: Poly Haven, CC0 (rock_moss_set_01/02, rock_07, rock_09, boulder_01, stone_01, namaqualand_boulder_03/04/05, namaqualand_boulders_01, namaqualand_stones_01, rock_face_01/02, namaqualand_cliff_01, fir_sapling, pine_sapling_small, dead_tree_trunk, dead_tree_trunk_02, shrub_02/03/04, fern_02, grass_medium_02, tree_stump_01/02, dry_branches_medium_01; forrest_ground_01, brown_mud_leaves_01, brown_mud_03, brown_mud_dry, rocky_terrain_02, gravel_ground_01, sandy_gravel_02, snow_02, forest_leaves_04, rocky_trail; for Moab's slickrock namaqualand_boulder_02/06, namaqualand_cliff_02, cliff_side, rock_boulder_cracked, worn_rock_natural_01, red_sand).
  • Moab's streaked cliff rock: ambientCG Rock029, CC0.
  • The real Moab map (assets/maps/moab/): heights from the USGS 3D Elevation Program (public domain); trails, roads, the river line and named places and obstacles © OpenStreetMap contributors, ODbL 1.0 (assets/maps/moab/osm.txt, derived by tools/osm_extract.py).
  • src/third_party/stb_image.h: Sean Barrett, public domain.
  • src/third_party/cgltf.h: Johannes Kuhlmann, MIT license.

How it works

File What it does
src/softbody.* Node/beam solver, plastic deformation and breaking, the chassis frame, panel pins, steering rack, anti-roll bars, tire model, engine, gearbox and torque reactions, ABS and traction control, contact between vehicles, sleeping, AI driver (Stanley steering, IDM car-following, passing, recovery)
src/carbuild.cpp Builds a vehicle: body lattice, frame members, weight placement, engine block and mounts, suspension linkages (with rates from their geometry), driveline, bolt-on panels
tests/ Scenario harness, the scenarios, the parallel runner and its HTML report
src/vehicles.* Vehicle and prop definitions
src/world.* Baked heightfield, road carving, trees, static obstacles, collision queries
src/render.* Shadow-mapped renderer: car body shader (per-pixel lamps, windows, trim), see-through glass pass, detailed wheels, HUD drawing
src/groundtex.*, src/groundshader.cpp The photo-scanned ground: texture arrays and the terrain shader that blends them
src/props.*, src/propdraw.* Scanned props: the baked model and hull files (no GL; the physics uses the hulls), and their instanced renderer
tools/bakeprops.cpp, tools/fetch_polyhaven.py Fetches the Poly Haven sources and bakes them into assets/props
src/carvisual.* Visual car models: subdivided body shell skinned to the physics, lattice-attached parts, running gear from the live suspension
src/people.* People posed each frame: you in first person (body, arms and gloved hands on the tools and the winch line) and buddies on foot (walk, run, idle, turning steps, jumps); IK limbs round cached outfit pieces. Nobody's drawn in a seat: cabs show a steering wheel that turns
src/fx.* Particles, skid marks and tire tracks (decals multiplied into the ground), the lips of shoved-aside ground along ruts and round sunk tires
src/audio.* Procedural sound
src/engineaudio.* Shared engine synthesizer for your car and nearby engines
src/music.* Generative background music (one style per map), mixed in by audio.cpp
src/sdl_min.h, src/gl.* Minimal SDL2 and OpenGL declarations, so no headers need installing
src/gamepad.*, src/gamepad_sdl.cpp Game controller support: shaping, steering, pedals, bindings and rumble (no SDL), and the SDL device with hot-plugging

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages