Engine Sounds
#3
First off, thanks for the quick and clear response!

I was able to easily drop in an .ogg with the line of code you provided and test it out. 

Quick disclaimer:
I am newer to the audio programming side of things but I am currently in a program which is helping me develop programming language skills. I am currently looking for projects like this to strengthen my skills and include in my portfolio. However, it may not be within my current capabilities.
Here's what I think is going on with the subpar quality of the engine sounds but I'm not 100% certain on all of the specifics.


What I found: 
I took a look in the STK source code and found that the engine audio file is pitch shifted based on speed.

Each kart is only set to one engine sound through m_engine_sfx_type which can be set to small, large, or custom. 

That one sound is then looped and manipulated based on speed.

My solution would be to make it possible to add layers like an idle, low, mid, high or a list in the kart.xml instead of reducing to one type.

My approach would be to add an idle, low, mid, high sound at a minimum that crossfade based on speed using this open source engine simulator for the recorded snapshot samples at idle, low, mid, high rpm : https://www.engine-sim.parts/ 

Potential Issues with the Approach: 
It could cause issues with multiple listeners and more complex AI engine sounds being processed simultaneously which could be too intensive.
The other AI karts could have simplified layers where as the custom kart for the player is more complex on client side - or simplified audio layers when at a certain distance from the player's position.

Code Location:

From what I can tell most of these systems are handled in kart_properties.cpp and kart.cpp and the custom per-kart engine system was added by "Benau"

Feel free to give suggestions, correct me, link any documentation, or lines of code to check out!
Reply


Messages In This Thread
Engine Sounds - by entrana - 07-07-2026, 04:43 PM
RE: Engine Sounds - by Alayan - 07-07-2026, 07:41 PM
RE: Engine Sounds - by entrana - Yesterday, 04:40 AM
RE: Engine Sounds - by Alayan - Yesterday, 07:48 AM

Forum Jump: