Platform-Style Video Games with Construct

Adding Background Music

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

This video shows how to import background music and play the music at the start of the game.

Keywords

  • Construct 2
  • Audio
  • Background Music

About this video

Author(s)
Lee Stemkoski
First online
15 February 2019
DOI
https://doi.org/10.1007/978-1-4842-4446-3_28
Online ISBN
978-1-4842-4446-3
Publisher
Apress
Copyright information
© Lee Stemkoski 2019

Video Transcript

Lee Stemkoski: As a last touch, we’d like to add some background music to this game. So let’s go up to the Projects panel. Previously we clicked on this sounds folder to load sound effects. Now let’s right click on the Music folder and choose the option Import music. There’s a song here, a song file, an ogg file, Radio Martini. Let’s open that up and Import.

Now we want this to play at the beginning of the game, so we’ll actually need a new event that triggers exactly once when the game starts. Let’s add an event. This will be a System condition. On the layout Start, so scrolling down towards the end, there’s a category called Start and end. Let’s choose the condition On start of layout then add an action, Audio action, Play, as before. In this case, we’ll play the Radio Martini song. We’ll set Loop to Looping in this case. In case it gets to the end of the song, it will repeat. Then we’ll click on Done. Let’s see how this sounds. We’re going for an upbeat feeling in this game, so some bright, cheery music. There you have it.