Very nice! I really liked the idea of playing AS the whistle and how that altered the movement mechanics from a typical game. I would be curious to hear how the game would sound if the pitch of the whistle changed based on your player speed, or maybe how long you were moving without stopping.
Viewing post in Blow to Go jam comments
I’m not even sure if it would sound good! It might sound silly, but that’s partly why I want to hear it haha
I can think of two ways to implement if you wanted to try.
-
If you are using move_and_slide you should be able to set the pitch_scale of the AudioStreamPlayer based on velocity.length(). You would need to set a min and max pitch though and return to min_pitch when the player isn’t moving.
-
If you are doing the time-based approach you could have a timer reset whenever the player starts moving. Default to sfx.pitch_scale = min_pitch. Based on the timer, increase the pitch in your movement code. Same thing, assigning to pitch_scale the clamped value based on the timer and max_pitch.