Drift Audio
Reference for `gameplay_drift_sounds`, which manages all audio feedback for the drift system including continuous drift sounds, tier/combo sounds, and crash/spinout audio cues.
Reference for gameplay_drift_sounds, which manages all audio feedback for the drift system including continuous drift sounds, tier/combo sounds, and crash/spinout audio cues.
Overview
Handles continuous drift sound (pitch-scaled by performance factor), one-shot sounds for tier progression, combo changes, drift cancellation, and point confirmation. Includes an imgui debug panel for simulating drift audio.
Sound Assets
| Key | Event Path |
|---|---|
continuousDrift | event:>UI>Career>Drift_Counting |
newTier | event:>UI>Career>Drift_Tier |
newCombo1 | event:>UI>Career>Drift_Combo_1x |
newCombo5 | event:>UI>Career>Drift_Combo_5x |
driftCanceled | event:>UI>Career>Drift_Canceled |
pointsConfirmed | event:>UI>Career>Drift_PointsReceived |
Exports
| Function | Signature | Description |
|---|---|---|
onUpdate | (dtReal, dtSim, dtRaw) | Per-frame: setup continuous sound, manage play/pause state, run debug UI |
onExtensionUnloaded | () | Stops continuous drift sound |
getDriftDebugInfo | () | Returns {default=false, canBeChanged=true} for debug toggle |
onNewDriftTierReached | (tierData) | Plays tier sound with volume scaled by tierData.order - 1 |
onDriftNewCombo | (data) | Plays combo sound - newCombo1 if data.comboChange <= 0.2, else newCombo5 |
onDriftCrash | () | Plays drift-canceled sound |
onDriftSpinout | () | Plays drift-canceled sound |
onDriftDebugChanged | (value) | If false, stops drift simulation |
onDriftCompletedScored | (data) | Plays points-confirmed sound |
M.getDriftDebugInfo | () | - |
M.onDriftCompletedScored | (data) | - |
M.onDriftCrash | () | - |
M.onDriftDebugChanged | (value) | - |
M.onDriftNewCombo | (data) | - |
M.onDriftSpinout | () | - |
M.onExtensionUnloaded | () | - |
M.onNewDriftTierReached | (tierData) | - |
M.onUpdate | (dtReal, _dtSim, dtRaw) | - |
Key Behaviors
- Continuous drift sound pitch is controlled by
gameplay_drift_scoring.getDriftPerformanceFactor() - Sound is silenced when drift system is paused or frozen
- Debug panel allows simulating drift with configurable speed, angle, and wall distance
See Also
- drift/bounds - Drift Zone Boundary Detection - Related reference
- drift/destination - Race Path & Wrong-Way Detection - Related reference
- drift/display - Drift UI & HUD Management - Related reference
- Gameplay Systems Guide - Guide
Drift Scoring System
Reference for `gameplay_drift_scoring`, which calculates continuous drift scores, manages the combo system, tracks tier progression, handles stunt zone bonuses, and determines career rewards.
Drift Stalling
Reference for `gameplay_drift_stallingSystem`, which penalizes repetitive drift behavior by reducing the score multiplier when the player repeats the same stunts without variety.