Sounds to Match Speed
Hi all,
I am currently making a motorbike racing game and am struggling to work out how to add my bike sound to match the bike speed.
The bike speed is governed by a game level attribute (integer)
any help or ideas would be greatly appreciated.
![]()
Comments
One solution would be to use your Attribute as the volume level for the sound. You'd probably need to do some math on it to get it to be a decimal but that would be pretty easy. For example if you're speed were always a value between 0 and 100 you could set the volume like this:
Volume = (Speed Attribute/100)
So if you're speed was 50 the volume level would be .5
Thank you for your reply, I will give this ago as a back up plan.
I should have mentioned I have a sound recording which last 8.416 seconds of my race bike going from 1st gear up to 6th gear, any ideas how to use this?
I did try and divide the recording into smaller sound bites and set a rule to play sound - bite 1 when **attribute bike speed = 1 ** and so on up to top speed (350).
I'd dump the 6 gear recording and extract a loop from the first gear engine sound - the use your attribute to control the pitch (increase the pitch a small (very small) amount as the speed increases) as well as the volume.