Add music and/or sound effects for a mini-game #622
jgbourque
announced in
Mini-Games
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why this task matters
Adding your own music and sound effects brings your StoryQuest to life and creates a unique atmosphere for players. Custom audio helps establish the mood, tone, and personality of your story while making it feel distinctly yours rather than using placeholder sounds.
Steps
Git Setup
Now, create a new branch for your work:
intro-outro-tilemaporadd-custom-path. This keeps your work organized. Click here for a more detailed guide and more information on updating your local repository and creating a branch.• For scene-specific audio: Place it in that scene's components folder (e.g.,
0_stella_intro/stella_intro_components/for intro sounds/music only)• For shared audio: Create a folder at your StoryQuest root level like
stella_audio_assets/so your team can easily find and use music or sounds across all scenesIn Godot's FileSystem panel, navigate to the appropriate folder and drag your audio file (.mp3, .wav, or .ogg) from your computer into it. Godot will automatically import it. If you placed it somewhere different by accident, just use the "Filer search" option in the FileSystem and then move it to the intended folder.
0_stella_intro/) and double-click thestella_intro.tscnfile to open it.Steps 5-8 For Adding Background Music to a Scene
Add the background_music.tscn. to your Scene Tree In the FileSystem, search for background_music.tscn. This is an AudioStreamPlayer node that is designed to be used for background music in your StoryQuest scenes. To add this file to your scene you can simply click and drag the file into your current Scene Tree and it will be added as a new node in that scene.
Assign your music file to this new BackgroundMusic node. With your BackgroundMusic node selected, look in the Inspector panel. Find the Stream property and click the dropdown arrow. Choose Quick Load and select your imported music file. Alternatively, you can drag your music file directly from the FileSystem panel onto the empty Stream field in the Inspector.
The image below shows the background_music.tscn in the FileSystem and also shows what it will look like when you drag this file into a specific Scene Tree. You can see the "stream" property in the Inspector as well:

Adjust volume and looping.
• Use the Volume Db slider to make the music louder or quieter
• Check Looping if you want the music to repeat continuously
Test your music. Click the Play Scene button (or press F6) to test that your music starts automatically.
Steps 9-13 For Replacing Sound Effects on Existing Game Assets
Import your custom sound effects. Choose the best location for your sound files:
• Scene-specific sounds: Place in that scene's components folder (e.g.,
2_stella_combat/stella_combat_components/for combat sounds only)• Reusable sounds: Place in your shared audio folder (e.g.,
stella_audio_assets/) so your team can use them across multiple scenesDrag your sound effect files (.wav, .ogg, or .mp3) into the appropriate folder in the FileSystem panel.
Find game assets with existing sound effects. Look through your scene for interactive game objects like stealth guards, sequence puzzle objects, or other elements like the "Player". Some of these already have sound effects built into their scripts.
Locate the sound property in the Inspector. With the game asset selected, look in the Inspector panel for sound-related properties. This is an example of the inspector panel with one of the stealth guards selected in the Scene Tree:

These properties will show the currently assigned sound file.
Replace the sound effect. Click on the sound property field in the Inspector. Choose Quick Load and select your new sound effect file, or drag your sound file directly from the FileSystem panel onto the property field.
Repeat for other game assets. Go through your scene and replace sound effects on other interactive elements as desired.
Save To Git and GitHub
git status git add scenes/quests/story_quests/yourStoryQuest/ git commit -m "Add your message here - explain to your team what you changed" git push --set-upstream origin your-branch-namegit addto add more than one file simply by putting a space between file paths you paste in.--set-upstreamthe first time you push a new branch to GitHub.Click here for a more detailed guide and more information on saving and pushing your changes to GitHub.
Click here for a more detailed guide and more information on creating a pull request to your team's forked repo.
Note: Pull requests are better with a peer review! Click here to learn more. If you are working alone, you can merge your own pull request after submitting it.
✅ Done! Your StoryQuest now has personalized music and sound effects !
Use the Threadbare Melody Loom app to create your own soundtracks and SFX!
Resources for some royalty free game audio: Freesound, Kevin MacLeod's Incompetech
Beta Was this translation helpful? Give feedback.
All reactions