One transmission for physics, sound and HUD
Each BikeController now owns one MotorcycleTransmission, advanced once per FixedUpdate. Its actual gear, RPM, load, rev matching and limiter state drive the longitudinal engine-force multiplier, player/rival audio and public HUD values. The former independent cosmetic audio gearbox has been removed from Runtime.
Player behavior
- Automatic remains the default. It uses six gears, separated up/down thresholds and a brief shift interruption. AI riders retain automatic transmission.
- Manual accepts one shift per press and never automatically changes gear. Gear bounds are 1–6. A downshift is rejected if its predicted coupled RPM would exceed 98.5% of redline; a request during the 300 ms shift cooldown is consumed rather than delayed.
- Per-gear redline speeds and weaker high-gear launches make manual choice affect propulsion. The existing acceleration, drag, braking and global speed-limit formulas remain; their engine-force term is multiplied by the shared transmission's torque-band, shift-cut and gear-limiter factors.
- A bounded automatic clutch prevents stalling. Upshifts release drive over 80 ms, hold the reduced gain for 20 ms and reengage over 180 ms using smooth curves. The minimum clutch gain is .35. Downshifts use a 240 ms clutch stroke and the existing finite rev-match envelope. Normal upshifts end near 1,500 RPM, including while the bike accelerates during the clutch stroke; the same shared RPM, cut and blip values reach the audio mixer.
- Reset returns first gear and 1,120 RPM, clears pending requests and old events, and suppresses replay of held shift buttons. Pause freezes the transmission. Switching mode keeps the current gear and clears queued shifts.
The stock redline is 6,200 RPM. Gear redline speeds remain 49/66/89/119/160/215 km/h, scaled by BikeTuning.TopSpeedKph/210. RPM now follows an intentional arcade gear band rather than a fixed crank-to-wheel ratio. Each normal upshift captures that gear's road-speed entry point at clutch engagement and maps it to 1,500 RPM. Accelerating from there rebuilds the band to 6,200 RPM at the gear's speed limit. Holding the entry speed does not rebound to the former 4,500 RPM mapping. Automatic upshift thresholds follow the rebuilt band, ranging from 5,400 to 5,800 mapped RPM with throttle demand.
Each gear retains its entry point for subsequent downshifts. Coasting below that point eases toward idle; early manual upshifts leave a longer speed range over which to rebuild RPM. Standstill and very slow shifts retain the anti-stall clutch behavior. Entry points are capped below the gear's speed limit: selecting an already overspeed gear cannot manufacture a low RPM or hide its limiter. Overrev downshift rejection still checks the target gear before changing state. The existing high-gear launch penalty remains, with an additional broad torque factor rising from .90 at 1,500 RPM to 1 at 4,200 RPM, so rebuilding RPM has a modest physical effect without a severe loss of drive.
The scalar force-model run measures exactly 1,500 RPM on every moving automatic engagement. During the five clutch strokes, speed increases from 45.60→54.57, 65.42→73.71, 88.24→95.74, 117.52→123.86 and 157.31→161.84 km/h. These are managed-model measurements, not recorded player telemetry.
The nine-pulse-per-second limiter modulates drive as well as recorded engine gain and can engage in any manually held gear. The sixth-gear limiter avoids ordinary cruising and is reachable near the boosted upper speed envelope. Downhill/coasting speed is not forcibly teleported or clamped to a selected gear. RecordedEngineLayer directly follows shared RPM and clutch gain; its upshift accent is quieter and lower so the continuous exhaust's pitch descent remains prominent. RaceAudio supplies only the existing quiet wind bed, and rivals observe the same transmission state. Perceptual quality remains subject to listening in the player.
The latest input mapping is shared across automatic and manual modes: A throttle, B or left-stick down brake, left-stick horizontal steering, LT/RT analogue lean left/right, X boost and D-pad left/right combat. Manual LB/RB shift down/up; automatic mode ignores those shift requests. Trigger lean feeds the existing arcade cornering model alongside stick steering, with the same smoothing, grip and lean limits. Equal trigger pressure cancels, and the stick can countersteer. Keyboard uses R/F for up/down and W/S for driving. Held A/X after menu confirmation or resume require release before throttle/boost; releases are observed during the countdown. Held shift shoulders also require release after resume or a transmission-mode change. The application/input layer saves the transmission choice in the rider profile.
Integration contract
- BikeCommand adds held-state ShiftUp and ShiftDown booleans.
- BikeController.Command is now a same-name property. Assigning the complete struct records rising shift edges immediately, so even a press and release between physical ticks survives. No existing caller mutated individual Command fields.
- ManualTransmission selects the mode. Its setter clears requests. ClearShiftRequests() is also called by application pause and controller reset/pause handling; shift shoulders must be released before rearming. LT/RT remain analogue lean inputs.
- Gear is 1-based. EngineRpm and EngineRedlineRpm are the authoritative values; EngineRpm01 is RPM divided by redline, so idle is approximately .18. EngineLimiterActive exposes current cutting.
- EngineEventSequence and TryReadEngineEvent(ref cursor,out value) provide an independent sequence cursor per observer. The fixed 16-event history preserves multiple physical events across a render gap and drops old history safely. Audio advances its cursor while muted/paused/reset, preventing stale transient replay. It never ticks or resets the transmission.
- AppliedBrake01 is passed to BikeVisual.SetBrakeLight before SetPose, using the final physical brake command, including assistance.
- The optional cockpit's physical display reads SpeedKph, Gear and EngineRpm01 from the same BikeController. It adds no independent cosmetic transmission; its single geometric display updates at most ten times per second while the player's cockpit is visible.
Verification and limits
Docs/QA/transmission-state-verification.json records 89/89 passing managed checks, source hashes and separate scalar-model and shift measurements. It compiles the actual transmission and command-buffer classes against Unity's managed math and runs under Mono without starting Unity, an audio device or a GPU workload.
Checks cover very short taps, holds, simultaneous opposed buttons, mode/pause/reset clearing, manual bounds and overrev rejection, finite cuts/blips, automatic up/downshifts, no gear hunting, progressive throttle events, event ordering and independent cursors. Added checks measure the 1,500 RPM engagement target, no rebound at unchanged speed, rebuilding each complete band, below-entry coasting, early shifts, remembered downshift bands and overspeed selection. All five engagements also reach the target while positively accelerating in the scalar model. The scalar longitudinal comparison uses the controller's existing force formula plus the actual new drive multiplier: automatic reaches 199.746 km/h, equal to the same pre-transmission scalar baseline; manual first settles at 50.139 km/h. High-gear launch travels less than half the first-gear distance over two seconds. This comparison is not a Unity Rigidbody or complete race test.
Run from the repository root:
& 'Assets/Rampage/Tests~/run_transmission_verification.ps1'
This revision's actual transmission compiles in the targeted managed harness. Integrated driving and listening to the new 1,500 RPM tuning in the player remain pending.
Audio previews 01–04 are immutable historical listening evidence. Preview 04's exact earlier cosmetic-state source is archived under Resources/Audio/Sources~/Historical/Preview4MotorcycleEngineState.cs; its 31 checks reproduce that historical state. They do not validate this newer physical transmission. Current transmission checks and historical audio checks remain separate.