Catch The Clown
4 Adding Sounds

Section Menu

Catch The Clown Home | 1 | 2 | 3 | 4 | 5 | 6 | 7

Most games have sounds included that help make the game more interesting.

Juts like with the sprites, we need to add sounds to the game before we can play them.

We have 3 sounds to add,

  • Annoying background music.
  • A bouncing sound to play when the clown bounces off the walls.
  • A sound to play when the clown is successfully clicked.

To add a sound, click on Sounds with the right mouse button and choose Create Sound.

Call the first sound, snd_bgmusic and load the background music file. Make sure the background music box is checked and turn the volume down a tad.

Game Maker Screenshot

Add the other 2 sounds as normal sounds, using the names snd_bounce and snd_click.

Making The Sounds Play

  • The events that cause these sounds to be played have already been made. All we need to do is drag the Game Maker Screenshot Play Sound icon into the actions window.
  • Start with the background music. We will start the music playing when the clown first appears on the screen. This is handled with the Create Event.
  • Drag in the Play Sound icon underneath the actions that are there. Fill in the pop-up window as shown.

Game Maker Screenshot

Click on the Collision Event that you created earlier. Drag in another Play Sound action and fill that in as shown.

Game Maker Screenshot

  • The final sound is to be added to the Mouse event that takes place when the player clicks on the clown.
  • Add this sound in the same way as you did for the collision event (the bounce).
  • Save and test the sound effects in your game. Adjust the volume where necessary to make the game experience more bearable.

⇐ Previous | Next ⇒