Skip to content

About

AI-Generated 3D Car Game built with Three.js and Web Audio API

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Hellcat Drive — AI-Generated 3D Car Game

An advanced, browser-based 3D car driving and motorsport simulation built with Three.js and Web Audio API.

Play Online


🎮 Play & Run

🌐 Play Live in Browser

Launch Game on GitHub Pages

Option 1: Run Locally via Web Server

To run the modular development build:

# Using Node.js http-server or npx
npx serve .

# Or using Python
python -m http.server 8000

Then open http://localhost:8000/index.html in your browser.

Option 2: Self-Contained Standalone Build

Open HellcatDrive.html directly in any modern WebGL-supported browser (Chrome, Edge, Firefox, Safari).


🏎️ Vehicles & Classes

  • Dodge Challenger SRT Hellcat: Supercharged 6.2L HEMI, customizable colors, street & drag tire compounds, switchable TC/ESC modes.

  • SRT Demon & Mopar Drag Pak: High-output drag packages with transbrake, line lock, and drag radials.

  • Dragsters: Top Fuel, Nitro Funny Car & Top Alcohol: Up to 11,000 HP nitro-burning beasts with functional deceleration parachutes and multi-stage clutch management; the Funny Car rides its wheelie bars off the line under a carbon flip-top body.

  • Modified Pulling Tractor: Multi-engine setups (4x Blown HEMIs or twin supercharged V12 aircraft engines) built for tractor pulling sled competitions.

  • Monster Truck: 12,000 lb, ~1,500 hp supercharged methanol 540, 66 in hand-cut tyres, 30 in of suspension travel, four-wheel drive with lockers and four-wheel steering (auto / crab / manual rear steer). The wheels' spin steers it in the air: gas lifts the nose, brake drops it - and an optional air assist (on by default) aims it at the slope it's about to land on and works the pedals for you - it brakes the wheels to drop a rising nose and revs them to lift a falling one, eases off whichever pedal would over-rotate it and adds a light levelling nudge - so holding the gas over a jump doesn't flip it. The fiberglass pickup body has real window openings (you see the driver in the cage), a scooped hood, a chrome grille and headlights, flares, an open bed with rails and a tailgate. Picking it takes you to the Monster Arena map: a 192 x 368 m stadium floor with two big gap jumps, three tabletops (one half as big again), two step-ups, three sets of whoops, banked corners and a pile of junk cars that really crush, with freestyle tricks (big air, flips, wheelies, nose wheelies, donuts, crushes) scored on the video boards. All Ramps has no stadium at all: the whole world is groomed dirt, flat to the horizon and covered in jumps (gap jumps, tabletops, step-ups, kickers and whoops, big and small, facing every way), and tricks score there too.

  • Go-Karts: Rental, TaG 125, KZ Shifter & Supercharged: No suspension, a solid rear axle and slicks. A slow, forgiving 4-stroke rental kart behind a wraparound bumper; a 30 hp, 16,000 rpm TaG 125 race kart on a centrifugal clutch (fully in by 6,000 rpm like the real X30's, so it pulls away off the pipe and screams once it comes on it); the rental is governed to ~31 mph; a 48 hp KZ shifter with a 6-speed sequential box and brakes on all four wheels (0-60 in ~4 s, ~95 mph); and a supercharged kart - a 998 cc supercharged superbike four (H2-type centrifugal blower, ~20 psi, ~200 hp) behind the seat of a stretched chassis with a quickshift 6-speed and a wheelie bar: 0-60 in ~2.4 s, ~132 mph, the blower's whistle and its surge chirp when you lift. It starts on Track traction control; Off lights up the slicks at any real throttle.

  • AVENGER Monster Truck: the same stadium truck underneath - chassis, blown 540, axles, shocks, 66 in tyres, 4WD and 4WS, every number - under the Avenger's body: a rounded hot-rod coupe in lime green with big round fenders over all four tyres, an oval chrome grille and round headlamps, dark glass, yellow-to-orange flames outlined in red licking back from the nose and forward off the tail, the name arched across the doors in flame letters over a wall of stickers, the zoomies out of the rear fenders. Its own card in More Cars; its home is the Monster Arena too.

  • Trophy Truck: Spec, Trophy Truck & Unlimited 4WD: a Baja 1000-type desert racer - a fiberglass pickup body on a tube chassis with huge black fender flares, a grille full of stacked LED light bars behind a tube guard, a roof bar of spotlights, window nets, two spares and a chase light on the cage over the bed, 39 in desert tyres on black beadlocks with red rings. Its suspension is the point: ~27 in of travel on long A-arms up front and ~33 in on a 4-link at the back, ~1 Hz springs and bypass shocks, all drawn moving with the wheels. Held at 50-70 mph over 0.45 m whoops its body peaks at ~1 g and pitches +-3 deg with the bump stops never touched, where a Cybertruck or a rally car is thrown off them and flips. Spec (~525 hp LS): 0-60 ~5.5 s, ~125 mph; Trophy Truck (~900 hp, rear drive): 0-60 ~4.2 s, ~136 mph; Unlimited 4WD (~1,050 hp): 0-60 ~3.1 s, ~142 mph. Tyres (Esc → Drive → Tyres): the desert tyres, sand paddles (39 in paddles on the back, ribbed fronts - the dune buggy's sand tyres in the truck's size, with the same grip: 0-60 on soft sand in ~3.3 s against ~6.5 s on the desert tyres, and it climbs 35° faces) or 40 in mud-terrains.

  • Dune Buggy: 1600 VW, Built 2276 VW & LS3 V8 sand rail: a VW sand rail - a red tube frame on a diamond-plate floor, a roll cage with two lamps on top, two high-back buckets, the battery on the nose, a VW beam front end on yellow coil-overs, trailing arms at the back, polished five-spokes, the engine hung out behind the transaxle (a flat-four with its fan shroud and a stinger exhaust, dual Webers on the built one, or an LS V8 with the radiator up on the cage). Stock 1600 (~60 hp): 0-60 ~10 s, ~80 mph; built 2276 (~150 hp): 0-60 ~4.8 s, ~110 mph; LS3 (~480 hp, long-travel arms, starts on Street stability control): 0-60 ~4.4 s, ~135 mph. Three sets of tyres (Esc → Drive → Tyres): the buggy tyres; sand paddles with ribbed sand fronts - made for the dunes: they scoop the sand for over 2 g of bite and ~0.6 g round a corner in it (the ribbed fronts knife in and steer), float over it, climb 35° faces, and skate on pavement (the LS3 keeps its nose down on wheelie control, off with TC Off); or off-road knobbies (27 in fronts, 31 in rears) - they bite in dirt, gravel, grass and mud and hold their own in sand. In sand it slides but doesn't swap ends: on every set of tyres the rear holds sideways better than the front bites (it carries 62 % of the buggy), and with the engine hung out the back it's slow to start rotating - with ESC off (Track) nothing spins it, and with everything off only the LS3 on tyres that aren't paddles. Picking it takes you to the Sand Dunes.

  • Touring Bagger: Stock 117, Race bagger & Turbo drag bagger: a Street Glide-type touring bike - the batwing fairing on the forks with its twin LED headlamps, short smoked screen and the dash inside, the long tank, the stepped two-up seat, the 45-degree V-twin with its finned barrels, round air cleaner and primary cover, black pipes into a muffler under each hard saddlebag (red light strips in their backs), floorboards, a 19 in front on twin discs and an 18 in rear on a belt; the rider puts a foot down at a stop. You ride it like a bike: steer and it leans into the turn to the angle that balances it (~28 deg at the keyboard's limit, 0.58 g; the floorboards touch past ~32), stands itself back up out of the turn or under hard braking, and the front end turns about its raked steering head. The physics: the tyres are round in section (it rolls onto their shoulders as it leans), the ground pushes straight up at the contact patch, linked brakes keep the light rear from locking. Stock: 105 hp / 130 lb-ft, 0-60 ~4.0 s, 60-0 in ~135 ft, ~125 mph. Race bagger (King of the Baggers-type): ~190 hp, slicks, leans 50 deg, 0-60 ~3.2 s, ~160 mph. Turbo drag bagger: ~400 hp on 16 psi, a stretched swingarm, wheelie control, 0-60 ~3.1 s, ~180 mph.

  • Main Battle Tank: Governed, Ungoverned & 3,000 hp hot rod: built like an M1A2 Abrams - ~62 t, a 1,500 hp gas turbine (it whines like one) through a 4-speed automatic with hydrostatic steering, seven dual road wheels a side on torsion bars, rubber-padded steel tracks that run at each track's own speed. It steers the way tanks do - the steering drives one track faster than the other (~30 deg/s at a crawl, gentler at speed) - and in NEUTRAL it pivots on the spot; backing up, it steers like a car. The turret turns (~40 deg/s, as a real one) to wherever the camera looks and the gun lifts with the view - drag the mouse to look round (the view button puts the camera back behind). The model: the long hull and shallow glacis, armoured skirts, the angular turret with its bustle rack, the commander in the cupola with a .50 cal, the loader's M240, the gunner's sight and the commander's viewer, smoke dischargers, the 120 mm gun with its thermal sleeve and fume extractor, three-tone camouflage (the paint picks the base tone). Governed: 0-20 mph in ~6 s, 42 mph; ungoverned ~55 mph; the hot rod 0-20 in 3 s, ~68 mph. Its off-road package takes the rubber pads off: bare steel grousers. No shooting.

  • Ram 1500 HEMI: 5.7 HEMI, Supercharged 5.7 & 6.2 Hellcat swap: a 2019-24 Ram 1500 Rebel crew cab with the 5'7" box, built to its real dimensions (5.92 m long, 2.09 m wide, 1.99 m tall, 3.67 m wheelbase) - the long hood with the Rebel's power dome and its two vents, the Rebel grille (a honeycomb in a heavy black surround with the bar across it), slim LED headlamps (two projectors under a DRL strip that runs along the top and down the outer end), the black bumper wrapping round the body-colour fender corners with its fog lamps, lower grille, tow hooks and skid plate, the shoulder crease from the headlamps to the tail lamps, tinted glass with a black B-pillar, big black mirrors, black flares and running boards, a lined box with wheel tubs, vertical LED tail lamps, 33 in all-terrains on black six-spoke 18s; inside, the dash with the 12 in portrait screen, buckets and the rear bench. No badges, as with the other cars. 4x4 in 4-Auto, 8-speed TorqueFlite, air suspension. 5.7 HEMI (395 hp): 0-60 ~6 s, ~14.6 s quarter mile, 106 mph governed; supercharged 5.7 (~575 hp): 0-60 ~4.4 s, 120 mph; 6.2 Hellcat HEMI swap (~710 hp): 0-60 ~3.7 s, ~12.2 s quarter mile, 118 mph. 60-0 in ~135 ft. Off-road package: knobby off-road tyres.

  • ATV: 200 Sport, 450 race quad & Turbo drag quad: a full-size sport quad - a black tube frame under red plastics (the pointed nose with its angular headlamp and black vents, front fenders sweeping back into the footwells, silver side panels, rear fenders), a long black seat, a tube front bumper with its marker lamps and a rear rack on the 200, double A-arms and red coil-overs at the front, a swingarm with one shock on a solid rear axle (no differential), the chain, the air-cooled single, a silver muffler on the right above the front of the rear tyre, heel guards, silver split-spoke 10 in alloys on knobbies. You ride it: the rider (a third of the weight) hangs off the inside of every turn - it's what keeps a quad, its CG ~0.6 m up on a ~0.9 m track, on four wheels; it pushes wide on pavement, the inside rear lifts, and turned hard enough it goes over. 200 Sport (~12 hp on a CVT: the revs hold at the power peak while the ratio walks up): 0-30 ~7 s, ~48 mph; 450 race quad (~47 hp, 5-speed, long-travel suspension, wider, nerf bars): 0-60 ~6 s, ~77 mph; Turbo drag quad (~140 hp on race fuel, the swingarm stretched 10 in, a wheelie bar, drag slicks): 0-60 ~3.6 s, ~11.5 s quarter mile, ~117 mph. Off-road package: sand paddles and ribbed fronts.

  • Diesel Dually: Stock 5.9, Built street truck & Pulling truck: a 2nd-gen ('98-'02) one-ton Quad Cab long bed dually - the big-rig hood standing above the front fenders, the tall chrome crosshair grille, big clear headlamps with their two reflectors and the park / turn lamps under them, a chrome bumper, the front window's sill dropped at its leading corner, five amber cab lights, towing mirrors, the 8 ft box between the dually fenders, tall tail lamps, a chrome step bumper, polished 8-lug 16s with the domed front hubs and deep-dished rear duals. The 5.9 inline-six turbo diesel has its own sound: the injection knock (the clatter, loudest at idle), the turbo's whistle rising with the boost, and the compressor's flutter when you lift on the tuned trucks. Black smoke comes out of the stack as the fuel runs ahead of the air - floored before the turbo spools, and on a tuned truck under any real load - trailing back over the truck at speed. Stock (235 hp / 460 lb-ft, 4-speed auto, side exhaust ahead of the duals): 0-60 ~13 s, 100 mph governed; Built street truck (compound turbos, ~650 hp / 1,250 lb-ft, twin 6 in stacks in the bed, rear drive - it spins the duals): 0-60 ~6.8 s, ~135 mph; Pulling truck (triple turbos, ~1,600 hp / 2,400 lb-ft to 5,000 rpm, a short stack through the primer-grey hood, locked 4WD - it rolls coal): 0-60 ~4.4 s, ~160 mph. Off-road package: knobby off-road tyres.

  • Toyota Prius: the 2nd-gen (2004-09) hybrid liftback built to its real dimensions (4.45 m long, 1.49 m tall, 2.70 m wheelbase) and its real shape - one arc from a short sloping hood into the long, steeply raked windshield, the roof peaking just behind the B-pillar and falling in a straight line over the hatch to the spoiler, where the tail is cut off near-vertical (the Kammback) with a second strip of glass in it; swept-back headlamps along the fender tops, a slot of a grille, the wide lower intake with the fog lamps, the small fixed window at the foot of each thick A-pillar, black B-pillars, the quarter window, tall wrap-round tail lamps, the mast aerial, 15 in ten-spoke alloys; inside, the display centred along the top of the dash and the joystick shifter. A new hybrid drive: the 1.5 L Atkinson four (76 hp) reaches the front wheels through the power-split CVT - it drones at ~5,000 rpm floored as the speed comes up under it - and the electric motor on the final drive adds its torque from a standstill, its power capped by the battery. 110 hp combined: 0-60 ~10 s, ~17.7 s quarter mile, 104 mph governed, 60-0 in ~130 ft on low-rolling-resistance tyres.

  • 67: a custom supercar whose body is the numerals 6 and 7, side on - the 6's bowl over the front wheels with its counter a black oval in the flank, its hook curling back into the roof, the 7's bar the rest of the roof and its stroke slanting down ahead of the rear wheels - satin-silver slabs with rounded edges, a smoked glass canopy between them, a recessed door panel, a carbon chassis (a low wedge of a nose with an LED blade, eyebrows over the wheels, the tail and diffuser), black ten-spokes round red calipers and a 1 m wing on two pairs of stalks. A 6.7 L twin-turbo V8 behind the seats (670 hp, 670 lb-ft), a 7-speed dual-clutch, rear drive: 0-60 ~3.1 s, ~10.9 s quarter mile, ~185 mph (the numerals are no shape for the wind).

  • Silver Bullet: Sunbeam's 1930 land-speed car for Kaye Don - a long silver cigar with its nose drawn out low to a point, the wheels out in the wind behind aluminium discs, a curved fairing behind each front wheel and a long one down each side, the V12's exhaust stubs along the bonnet, a Union flag on the nose, the driver in a leather helmet and goggles far back behind a little aero screen, two tall fins on the tail. A 24 L V12 with two superchargers (~960 hp), three gears, Dunlop 37 x 7 tyres: built to beat 231 mph, it managed only 186 at Daytona in 1930 with its blowers misbehaving - here the engine runs as designed, ~0-100 in 10 s and ~230 mph (it lives on the Straightaway).

  • Hot Rod: a chopped 1934 Ford five-window coupe, fenderless at the front - the tall red grille shell over a dropped tube axle on its transverse leaf, hairpins back to the frame rails, and the engine out in the open: a red 540 ci big-block with polished valve covers under a polished, ribbed 8-71 blower with its belt drive, two carbs under a big flat hat, and the zoomies - four polished pipes a side down from the heads, then turning back and up into flared tips stepped in a row ahead of the cowl (they spit flames); the doors hinged at the back, door and quarter windows with round corners, bulbous rear fenders over 33x16.5 street tyres, teardrop tail lamps, a nerf bar, polished wheels. ~900 hp through a TH400 behind a 3,500 rpm converter and a 9-inch on 3.89s: 0-60 ~3.9 s, ~11.2 s quarter mile at ~139 mph, ~150 mph.

  • Chevelle SS: the 1970 Chevrolet Chevelle SS 454 sport coupe to its real dimensions (5.01 m long, 1.92 m wide, 1.34 m tall, 2.85 m wheelbase) - the long hood with the cowl-induction bulge and two red stripes over it (and the deck lid), the 1970's V-nose - the front a point in plan, its middle ahead and the corners swept back, dipping in the middle - with the hood's lip over it, the grille in two tiers of black egg-crate in a bright surround with a body-colour bar between, the quad headlamps sunk in deep chrome bezels in the fenders' ends, the chrome bumper round the front and its corners dipping under the grille's point with the parking lamps in its lower face, one crisp shoulder crease the full length, round wheel openings with bright lips, the coke-bottle hips, the hardtop with no B-pillar and chrome round the glass, the semi-fastback roof - the back window set down between sail panels that run on to the deck - under a black vinyl top, the tail lamps in the rear bumper, a red interior, polished five-spokes on redline radials. The LS6 454 (450 hp, 500 lb-ft), a TH400 and a posi on 3.77s: 0-60 ~5.4 s, ~13.8 s quarter mile at ~107 mph, ~130 mph.

  • Superbird: the 1970 Plymouth Superbird to its real dimensions (5.62 m long, 1.94 m wide, 1.33 m to the roof, the wing's top at 1.56 m, a 2.95 m wheelbase) - the long nose cone with its raked face, the two black headlamp doors (they swing up with the lights to show two round lamps a side) and the Plymouth badge, the parking lamps in the slot under them, the hood with its power bulge and pins, the reverse scoops on the front fenders, the fuselage sides with one crease the length of them and the quarter's dummy scoop, the hardtop's chrome-framed glass and flush back window under a black vinyl top, the wing on its two swept uprights with the Road Runner on them, PLYMOUTH in script down the quarters (white on the oranges and reds, black on the rest), two louvred tail lamps a side with the spaced letters between them, a white interior, Rallye wheels on F70-14 Polyglas. Three engines through a TorqueFlite: the 440 Super Commando (375 hp, 0-60 ~6.3 s, ~14.7 s quarter, ~125 mph), the 440 Six Barrel (390 hp) and the 426 Hemi (425 hp, ~14.5 s at 107 mph); the nose and the wing make downforce (~330 lb at 150 mph). New paints: Vitamin C, Lime Light, Lemon Twist, Petty Blue, Alpine White.

  • RC Truck: a 1/10-scale 4WD monster-truck RC car (the Sandstorm kind) at its real size - 0.47 m long on 150 mm tyres, 2.6 kg - driven on the full-size roads: the blue pickup shell with its black hood, the white flash and SAND STORM down the bed sides, red-ringed lamps in the grille, tinted glass with the banner across the windshield, a big rear wing; the plastic tub chassis with LED lamps in the front bumper, A-arms, dogbones and four oil-filled coil-overs that work with the wheels; chevron tyres on blue beadlock wheels. Three power options - Brushed 2S (~27 mph), Brushless 3S (0-30 ~1.7 s, ~45 mph) and Brushless 6S (~62 mph) - with a stability gyro that countersteers when the tail steps out and steering scaled to the speed like a transmitter's dual rate (full stick asks for ~1.4 g at any speed), both on in Sport. Tyres (Esc → Drive): the chevron knobbies or belted slicks - a lot more grip on pavement, they skate on anything loose. It sounds like one: the brushless motor's buzzy whine, the gear train's whirr, the speed controller's squeal pulling away, brush crackle on the brushed can, the little tyres' tread buzz. Inside the cab: two seats, the dash, a little wheel and a 1/12 driver - press C to drive from their seat.

  • Tour Coach: a 45 ft three-axle motorcoach of the MCI J4500 kind (13.84 m long, 2.59 m wide, 3.5 m tall) in the D&F Travel livery - the white body under the black glass band, the brush-stroke swoosh (purple, red, orange, yellow) down each side and the name on the quarters, the front cap over the two-piece windshield with the fleet number, rabbit-ear mirrors, the entry door, baggage bays; a steer axle, the drive axle on duals and a tag axle on polished aluminium wheels. Stock 410 hp (governed at 75 mph, 0-60 ~36 s), an X15 swap + tune (605 hp, ~95 mph) or the Race coach (1,500 hp, ~135 mph) - through an Allison 6-speed with a diesel's shift schedule; it understeers like a tandem-axle coach should and rolls coal when it's tuned.

  • Derby Bus: a conventional school bus stripped for the demolition derby - the glass out (open windows, a welded wire screen over the windshield you see out through), a roll cage, green seats, the crew's graffiti all over the faded yellow (GFP 95, Dave, Lawn, Nick 69...), orange steel wheels on duals - with a cowcatcher (a solid raked V-plow of steel plate on a pipe frame, scraped and rusting, GFP 95 sprayed on it) you can bolt on or take off (More Cars card or Esc → Drive: it adds 350 kg on the nose and moves the front out 0.8 m). The stock DT466 diesel (~68 mph), a 454 big-block (~89 mph) or a blown 572 (900 hp, ~114 mph). Derby shocks and rubber jounce bumpers soak up the arena's ramps instead of pogoing off them. It takes you to the Monster Arena and its junk cars.

  • X-34 Landspeeder: Luke's landspeeder, hovering half a metre up on its repulsors - no wheels. A long low body with a blunt rounded nose and a flat deck, a long chrome grille in a recess down each flank and another across the nose, two vents behind each side grille, a clear bubble far back over the two seats (the pilot on the right), and three turbines on the back - two low on stalks off the corners (the left one's cowling gone, its bare engine showing) and one up on a swept pylon on the centre line - their intakes forward round red lips, the fans turning with the spool; dusty tan-brown paint under a dark red stripe, sand-scoured to grey primer and to bare metal round the nose. New physics: the four "wheels" are invisible repulsor pads whose hold is the same on tarmac, dirt, sand and water (over a lake it rides the surface), soft and near-critically damped so it floats over whoops instead of pitching into them, the back pads holding a little harder than the front so it runs wide rather than swapping ends, and a yaw damper in the field that grows with speed; the three turbines (~585 lbf between them) push it, the field brakes and steers it and backs it up in R. No skid marks, no squeal, no tyre roar - the field kicks dust up off loose ground and mist off water. 0-60 ~6.6 s, ~155 mph, 60-0 in ~190 ft, a steady ~0.57 g at full lock at any speed.

  • Sandcrawler: the Jawas' mobile fortress, an old Corellia Mining digger crawler - and it's huge: 36.8 m long, 20 m tall, ~15 m wide, ~1,200 t (no mass is given anywhere; NASA's crawler-transporter, near the same footprint but a third as tall, is 2,700 t). The tall slab-sided hull leaning in a little towards the roof, the bridge's face up front with its row of small windows, the long bow sloping back under it to the tracks with the loading ramp let into it, the roof stepping down twice to the sloped stern; a ledge round the lower hull with its ports, the dark hatch in the side, plates of every shade of rust riveted over each other with rust run down from the rivets, machinery, masts and a sensor dish on the roof, a crane over the stern, floodlights on the bow and lamps behind the windows at night. Four track units of 3.6 m steel shoes round 3.4 m sprockets - a short pair forward, a long pair aft - each running at its own speed and every one swinging to steer, like NASA's crawler (a ~24 m turning circle); a reactor feeding an ~8 MW (~10,700 hp) drive through a 4-speed transmission: 0-30 km/h in ~15 s in sand, governed at 30 km/h (18.6 mph), 0.24 g on the brakes. The governor is its only fuel control (no rev limiter cutting in over it), and pushed past its governed speed downhill the drive holds it back, as a big electric drive's motors do generating: ~35 km/h down a 12 deg dune face, steeper with the brakes too, where it used to run away to 78 km/h with the engine at 4,800 rpm. It walks up the dunes' long windward faces (15 deg from a standstill, crawling up 18-20), not the steep slip faces; trees and posts go down under it; the view button puts you on the bridge, 18 m up, and its tracks clank. New physics, all opt-in: track units that bear along their whole flat run and round both ends (trackEnv - a unit walks up a rise from its front end), every wheel steered round the one turn centre (ackermann4), an electronic differential holding each unit to its own speed round the turn (eDiff - on twisted sand the drive no longer escapes through a lifted unit), its own shift and lock-up points for a drive that turns 500-1,900 rpm, and a drive retarder that comes in past the governed speed (retarder). Picking it takes you to the Sand Dunes.

  • Jet Fire Truck (ABLAZE): the All Star Monster Truck Tour's jet-powered, flame-throwing monster fire truck, after the photo: a cab-forward fire cab (the two-pane windshield, the narrow window ahead of each door, ALLSTAR on the doors, a gold Maltese cross, chrome grab handles, mirrors on arms, the light bar - its reds and whites flash with the lights on), an open crew step, then the tall red box - a ribbed band along its top, the ABLAZE flame logo, ALL STAR - the cross - FIRE DEPT. in gold leaf on a darker panel framed in steel, the wheel opening squared over the back tyre and trimmed in chrome, reflective tape and chevrons - a red ladder rack along its left side and a hoop across the back, a sloping polished hood over a dark grille at the back and, under it, the J34's grey tailpipe a metre out of the back wall. On the monster truck's chassis (4-link, nitrogen shocks with yellow coils, planetary axles, four-wheel steer) on a 3.3 m wheelbase, with 66 in flotation tyres on plain grey steel wheels. A Westinghouse J34 turbojet in the box pushes it (~3,400 lbf dry, ~4,900 lbf with the afterburner, a long flame out of the tailpipe floored); nothing drives the wheels forwards, a hydraulic motor backs it up. ~13,000 lb, 0-60 ~11.5 s, ~135 mph. Its home is the Monster Arena.

  • Unicycle: Pedal, Improved pedal & Jet: a 24 in unicycle - a silver rim on 36 spokes, a black frame, the saddle with its yellow bumpers, cranks straight on the hub - and its rider, arms out for balance, legs going round with the pedals. New physics: the rider balances it fore and aft over its one wheel (a pitch hold) and side to side like a bike, leaning into the turns, and the most cornering a rider can manage caps the steering at any speed (so a full turn of a wheel at speed can't tip it). The rider is the engine: ~70 Nm at the cranks from a standstill falling off to nothing at ~210 rpm - 0-10 mph ~2.3 s, ~14 mph; it brakes by back-pedalling (~0.25 g). The Improved pedal one has a geared hub (the wheel turns 3.3 times to the cranks' once - the cranks visibly turning slower than the wheel) and a track sprinter on it (~1.6 kW): 0-30 ~12 s, ~35 mph. The Jet version straps a model-aircraft-class turbojet (124 lbf) on a rack behind the saddle, a fuel tank under it, the rider in goggles holding on to the saddle: 0-60 ~9 s, ~84 mph on a bicycle tyre.

  • Cybertruck: Long Range RWD, All-Wheel Drive & Cyberbeast: the stainless-steel wedge built to its real dimensions (5.68 m long, 3.81 m wheelbase, a 1.79 m peak) - flat brushed-stainless panels, the one-line profile from the nose's light bar over the hood and windscreen to the peak and down the vault to the tailgate, near-black frameless glass, trapezoid wheel openings with black flares, the light bar across the tail, the one big wiper, a squircle wheel and the big centre screen inside. Adaptive air suspension, four-wheel steering (the rears counter-steer up to 10 degrees at low speed), 35 in all-terrains on 20 in six-spoke wheels. RWD ~350 hp, 0-60 ~6.2 s; AWD ~600 hp, 0-60 4.1 s (both governed to 112 mph); Cyberbeast 845 hp, 0-60 2.6 s, an 11.2 s quarter mile, 130 mph.

  • Golf Carts: Standard, Street LSV, Hot Rod, Record, Jet & Mega Jet: a standard two-seat electric cart (48 V, ~4 kW, governed to 19 mph, a bag rack with two golf bags); a street-legal LSV build (72 V AC, 35 mph, lights, windscreen, 12 in wheels); a hot rod (45 kW AC motor and a lithium pack, lowered, roof off, ~84 mph); and a record cart built like the 118 mph world-record holder - a Hayabusa 1,340 cc four behind the seats, ~120 mph; and a Jet cart - a surplus turbojet slung low behind the seats (590 lbf of thrust, 810 with its afterburner), nothing driving the wheels, ~3 s of spool lag (hold SPACE on the brakes, floor it, let go), a flame with shock diamonds, 0-60 ~4 s and ~185 mph. Its Fun-tab tunes grow the engine: Stage 2 is a slightly bigger turbojet (~1,100 lbf, ~213 mph), Unhinged a huge one with wings (~2,050 lbf, 0-60 in 1.6 s, ~270 mph). Built to stay straight flat out: its thrust runs through the centre of gravity, the rear tyres are wider than the fronts, the brakes are biased to the front and a low tail fin keeps its nose in the wind - keyboard lane changes at 170 mph slide it ~1°, and it won't spin or roll with every aid off, even over a crest flat out. The Mega Jet carries an engine half as big again as the Unhinged one (2.4 times the stock turbojet across): an afterburning fighter-trainer turbojet, ~3,300 lbf dry and ~4,600 lbf lit, in a slippery streamliner on a longer, wider 700 kg frame with half its weight on the nose and a big fin - 600 mph stock (a quarter mile in 8.0 s at 302 mph from a standing idle), ~700 mph on Stage 2 and 800 mph on Unhinged. Its downforce stops growing past ~150 mph (enough to keep its grip, never enough to crush it onto its belly), and flat out it flies off crests for seconds and lands on its wheels; lane changes, hard steering and crests at every speed stay straight, even with every aid off. Every jet cart's engine sits on frame rails and a pylon now, and a grip tune lowers the whole cart, engine and all, so the thrust stays on the centre of gravity.

  • Rally Cars: Rally4, Rally2 & Group B: a gravel rally hatch at three power levels - Rally4 (front-wheel drive, 1.2 turbo triple, 208 hp), Rally2 (four-wheel drive, 1.6 turbo four, 290 hp) and Group B (mid-engined, four-wheel drive, twin-charged 1.8, ~530 hp, anti-lag bangs, 0-60 ~3 s). Sequential boxes, hydraulic handbrakes, gravel tyres (block tread, ~1.05 g round a gravel corner) on flat-faced six-spoke rally wheels with the brakes behind them, a light pod, mud flaps, the cage and both crew inside. Their off-road package is a set of rally mud tyres: big open knobs, ~1 g in the grass and nearly twice the grip in mud, less on tarmac. Picking one takes you to the Rally Stage.

  • Racing Mowers: B-Prepared, FX & Record: lawn mower racing, built to the US association's classes - blades out, the deck still hung underneath, numbers on all four sides. The B-Prepared is a real garden tractor on its factory frame with the 810 cc V-twin built inside (~38 hp), the mower's own 5-speed transaxle re-geared, turf tyres and no suspension (~80 mph, 0.6 g on pavement, it slides on grass); the FX is a tube chassis under a tractor hood with a 459 cc single on pump gas, a centrifugal clutch, a 3-speed box and kart dirt tyres (~88 mph); the record mower is built like the 150 mph land-speed holders - a 189 hp superbike four with a quickshifter on racing slicks, 0-100 mph in ~6.3 s (its home is the Straightaway). The race mowers take you to the Mower Track map: a 1/5-mile dirt oval in a freshly striped, mown field, straw bales for walls, a start / finish arch, bleachers and a lap timer that keeps your best lap per mower. New synth sounds for the V-twin (the potato-potato), the big single and the superbike four.

  • From Car Crushers 2 (in More Cars, a card each): nine of the Roblox game's vehicles, each built the way it would have to be for real to do what it does in the game (its top speed there), and left to the real physics:

    • Couch Car - a three-seat leather sofa on hidden 13 in wheels with a 1.6 L turbo triple built like a drag engine (~850 hp) under the cushions, its three pipes out of the right arm: the softest R-compound tyres (sticky from cold) and wheelie control, 0-60 ~2.8 s, ~190 mph, and twitchy on its short wheelbase.
    • Egg Rod - the Mork & Mindy egg car as a hot rod: a 350 small-block behind the egg, a 3-speed automatic, a big wing, ~142 mph.
    • Banana Car - the Big Banana Car on its 1993 F-150 (5.0 V8, 4-speed auto, 85 mph). As in the game it floats: drive into a lake and the rear tyres paddle it along.
    • Blue Bird - Campbell's 1935 streamliner: a 36.7 L supercharged Rolls-Royce V12 (2,350 hp), 3 gears, twin rear wheels - ~301 mph if you give it miles (it lives on the Straightaway).
    • Nissan GTR - an R35 in a Liberty Walk widebody, slammed on air: riveted overfenders, a carbon hood with vents, swept LED headlamps, a carbon splitter and canards, a ducktail and GT wing, black concave wheels round big brakes. The real 565 hp twin-turbo V6, 6-speed dual-clutch and rear-biased all-wheel drive, 0-60 ~3.5 s floored, ~196 mph.
    • Mini Dookie - the game's Pamingo Mini: a one-seat electric city pod, 15 kW, ~55 mph. Or with Fiat's 0.9 TwinAir turbo twin under the rear floor: 85 hp, a 5-speed automated manual, ~105 mph.
    • Porta Potty - a portable toilet on a go-kart frame, a 22 hp V-twin under the throne, the door open, ~45 mph - and it tips over if you take a turn quickly.
    • Turbo Scooter 3000 - a mobility scooter with a 100 kW motor: 0-60 ~3.4 s, ~119 mph, wheelie control and anti-tip wheels, a wide-track kit, a stabiliser wheel out each side and stability control - in a hard turn it leans onto the outside one and slides instead of rolling over. Or the name made literal: a Suzuki Hayabusa four with a turbo bolted where the rear shell was, ~260 hp, a 6-speed on a quickshifter, ~150 mph.
    • Razors Edge - a golf cart under a faceted wedge of black glass edged in glowing neon (the paint colour), a knife-edge prow, a graveyard on its flanks: 110 kW electric, ~142 mph. Or a junkyard 5.3 L LS V8 behind the bench, 285 hp and a 4-speed automatic, ~165 mph.

    New physics for them: electric motors (full torque from standstill, no idle or stall, regen, a speed limit that fades the torque), turbo lag, a rear-biased AWD split, a floating hull, stabiliser outriggers; new synth sounds: an inline triple, an even-fire V6, and electric-motor whine. The electric ones have a petrol engine to swap in (Esc → Drive → Engine, or on their More Cars card), and their Fun tab tunes the motor (power, base speed, speed limit, rotor inertia, reduction gear).

Off-road package (Esc → Drive, every vehicle): the Challengers get BFGoodrich KO2 all-terrains + a 2 in lift; the pulling tractor R-2 deep-lug rears and lugged fronts (quicker than its cut pullers on grass, dirt and mud); the dragsters a sand-drag setup (paddle tyres + ribbed fronts - try the Dirt Drag map); the monster truck full-depth (uncut) lugs; the karts knobbies with a matching sprocket; the mowers ag bar-lug tyres; the Car Crushers cars knobbies in their own sizes (the rally cars mud tyres). Each trades pavement grip for bite in the dirt, grass and mud.

Rolled over? Every vehicle flips back GTA-style: when it's on its roof or side and nearly stopped, steer left or right and it rolls back onto its wheels.

Maps (Esc → Drive → Map, or the title screen): Countryside (endless winding roads, hills, lakes) · All Road (the whole world is pavement: avenues, lots, skid pads, jump ramps) · Prepped Countryside and Prepped All Road (the same two with every road sprayed and rubbered in like a drag strip - sticky, and stickier still for warm drag radials and slicks) · Straightaway · Drag Strip · Dirt Drag · Monster Arena · All Ramps · Mower Track · Windy Mower Track (a ~750 m twisting dirt road course in a mown field, straw bales both sides) · Rally Stage (a 4 km loop of fast gravel through woods and fields - long sweepers, crests you fly over flat out, chevron boards at the tighter corners) · Windy Rally Stage (2.4 km of narrow, twisting gravel through dense forest in steeper hills, with four hairpins) · Sand Dunes (an endless sand sea: transverse dune ridges with long gentle windward faces up to a brink and steep slip faces down the far side, crests that wander and break into crescents, bowls between them, from a packed hardpan at the start; soft sand is its own surface - it eats street tyres, bogs skinny ones down and loses its bite on faces near its angle of repose, while paddles, big all-terrains and four-wheel drive go; a tyre spinning in it digs in and keeps most of its sideways hold, and one sliding sideways ploughs a furrow rather than skating). The three new tracks are timed laps from a start / finish arch, best lap kept per car.

Fun-tab tunes are saved for each car, and only what you've changed is yours: a setting you've left at stock follows the car's stock figure when the car's updated (a tune saved before this kept every setting as it was the first time you drove the car, so a later change to its limiter, gearing or weight never reached you - one whose sliders were all still at their defaults is taken as never tuned).

Nitrous (Fun tab): set a shot and it's armed - it fires whenever you floor it, like a real kit's wide-open-throttle switch (so it works on any wheel), or switch it to fire only while N / a mapped button is held. You hear the solenoids hiss and the engine hit harder while it sprays.


🏁 Game Modes

Game modes on the title screen (or Esc → Modes): Offroad Racing and Unicycle Racing.

Offroad Racing

A new offroad course is generated for every race - laid out from a random seed and the settings you pick - and you race it in laps: against the clock on your own, or against the room online.

  • Map type - the land it's generated on:
    • Dunes - sand from horizon to horizon, the course marked by orange whip flags up the long faces and off the brinks.
    • Forest - a dirt trail through the woods over rolling hills, with berms round the corners and mud holes in the dips.
    • Desert - fast hardpack across open desert: whoops, sandy washes to cross, saguaros and scrub, mesas on the horizon.
    • Mud Bog - a low, wet bog: mud most of the way, water lying in the ruts, firmer dirt over the rises.
    • Mountain - gravel up and down the mountainside: cuttings and drops, pines below the tree line, snow up top.
  • Length (short ~2 km / medium ~3.5 km / long ~5.5 km a lap), laps (1 / 2 / 3 / 5 / 10), corners (flowing sweepers / mixed / technical - tight turns, esses and hairpins), width, jumps (none / some / lots - tabletops, and kickers with Lots, each with a JUMP sign 45 m before it) and whoops (runs of rollers ~9 m apart).
  • How it's built: a closed loop through control points at wandering radii round a centre, scaled to the length asked for, drawn again until it turns no tighter than the corner setting allows and never comes back near itself; the start goes on a straight that's near level, and the grid sits on a levelled pad (the terrain is turned with the course, so the same code always gives the same ground). The ground under it follows the terrain's own - smoothed, its grades held to what a car can climb (cuttings through the crests, fills across the dips, the brows rounded off so you stay on the ground over them), level across, with berms round the outside of the tighter corners - and blends back into the land either side. Jumps only go on a straight that runs level or downhill through the landing, graded to an even slope first, so nothing rises up to meet you.
  • Your car - any car, set up your way: the Modes tab shows it, with a few that suit the terrain, and its Fun-tab tune is what races. The air assist (on by default, Modes tab) helps every vehicle over the jumps and brows: it eases the gas or brake in the air and nudges the car level for the slope it's landing on.
  • The race: the countdown runs by itself (and starts over if you open the menu before GO). Marker stakes line both edges (flags across the dunes), and invisible walls 12 m out stop shortcuts. The board (top right) shows your time, the lap and your last and best laps; Backspace puts you back on the course whenever you like. At the flag you get your time, every lap and your personal best for that course in that car - then race it again, take a new course, change the settings or go back to free roam.
  • Course codes: every course has one (e.g. FOR-M3MR11-XRD30Q - the terrain, length, laps, corners, width, jumps, whoops and seed). It's on the results and in the Modes tab; type a friend's in to race the very same course.

Unicycle Racing

BMX on one wheel: a new BMX-style track is generated for every race - its own winding layout every time, red clay over a mown field, a start hill with a gate, berms, rollers, rhythm sections, doubles, tabletops and step-ups - and everyone races it on unicycles.

  • Everyone rides the same unicycle: Pedal (legs only, ~14 mph), Improved pedal (a geared hub and a sprinter, ~35 mph) or Jet (the model turbojet, ~85 mph). Your own vehicle is kept and comes back when you pick another map.
  • Size - BMX (a tight track for pedal power, a 3.6 m start hill) or Supercross (everything ~1.8 × as big - the one for the jet; picking the jet picks it). Length (a lap of ~360 / ~460 / ~650 m on BMX, ~1.8 × that on Supercross), laps (1 / 2 / 3 / 5), turns (Flowing - fewer, wider turns and longer straights, so more jumps · Windy - hairpins, S-bends and bends in the straights · Tight - one turn after another), jumps (small / medium / big doubles, tabletops and step-ups), rhythm sections (none / some / lots - runs of little rollers) and berms (flat, banked or steep).
  • How it's built: a random shape is grown cell by cell on an uneven grid - out in arms more than filling in, never with a hole - and the track runs round its edge, so it winds back and forth but never crosses itself, and the bits of it side by side are always a cell apart. The corners are knocked off true, the longer straights get bends and S's put in them, and every corner is rounded into an arc (a hairpin where two meet, a few metres straight between turns that go opposite ways). The underside of the first row of cells is the start straight: the gate on the start hill's level top, the face down into it, the grandstands on whichever side is clear. The tighter turns get berms - the bigger the turn, the higher the bank - and the jumps go only where it runs straight (rollers on the gentlest bends too). If two bits of track come close enough for one's mound to reach onto the other, that layout's thrown away and another drawn. The berms are bowls - ride up the bank and it carries you round faster than a flat turn would (the steering lets you turn as tight as the bank holds you). The track's surface is exact (not the terrain's 2 m grid), so the lips and landings are as sharp as they're drawn.
  • The race: eight to a row behind the gate; it drops at GO. The board shows your time, lap and laps; Backspace puts you back on the track. Air assist (on by default) keeps the unicycle level in the air for the landing - turn it off to fly it yourself. Results and personal bests work as for Offroad Racing.
  • Track codes (e.g. UNI-JSS2M1SW-39U - the unicycle, size, length, laps, jumps, rhythm, berms, turns and seed) are on the results and in the Modes tab; the Modes tab takes either kind of code.

🌐 Online Racing

Play online on the title screen (or Esc → Online): one player hosts a room and gets a 5-letter code, friends type it in to join. Needs an internet connection; it runs on Firebase (anonymous guest sign-in, a Realtime Database), and the single-player game never touches the network.

  • The host sets everything: the map (any map) and the car, set up their way (version / class / engine, fuel, transmission, tyres, off-road package and the whole Fun-tab tune). Everyone drives that exact car; when the host changes any of it, everyone follows (a new car or map reloads and rejoins by itself). Your paint, driver aids and controls stay yours, your own car and tune are kept, and leaving the room puts you back in them.
  • Race courses - the Windy Rally Stage, the Rally Stage, the Windy Mower Track and the Mower Track - are where the racing happens:
    • Start: everyone waits on the start grid (engines free to rev) till the host presses Start race; then 3, 2, 1, GO and everyone's dropped into drive. Each start is a new race: everyone back on the grid with 0 points.
    • Points for ground covered along the course: on the road 1 point a metre, times a streak that builds the longer you stay on it (+0.1 every 40 m, up to ×3). Off the road it's a quarter of that and the streak's gone. Hitting a straw bale costs 100 and the streak. Driving backwards earns nothing, and what you gave up has to be made up first. The board (top right) ranks everyone.
    • No shortcuts: invisible walls run well off the road (10 m past the edge on the rally stages, 6 m on the mower tracks) and follow your own bit of the course, so you can't cut across to another bit of it. They're no guard rail: touching one throws the car about and bleeds its speed away. A car that ends up past them is put back where it was.
    • Reset (Backspace) once every 30 s - the timer's over the minimap, bottom left.
  • Offroad Racing online: host on the Offroad Race map and the room races the course you set up in Game modes (it goes out as its course code, so everyone generates the same one), in your car and tune. Change the course and everyone follows. Start the race from the grid as above; places go by laps and ground covered, then by finishing time once people finish, and a reset back onto the course is allowed every 10 s. Anyone who missed the start - they joined late or their tab was away - is put on the grid with their clock running since GO.
  • Unicycle Racing online: host on the Unicycle Racing map and the room races your BMX track, everyone on the unicycle you picked for it - the same as Offroad Racing online, the gate dropping at GO. Leaving the room keeps you on the track; your own vehicle's back when you pick another map.
  • The others' cars are solid: a bump is shared by weight, and whichever game sees it sends the other car its share, so the car that's hit gets shoved. Their engines play from where they are, and their names float over them.
  • Graphics → Tyre smoke & dust → Small keeps a few little puffs at the tyres - no big drift smoke or dirt clouds to see through (the other players' cars too).

🕹️ Controls

Keyboard Controls

Action Primary Key Secondary Key
Throttle / Accelerate W Up Arrow
Brake / Reverse S Down Arrow
Steering A / D Left / Right Arrow
Handbrake Space —
Shift Up (Manual) E Right Shift
Shift Down (Manual) Q Right Ctrl
Clutch Z —
Neutral Rev Hold R —
Line Lock (Burnout) Hold B —
Parachute (Dragsters) F —
Nitrous (when set to the button) Hold N —
Rear Steer Mode (Monster Truck) G —
Rear Steer Left / Right (Monster Truck) Hold , / . —
Flip Back Over Steer left / right while on the roof or side —
Camera View C —
Look Back V —
Drive Mode (TC / ESC) T —
Headlights L —
Reverse (R ↔ D) X —
Auto ↔ Manual Shift M —
Engine Start / Stop I —
Reset Car to Road (put down tilted to the ground it's on, so a slope doesn't throw it up) Backspace —
Menu / Pause Escape —

Gamepad & Steering Wheel Support

Supports standard controllers (Xbox, PlayStation) and PC racing wheels (PXN, Logitech, Thrustmaster) via the Gamepad API. An in-game configuration wizard detects axes and buttons for steering, pedals, and shifter setups.


🛠️ Project Structure

├── index.html              # Main game entry point (modular)
├── HellcatDrive.html       # Single-file bundled distribution
├── build.js                # Bundler script (inlines src/*.js into HellcatDrive.html)
├── HellcatViewer.html      # 3D Vehicle inspector & model comparison tool
├── build-viewer.js         # Bundler script for vehicle viewer
├── src/                    # Game source modules
│   ├── audio.js            # Real-time procedural engine synth & tire FX
│   ├── carmodel.js         # Procedural 3D car mesh generation & materials
│   ├── dragster.js         # Procedural Top Fuel / Top Alcohol dragster models (body, engine, wing, chutes, growing slicks)
│   ├── puller.js           # Procedural pulling-tractor models (4× HEMI / 2× Allison V12, weight bar)
│   ├── kart.js             # Procedural go-karts (rental with wraparound bumper, TaG 125, KZ shifter and the supercharged kart)
│   ├── mower.js            # Procedural racing mowers (garden tractor, FX tube chassis, record mower; driver, deck, tyres)
│   ├── bike.js             # Procedural touring bagger (batwing fairing, V-twin, bags, the front end turning about the raked steering head, the rider)
│   ├── sandcrawler.js      # Procedural Sandcrawler (the rusting hull, its plates and details, four steering track units with running belts)
│   ├── tank.js             # Procedural main battle tank (hull, skirts, road wheels, tracks that run with the physics, the turret that follows the camera, camouflage shader)
│   ├── crushers.js         # Procedural Car Crushers 2 cars (couch, egg, banana, Blue Bird, GT-R widebody, microcar, porta potty, scooter, glass wedge), the Cybertruck, the Ram 1500, the Prius, the 67, the Silver Bullet, the hot rod, the Chevelle, the Superbird, the RC truck, the tour coach, the derby bus, the X-34 landspeeder and the diesel dually
│   ├── monster.js          # Procedural monster truck (tube chassis, 4-links and shocks that follow the suspension, 66 in tyres, see-through cab, livery; the WRECKONING pickup, the AVENGER coupe and the ABLAZE jet fire truck bodies)
│   ├── offroad.js          # Procedural trophy truck and dune buggy (long-travel arms, axles and shocks that follow the suspension, liveries)
│   ├── unicycle.js         # Procedural unicycle and its rider (the wheel, cranks and pedals turning with the physics' four wheels, the legs following the pedals; the jet version's turbojet and flame)
│   ├── atv.js              # Procedural ATV (plastics, A-arms and shocks that follow the suspension, the bars turning on the raked column, the rider leaning into turns)
│   ├── fx.js               # Smoke, dust, skidmarks and flames (smoke/dust drawn to a screen-fill budget)
│   ├── game.js             # Core game loop, scene management, cameras, and menus
│   ├── hud.js              # Gauges, tachometer, minimap, and telemetry HUD
│   ├── input.js            # Keyboard, gamepad, and steering wheel input handling
│   ├── net.js              # Online rooms over Firebase (guest sign-in, Realtime Database), loaded only when you go online
│   ├── vehicle.js          # Vehicle dynamics, suspension, engine torque curves, transmission
│   ├── worldgen.js         # Procedural road network, elevation, terrain, the Monster Arena's jumps / crushable cars, the Mower Track, the rally stages and the windy mower course (closed-loop tracks), the Sand Dunes, Offroad Racing's generated courses, Unicycle Racing's BMX tracks
│   └── worldrender.js      # Three.js world rendering, lighting, and foliage instancing
├── test/                   # Physics benchmarks and audio sanity tests
└── viewer/                 # Standalone vehicle model viewer files

📦 Building

To re-bundle the source files into the standalone HTML distributions:

# Bundle main game
node build.js

# Bundle 3D vehicle viewer
node build-viewer.js

🧪 Testing

Simulation benchmarks and synthetic audio tests can be executed via Node.js:

node test/dragster-test.js
node test/monster-test.js
node test/kart-test.js
node test/mower-test.js
node test/cc-test.js
node test/puller-test.js
node test/sim-test.js
node test/audio-test.js
node test/sand-test.js
node test/atv-diesel-test.js
node test/prius-67-bullet-test.js
node test/hotrod-chevelle-unicycle-test.js
node test/superbird-test.js
node test/rc-test.js
node test/bus-test.js
node test/landspeeder-firetruck-test.js
node test/sandcrawler-test.js       # the Sandcrawler: loads, 0-30 km/h and top speed on tarmac and sand, braking, full-lock turns, left and right, sand slopes up and down (the speed the drive holds, the fuel never cut), across a slope, the real dunes
node test/pops-test.js
node test/offroad-course-test.js    # Offroad Racing: every terrain / length / corners - generation time, length, grades, jumps, surfaces, codes
node test/offroad-drive-test.js     # Offroad Racing: a driver bot takes the trophy truck round a lap of each terrain (CARS, BIOMES, LEN, SEED)
node test/unirace-track-test.js     # Unicycle Racing: every size / length / turns / jumps / berms - the gate level, the start hill, no steps in the surface, the mounds clear of the track beside them, the stands, codes
node test/unirace-ride-test.js      # Unicycle Racing: a rider bot laps each unicycle on flat / banked / steep berms (VERS, TURNS, SIZE, LEN, BANK, SEED)
node test/buggy-sand-test.js        # the dune buggy in sand, each engine and tyre set, Track and Off: turns, lane changes, lift-offs - slides, spins
node test/reset-slope-test.js       # resetting on a 10-30 deg slope: put down tilted to the ground, not thrown up off it

The tyre look test runs the game in headless Chromium, so it needs Playwright (npm i -D playwright && npx playwright install chromium; without it, it skips). It builds every vehicle - every title-screen car and More Cars card, each version - with every tyre choice the game offers it (the game's tyreChoices()), and fails if two choices are drawn the same. A new vehicle is checked automatically; a new tyre option belongs in tyreChoices() in src/game.js, and the vehicle's model has to show it in its setTires(front, rear):

node test/tyre-look-test.js                      # all vehicles
ONLY=bike,unicycle node test/tyre-look-test.js   # just these

About

AI-Generated 3D Car Game built with Three.js and Web Audio API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages