Roadster C-Ramp
tesla-roadster-game.vercel.appOverview
Just a fun project, not made by or connected to Tesla. Can a car drive up a wall and hang from the ceiling? In this game it can: a fan under the car sucks it onto a 21 m C-shaped ramp so it hangs upside-down at the top. From there you launch off, let the thrusters turn the car upright and hover down, then kickflip over five parked cars. It runs in the browser with nothing to install, on a computer or a phone.
Main Features
- Three stunts: hang upside-down at the top of the C-ramp, launch and hover down, kickflip over the lineup
- A 3-round tutorial, with a "Show me" button that drives the car for you
- Four camera views: chase, side, crane and cockpit
- Night, morning and day
- A dashboard with speed, altitude, G-force, fan suction and cold gas left
- Sound made live in the browser: motor, fan, thrusters and landings
- Touch controls on phones and tablets: a joystick and hold-buttons
- Free in the browser, nothing to download
How the physics works
- Fan suction: a 40 kN fan pulls the car onto the ramp, about 2 G, so it stays on even upside-down. The closer the car is to the surface, the stronger the pull.
- Cold-gas thrusters: ten small jets lift the car, slow its fall and push it forward; the gas runs out and refills slowly.
- Turns itself upright: let go of the keys in the air, and the car rolls back upright before it lands.
- Same on every screen: the physics moves in 240 small steps a second, whatever the screen's frame rate, so the stunts work the same on a fast computer and a phone.
- Estimated numbers: the mass (2,100 kg), the fan force and the thrust are my estimates; there are no official figures.
Structures
- 1 file
- the game: one
index.html(HTML, CSS and JavaScript), no build step
- the game: one
Tech Stack & Libraries
| Layer | Built with |
|---|---|
| 3D | Three.js 0.160 (from the jsDelivr CDN) · bloom glow |
| Game | JavaScript modules · fixed-step physics written by hand |
| Sound | Web Audio API, no sound files |
| Hosting | Vercel (static page) |
| Promo | HyperFrames (video) · Puppeteer (recording gameplay) |
Architecture
Solid arrows are calls, and the answer comes back on the same line; dashed arrows are sent on their own.