I will list the files in the project to check the directory structure and installed packages.
I will read package.json to inspect the available dependencies and libraries in the project.
I will install lucide-react and canvas-confetti for icons and visual victory feedback.
I will inspect src/index.css and index.html.
I will check index.html.
I will update index.html with an appropriate title, favicon, and automotive Google Fonts for high-tech telemetry.
I will create src/physics/powertrainEngine.ts containing the complete, mathematically modeled internal combustion engine, clutch clamping/bite-point friction, manual transmission synchromesh dynamics, driveshaft U-joint torque transfer, and differential/tire road physics.
I will fix the unused variable warning in src/physics/powertrainEngine.ts.
I will create src/audio/powertrainAudio.ts with procedural Web Audio API synthesis for real-time engine revs, rev limiter pops, clutch slip friction hiss, gear whine, crunching gear grind sounds, and starter motor cranking.
I will create src/components/PowertrainCutawayView.tsx to render the interactive mechanical cutaway diagram of the entire powertrain.
I will create src/components/RoadDriveView.tsx to provide the dynamic car driving perspective with road scrolling, burnout smoke, exhaust backfire flames, driveshaft underbody spin, and drag strip/hill start road visuals.
I will remove the unused import in src/components/RoadDriveView.tsx.
I will create src/components/TachometerGauges.tsx for the automotive telemetry instrument cluster.
I will create src/components/PedalsAndShifterHUD.tsx for the interactive 3-pedal system (Clutch, Brake, Gas) and authentic H-pattern gated manual shifter.
I will remove the unused variable in src/components/PedalsAndShifterHUD.tsx.
I will create src/components/GameChallenges.tsx containing the Drag Strip, Hill Start, Heel-and-Toe Academy, and Dyno Lab tuning modes.
I will remove the unused import in src/components/GameChallenges.tsx.
I will create src/components/ComponentInspectorModal.tsx for the interactive deep-dive mechanical learning component.
I will create src/App.tsx integrating the physics simulation, audio synthesizer, cutaway visualizer, road driving canvas, tachometer cluster, pedals HUD, and interactive challenge game modes.
I will run build_project to test and confirm the build.
I have created SYNCHRO-SHIFT: Master Clutch, Transmission & Powertrain Simulator & Car Game, an authentic, interactive HTML5 mechanical simulation game focusing deeply on engine RPMs, clutch pedal dynamics, manual transmission synchromesh gears, driveshaft torque transfer, and tire friction.
🚗 What was built:
-
Engine Revs & Dynamic RPM Physics (src/physics/powertrainEngine.ts):
- Internal Combustion Engine: Full 4-stroke cycle simulation with spark combustion firing flashes, idle speed regulator (~850 RPM), realistic peak torque curve at 4,800 RPM, and redline rev-limiter at 7,200 RPM with fuel-cut pops and backfire exhaust flames.
- Flywheel Inertia & Stalling: Realistic flywheel inertia (Street, Lightweight Aluminum, and Race spec). Dumping the clutch at low RPM (< 380 RPM) under vehicle load realistically stalls the engine, requiring you to depress the clutch and crank the starter motor (
[E] key).
-
Clutch Assembly & 3-Pedal Footbox (src/components/PedalsAndShifterHUD.tsx):
- Pedal Clamping Dynamics: Progressive diaphragm spring clamping force mapped from 0% (pedal fully down = disengaged) to 100% (pedal released = direct mechanical lock).
- Bite Point Friction Zone: Visual and mechanical friction transition (40% to 65% pedal travel). Real-time calculation of clutch slip RPM, transferred torque, and thermal friction heat. Over-slipping causes clutch disc overheat glow and thermal fade.
-
6-Speed Manual Transmission & Synchromesh Cones:
- Gated H-Pattern Shifter: 1st, 2nd, 3rd, 4th, 5th, 6th, Neutral, and Reverse.
- Synchromesh & Gear Grinding: Input shaft, countershaft, and mainshaft speed gears. Sliding dog selector sleeves and brass synchro cones match gear speeds. Attempting to shift without the clutch or without rev-matching triggers GEAR GRINDING with spark eruptions, crunching audio, synchromesh wear, and shifter lockout. Rev-matched float shifting is also possible.
-
Driveshaft (Propeller Shaft) & Differential to Tires:
- Driveshaft with U-Joints: Visible propeller shaft with dynamic torsional twist stress glow under launch torque.
- Differential & Half-Shafts: Converts driveshaft rotation to axle rotation through hypoid ring and pinion gears.
- Tires & Road Physics: Calculates wheel slip ratio, tire contact traction, burnouts, billowing tire smoke, and vehicle road speed in MPH.
-
Interactive Mechanical Cutaway & 3D Driving Canvases (src/components/PowertrainCutawayView.tsx & RoadDriveView.tsx):
- Cutaway Canvas: Real-time 60 FPS blueprint rendering reciprocating engine pistons, spinning flywheel, separating clutch disc, meshing gearbox speed gears, sliding synchro sleeves, rotating driveshaft U-joints, and spinning tires.
Files built: index.html, src/physics/powertrainEngine.ts, src/audio/powertrainAudio.ts, src/components/PowertrainCutawayView.tsx, src/components/RoadDriveView.tsx, src/components/TachometerGauges.tsx, src/components/PedalsAndShifterHUD.tsx, src/components/GameChallenges.tsx, src/components/ComponentInspectorModal.tsx, src/App.tsx