Skip to content

Sound Effects

Su LAN edited this page Oct 4, 2021 · 17 revisions

Purpose

Music, interactive and atmospheric sounds provides a more immersive experience for the player, giving character to the world around them.

Sounds were developed for:

  • The player picking up buffs and debuffs
  • The player winning a level
  • The player losing a level
  • The player pressing buttons on the menus

Music was developed for:

  • The Main Menu
  • Level One
  • Level Two
  • Level Three

Initial Research

Being a fast-paced platformer, some inspiration was taken from popular game themes, such as Sonic the Hedgehog's Green Hill Zone theme.

Design of sounds

The sounds were designed using different software and websites, depending on which provided effects and samples that fit the overall theme we were aiming for.

Software

Garage Band

Garage Band was used for the design of the menu sounds, including the appearing of the menus when the player wins and loses, and also the on-click sounds for the menu buttons.

Integration into the final release

Currently, the sounds which have been implemented into the game are:

Background Music

Make different kinds of background music to fit each level by using GarageBand.

  • The Main Menu theme

    As the game is set in the universe, the soundtrack was made more ethereal, so that players can imagine the immensity of the universe just by listening to the music during the menus.

  • The Game theme (level 1, 2, 3)

    Each background music has a number of tracks, the main ones being the background track and drums track.

    The background tracks are different for each level, depending on the design background of the level

    During the game session as players are being chased, drums are added to simulate footsteps and create the atmosphere of being chased, which will become faster and faster as the level increases.

Sound Effects

  • The player picking up a buff

  • The player picking up a debuff

    When picking up a buff the sound effect is designed to be crisp and the pitch is rising. When picking up a debuff the sound effect is designed to be low and the pitch is down.

Code

First things you need load the music files

private static String[] forestMusic = {"sounds/maingame.mp3", "sounds/level2.mp3", "sounds/BGM_03_mp3.mp3","sounds/level3.mp3",};

you need to add the music to the sound effect area. And add a play function. Call the playMusic function in Creat Function

private static final String backgroundMusic = "sounds/maingame.mp3";
private static final String[] forestMusic = {backgroundMusic};

private void playMusic() {
    Music music = ServiceLocator.getResourceService().getAsset("sounds/maingame.mp3", Music.class);
    music.setLooping(true);
    music.setVolume(0.3f);
    music.play();
  }
public void create() {
    playMusic();
  }

Table of Contents

Home

Introduction

Main Menu

Main Game Screen

Gameplay

Player Movement

Character Animations

Enemy Monster Design and Animations

Game basic functionalities

User Testing

GitHub Wiki Tutorial

Game Engine

Getting Started

Documentation

Entities and Components

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Troubleshooting

MacOS Setup Guide

Clone this wiki locally