Skip to content

Repository files navigation

SPLINE RUSH

Find your line. Feel the limit.
A free browser racing game. Nine cars. Six circuits. One more lap.

Release v1.1.0 Original game code: MIT License Tests and build

PLAY NOW · Run locally · What's new · Game & asset credits · Feedback

Follow @ToolBraidComp on X Buy me a coffee — optional support

Spline Rush brings championship racing, personal-best ghosts and a garage of detailed cars to the browser. Built with ChatGPT 6 Astra Ultra, Three.js, WebGPU and TSL, it combines procedural circuits with artist-made car models, scanned surfaces and recorded ambience. No account is needed to play.

Actual Spline Rush gameplay: Aventador on the coast, 458 Spider in the mountains, Apex R in the desert, Gemera in the rain, P1 GTR in the neon city and Vector 01 on the oval.

Watch the three-minute gameplay tour · Six cars, six circuits, chase camera.

Run locally

Requires Node.js 22.12+; Node.js 24 is used by the repository's automated checks.

git clone https://github.com/Maharajahu/Spline-Rush.git
cd Spline-Rush
npm ci
npm run dev

Open the localhost address printed by Vite. Chrome or Edge can use WebGPU when the active GPU and driver support it. Three.js can fall back to WebGL2; the active backend appears in the menu. The game does not change Windows GPU assignments.

On Windows, after installing dependencies, Start Spline Rush.cmd starts the server and opens the game. Keep its terminal open while playing.

npm test
npm run build
npm run preview

The production output is dist/. Serve it over HTTP; opening index.html with file:// does not load ES modules correctly. Once dependencies are installed, building and playing need no internet connection.

Drive

Input Action
W / up arrow Accelerate
S / down arrow Brake
A, D / left, right arrows Steer
Space Handbrake
C Chase, wide chase (further behind), hood, onboard camera
R Recover car; invalidates the current lap
Escape / P Pause or resume
M Mute
Gamepad left stick / RT / LT / A Steer / accelerate / brake / handbrake

Touch controls appear on touch devices. Audio starts after a user gesture.

Modes and content

  • Quick Race: three laps against eight drivers with different pace, aggression, consistency, passing and defending behavior.
  • Time Trial: continuous running with a saved personal-best ghost; pause and select Finish Session to see results and replay.
  • Championship: one qualifying lap establishes the grid, followed by three races on different circuits. Points: 25, 18, 15, 12, 10, 8, 6, 4, 2.
  • Six circuits: Azure Coast, Alpine Reach, Solstice Canyon, Verdant Pass, Nocturne Grid and Velocity Ring. Real spline outlines appear in the menu and minimap. Each circuit has its own elevation, banking, environment and named corners; four include tunnels.
  • Garage: Nine cars, including detailed 458 Spider, McLaren P1 GTR, Koenigsegg Gemera and Aventador SVJ Black Ghost models. Imported geometry keeps independently steered wheels, spinning discs, fixed calipers, suspension, paint and working lights. Source credits are available from the garage.
  • Lap/sector timing, position feed, live minimap, session replay cameras and local records. Records and ghosts are scoped to the circuit and car and stored in browser local storage. Clearing browser data removes them.

Under the hood

Three.js 0.185.1, Vite 8.2.2, a 120 Hz fixed-step simulation and four quality presets. High is the default; adaptive quality can reduce effects when frame time rises. Start with Low or Medium on integrated graphics.

Rendering, physics, audio and quality budgets

The Ultra graph includes GTAO, screen-space reflections, Karis-weighted bloom, velocity motion blur, depth of field, shadowed volumetric god rays, heat shimmer, metered exposure, color grading, grain, vignette and temporal antialiasing. Lower tiers use FXAA and a smaller effect budget. The scene uses a Rayleigh/Mie analytic sky, stars, moon, a 24-minute day/night cycle, time-dependent PMREM lighting, wet asphalt, reflective puddles, persistent fading skid marks and procedural water.

Preset Shadow map per cascade Cascades Effect particles Rain particles
Low 1024² 2 384 700
Medium 1536² 3 900 1600
High 2048² 4 2200 3800
Ultra 4096² 4 8192 14000

