Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements to footstep audio system #392

Merged
merged 1 commit into from
Feb 26, 2023

Conversation

Malcolmnixon
Copy link
Collaborator

This pull request fixes issue #373 by avoiding attempting to play null sounds; however this PR also includes numerous other changes.

Surface audio resources now have a jump sound, and all sounds (jump, hit, and walk) are optional and can be left blank.
image

The walk speed is now a configurable property. The footsteps node now emits a footstep signal whenever it plays a footstep sound, and the audio settings have been moved to a child AudioStreamPlayer3D node called "PlayerSettings" so the footstep node doesn't have to try and replicate every audio setting (bus, mix, attenuation, etc.)
image

All reference footstep sounds have been converted to WAV files as OGG files have a fairly large delay when playing due to the effort of decompressing the audio stream.

Finally the math behind when the footstep sounds are played has been shifted so it plays at the "end" of a step rather than at the beginning.

@Malcolmnixon Malcolmnixon marked this pull request as ready for review February 25, 2023 18:36
@DigitalN8m4r3
Copy link
Contributor

lgtm

@BastiaanOlij
Copy link
Member

... the audio settings have been moved to a child AudioStreamPlayer3D node called "PlayerSettings" ...

It's not always possible but I think we should do this in more situations. It really cleans up the UI

Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@BastiaanOlij
Copy link
Member

Don't forget to change the VERSIONS.md document. Also we should make some documentation on this

…o resources to be optional. Fixed resource leak by not attempting to play null sounds. Added signal emitted when a surface sound is played (possibly to alert enemies) Made walk speed configurable. Moved audio settings to an AudioStreamPlayer3D child node. Modified when footsteps are played to be at the "end" of a step. Modified all footstep sounds to be wave files to avoid delay when playing the sounds.

Minor formatting cleanup

Updated VERSIONS.md to describe change.
@Malcolmnixon
Copy link
Collaborator Author

Updated VERSIONS.md, and I'll work on the documentation page shortly.

@Malcolmnixon Malcolmnixon merged commit cbbb327 into GodotVR:master Feb 26, 2023
@Malcolmnixon Malcolmnixon deleted the footstep-resource-leak branch February 26, 2023 01:48
@BastiaanOlij BastiaanOlij added this to the 3.4.0 milestone Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants