Minh Nguyen
Published on

Midnight Apex

Midnight Apex is a 3D driving and flight simulation that runs in the browser. Inspired by Initial D mountain passes and late-night arcade racers, it pairs 19 destinations and famous circuits with a custom 2026 Tesla Roadster—complete with SpaceX cold-gas thrusters, aerial flight, and mid-air flips—alongside a high-detail Trueno HQ for touge drifting, live-generated lo-fi radio, and a curated soundtrack player.

Play Midnight Apex

Product Videos

2026 Tesla Roadster on DEMO 26 (McGregor Demo Loop) — cold-gas takeoff, a mid-air flip, and aerial flight scored with Night Drive Arcade.

Trueno HQ (AE86) drifting Akina Downhill hairpins at night with tire smoke and pop-up headlights, scored with Neon Rain.

Cruising rain-slick Neo-SoMa & Chinatown in Neo San Francisco at night scored with Night Drive in Tokyo.

2026 Tesla Roadster & Flight Mode

The centerpiece vehicle is a custom, concept-art-accurate 2026 Tesla Roadster (car_roadster.glb.gz) built in Blender—featuring a faceted cyber-wedge body, triangular recessed front LED headlamps, smoked-bronze panoramic visor canopy, 5-spoke black-star-over-silver-aero wheels, high-angle butterfly doors (O), an outward-flared active rear wing, brushed-silver ROSTR plate, four upper titanium cold-gas nozzles, four lower recessed suction fans, and four wheel-inboard vertical hover rocket bells—paired with an EV powertrain (520 kW, 1,850 kg, 1.14 grip coefficient) and exclusive SpaceX cold-gas thruster physics:

  • Cold-Gas Boost, Aerial Flight & Flips: Hold Shift for cold-gas thrust on the road, press F to take off and climb, Space/X to descend, Y for Auto-Flight, Z for a mid-air flip, and Q/E (or double-tap for barrel rolls) to bank in mid-air.
  • McGregor / Hawthorne 2026 Proving Ground (DEMO 26): A dedicated proving ground featuring launch-straight steel guide rails, LED gantry arches, illuminated aerial flight hoops, and a SpaceX Mechazilla pad.

Touge Drifting with Trueno HQ

Midnight Apex features a high-detail Trueno HQ (trueno_hq, car_trueno.glb.gz) alongside the Sprinter 86 (ae86), complete with articulated pop-up headlights, doors, and hood:

  • Drift Physics & Scoring: Kick out the rear with Space handbrake or toggle Auto-Drift (G) to hold sustained slip angles through mountain hairpins—complete with countersteer physics, dual tire smoke plumes, persistent skid marks, and a live Drift HUD tracking points, multiplier, and slip angle.
  • Night Touge Passes: Built for classic downhill runs on Akina Downhill and the rain-slick Tsukimi Skyline pass.

Music & Live Lo-Fi Radio

Midnight Apex ships with both curated soundtrack rotation and a procedural Web Audio synthesizer:

  • Curated Soundtrack Rotation: Four full tracks—Night Drive Arcade, Night Drive in Tokyo, Neon Rain, and Sunset Coastal Highway—streamed through the Web Audio master bus with an interactive track picker, next/previous controls (N/V), and decodeAudioData fallback.
  • Procedural Live Lo-Fi Radio: A 74 BPM generative Web Audio engine synthesizing Rhodes-style electric piano chord progressions, FM basslines, vinyl crackle, tape low-pass filtering, convolution reverb, swing-quantized drums, and pentatonic bell melodies.
  • Mobile Audio Lifecycle: Automatic AudioContext suspend and resume when switching apps or tabs.

19 Destinations & Famous Circuits (39 Routes)

  • World Cities & Passes (City, Mountain & Coast): San Francisco, Amalfi Coast, Paris, Tokyo, Seoul, New York, Rio de Janeiro, Dubai, Sydney, Miami, and Hawaii.
  • Touge & Neon Expansions: Akina Downhill (Gunma hairpins and gutters), Tsukimi Bay (wet midnight skyline), Neo San Francisco (Neo-SoMa & Chinatown, Cyber Twin Peaks, Neo Golden Gate), and Roadster Demo (McGregor Demo Loop).
  • Iconic Racing Circuits: Laguna Seca (WeatherTech Raceway & Corkscrew), Spa-Francorchamps (Eau Rouge & Raidillon), Circuit de Monaco, and Nürburgring Nordschleife ("Green Hell"), complete with circuit racing grooves, checkered start/finish lines, starting gantries, and corner tire barriers.

Vehicles, Weather & Modes

  • 9 Vehicles: 2026 Tesla Roadster, Sprinter 86, Trueno HQ, RX-7, GT-R (with toggleable light bar), Coupé, Hatch, SUV, and Motorbike with procedural Blender riders (rider_her and rider_him) and code fallbacks.
  • Atmosphere & Physics: Four weather conditions (Clear, Rain, Fog, Snow), three times of day (Day, Golden Hour, Night), PBR road and terrain textures, automatic or manual shifting (E/Q), Auto-Drive, Auto-Drift, and optional Police Chase mode.
  • Cruise Together & Leaderboard: Real-time WebSocket multiplayer with live player vehicles, name tags, and chat, alongside a serverless lap leaderboard backed by Upstash Redis (laps driven with auto-drive enabled are excluded).

Meet the AE86

The hero car of the genre gets its own 3D showroom: a 1985 Toyota Sprinter Trueno GT-Apex (AE86) you can orbit, inspect part by part, and rev. Flip the pop-up headlights, roll it down a touge or a neon parking area, and jump between camera presets from the cockpit to a close-up of the wheels.

Open the AE86 showroom

How It's Built

  • Zero-Build Runtime: A single-page three.js r160 app compiled from modular source files (src/ via sh build.sh) with UnrealBloom post-processing, GTAO ambient occlusion, and quantized gzipped .glb.gz assets (KHR_mesh_quantization—no WASM decoder required).
  • Serverless & Realtime: Vercel serverless functions (/api/health, /api/leaderboard, /api/laps) plus a standalone Node WebSocket server (/ws) for multiplayer cruising.
  • Native Mobile Ports: Wrapped for iOS (Swift WKWebView) and Android with a native haptic feedback bridge.