Friday, April 21, 2023

Mario Kart and the Doppler Effect [VIDEO SUMMARY]

Mario Kart and the Doppler Effect is a video by Scruffy, where he explains his favorite little detail of the sound design in Mario Kart. The video focuses on the natural phenomenon where the sounds from a fast-moving object change in frequency as it moves toward or away from an observer, known as the Doppler effect.


Scruffy explains that the Doppler effect is integral to the feeling of going fast, and thus it’s key to racing games, so much so that Mario Kart games often open with the sound of karts speeding by, demonstrating the effect. He further explains that in Mario Kart Wii, the developers really went all out with the Doppler effect, where kart engines, kart horns, even the sounds of an Invincible Star or a Mega Mushroom, all change pitch depending on their velocity relative to the listener. Scruffy points out that none of this is pre-baked into the sound effects, as there’s a system handling this in real-time.

Scruffy then goes on to explain how the Doppler effect occurs when an object is moving while generating waves. He mentions that to measure the relative velocity between two objects, we’d need to figure out how fast one is approaching or moving away from the other. He explains that we can start small, with some visual aid, and construct this sort of system. He then goes on to explain how to implement the Doppler effect in the game by measuring the distance between the two karts and calculating the rate of change, in units per frame.

Scruffy explains that if VelocityRelative equals zero, that means the karts are not getting any closer or farther from each other, so the sound plays at regular speed, 100% speed. And conversely, if VelocityRelative is negative, that means the distance between the karts is decreasing, and that corresponds to a sound speed greater than 100%. The exact mapping of sound speed will be weird here since sound “travels” instantly, there’s no delay. So, how you map VelocityRelative to sound speed kinda depends on preference: how much do you want to exaggerate the Doppler effect?

Scruffy then addresses the issue of multiple audio listeners in the game. He explains that in splitscreen mode, where two or more players share audio playback, you could have every kart track every player and perform individualized Doppler effects, but that’s where it starts to get costly on the audio engine. He further explains that in the game, the CPU kart also tracks which player is closer to it, and it applies the Doppler function relative to whoever is closest.

In conclusion, Scruffy’s favorite part of the sound design in Mario Kart is the use of the Doppler effect, which conveys a real sense of speed, while still allowing every player and computer to each make only one instance of sound effects, which he finds pretty elegant. The video is informative and well-explained, and it shows the knowledge and expertise of the author in the field of sound design.