6. Add Music and Sound Effects
Music and sound effects play extremely important roles in establishing the mood and tone of games. TyranoBuilder allows you to easily add music and sound effects to your games and we’ll see how this works in this section.
Let’s start by adding some background music to our scene. For the purposes of the tutorial, we’ll use the free tune ‘Dark Days’ kindly provided by TyranoBuilder community member DJ Rolfsky, which you can download from this link.
Download the track to your computer and we’ll set it to start playing when Yuko appears.
The process for playing the music is exactly the same as for adding an image.
Drag and drop a ‘Play Music’ component from the Tools Area***.
In the Settings Area of the Play Music component you just added, click ‘Browse’ and select the music file you downloaded above to import it. Or you can import the file by dragging and dropping into the area indicated in the Select an Audio File window.
When the file is imported, double click the file to select it for the Play Music component.
Let’s save the game and preview. If the music plays when Yuko appears, then success!
What’s more, sound effects are added by exactly the same process, only using the Play Sound Effect component.
Click on the Resources tab in the Tools Area to display a list of the images and audio files that are available in the current project.
From here you can view and preview the contents of each file. You can also drag and drop a file into the Scene Editor to directly insert it into the scene.
For example, if you drag and drop the filename of a background image…
…a Change Background component containing the background is added to the Scene Editor.
Dropping a character expression into the Scene Editor inserted a Change Expression component which contains the selected expression.
Drop files from the Resources tab to the Scene Editor like this for maximum game creating efficiency!