DEV Community

Eric Ahnell
Eric Ahnell

Posted on • Updated on

DEV Questions: Driving faster than the speed of sound in racing games

This is the first post of what will hopefully become a series.

I was perusing YouTube this morning, and found five videos showcasing what I mean in the Extreme-G series of games. All of these videos feature at least one point in the race where the player is moving at supersonic speeds, at which point the speedometer goes haywire, there is a "sonic boom" of sorts, and the music mostly drops out until back below the speed of sound. How would you implement this in a game? More specifically, what would be needed from the game and its engine to make the transition to supersonic racing semi-realistic?

I can think of 3 things right off the top of my head:

  • Ability to interrupt music at any time, perhaps just by playing two tracks and muting one, then switching as needed
  • Dynamic volume control, so the transition does not sound abrupt
  • Some sort of visual indicator, in the speedometer or otherwise, that your speed has hit a transition point

Anything else I forgot? Your thoughts welcome!

Top comments (2)

Collapse
 
marcellothearcane profile image
marcellothearcane

Calculating velocity around curves?

Collapse
 
wrldwzrd89 profile image
Eric Ahnell

In particular, curve-related decelerations can cause you to dip below supersonic speed. How much this happens needs to be handled.