WebGPU uses storage-buffer compute for smoke, sparks, loose-surface debris and spray. Rain moves in the vertex shader. WebGL2 uses the bounded CPU fallback for the same particle pool. CSM shadow origins snap to texels. Low caps the internal height at 720 pixels, Medium at 1080; UI text stays at native resolution. These tiers omit unused render attachments, and Low uses global IBL without the local reflection capture. Ultra renders at the viewport's physical resolution, capped at device pixel ratio 2: use a 3840×2160 viewport for native 4K. Adaptive Quality lowers the preset after sustained frame-time pressure; disable it to keep Ultra fixed. High is the default. A 4K/120 fps target is not a measured performance guarantee.

The driving model runs at 120 Hz in the circuit's banked spline frame, with four spring/damper struts, longitudinal/lateral load transfer, a combined-slip tyre friction budget, ABS, traction control, surface grip, aerodynamics, collisions and damage. It is an accessible circuit-based vehicle model. Ghosts sample at 20 Hz; the rolling replay stores up to three minutes at 30 Hz. Screen-space reflections contain visible screen geometry; PMREM provides the broader environment reflection.

Audio combines licensed coastal-wave and tyre-skid recordings with AudioWorklet engine profiles and nine spatial emitters. Recorded tyre skids follow physical contact slip, wetness and speed; normal braking alone does not trigger squeal. Engines are synthesized, with relative-velocity Doppler, cockpit filtering and tunnel reverb. The game does not include authentic recording banks for each car's engine.

The world uses CC0 2K asphalt, weathered concrete and coastal rock maps, a detailed rock model, and a photographed HDR sky blended with the analytic night atmosphere. Guardrails have a W profile, posts, bolts and reflectors; tunnel fittings and concrete seams follow the circuit. Four tyre ribbons follow independently sampled road contacts and measured tyre widths, fading over 90 seconds. Locked wheels stop rotating, and exhaust vapour emits at the measured outlets with cold/humid-air response. These are practical real-time approximations, not a full thermal tyre or fluid simulation.

Source

  • src/main.js: simulation ownership, race progression, input, timing, cameras, replay.
  • src/physics.js: driving, suspension, AI and collisions.
  • src/controls.js: shared keyboard, touch and gamepad steering convention.
  • src/tracks.js: six circuit definitions, terrain and procedural scenery.
  • src/cars.js: parametric bodywork, materials, lights and animation.
  • src/graphics.js: renderer, atmosphere, effects, particles, quality ladder.
  • src/audio.js, src/records.js: synthesized audio and local persistence.
  • src/ui.js, src/style.css: menu, garage, settings, HUD and results.

The development server exposes read-only state at window.splineRush and development-only deterministic verification helpers. Those helpers are omitted from the production build.

Contributing

Bug reports and focused pull requests are welcome. Include your browser, active graphics backend, quality preset, car, track and reproduction steps in an issue. See CONTRIBUTING.md for development and validation.

Credits and license

Original game code and documentation are available under the MIT License. Third-party models, textures, HDR imagery and audio retain their own licenses; they are not relicensed by this repository.

Thanks to Three.js, the WebGPU specification and browser teams, Poly Haven, and every contributing asset creator. Car model credits include vicent091036, ALIEEEN / Desiccated_Lemon, and SDC / 3Duae via BlackCube. ASSET_CREDITS.md records sources, licenses and modifications; the same credits are accessible in the game. No artist or vehicle-manufacturer endorsement is implied.

Support the next lap

Spline Rush is free to play. If you enjoy it and want to support its development, you can buy me a coffee. Support is optional and does not unlock any features.

Built with ChatGPT 6 Astra Ultra, Three.js and WebGPU. Game and asset credits include the creators, original sources and licenses for the car models, environment assets and recorded sounds.

About

A free browser racing game built with Three.js, WebGPU and ChatGPT 6 Astra Ultra. Nine cars, six circuits, championship racing, time trials and cinematic cameras.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages