Book Image

Game Audio Development with Unity 5.X

By : Micheal Lanham
Book Image

Game Audio Development with Unity 5.X

By: Micheal Lanham

Overview of this book

Game Audio is one of the key components in making a game successful and it is quite popular in the gaming industry. So if you are a game developer with an eye on capturing the gamer market then this book is the right solution for you. In this book, we will take you through a step by step journey which will teach you to implement original and engaging soundtracks and SFX with Unity 5.x. You will be firstly introduced to the basics of game audio and sound development in Unity. After going through the core topics of audio development: audio sources, spatial sound, mixing, effects, and more; you will then have the option of delving deeper into more advanced topics like dynamic and adaptive audio. You will also learn to develop dynamic and adaptive audio using the Unity Audio Mixer. Further, you will learn how professional third party tools like FMOD are used for audio development in Unity. You will then go through the creation of sound visualization techniques and creating your own original music using the simple yet powerful audio workstation Reaper. Lastly, you will go through tips, techniques and strategies to help you optimize game audio performance or troubleshoot issues. At the end of the book, you’ll have gained the skills to implement professional sound and music. Along with a good base knowledge audio and music principles you can apply across a range of other game development tools.
Table of Contents (21 chapters)
Title Page
Credits
About the Author
About the Reviewer
Acknowledgments
www.PacktPub.com
Customer Feedback
Dedication
Foreword
Preface

Introduction to game audio


Chances are, if you have played a few computer, video, or mobile games in your life, you are already quite familiar with what great game audio should sound like. Perhaps; you even cherish the audio from a couple of your favorite games. However, if someone asked you how they composed or mixed that audio, unless you were a professional audio technician, you would likely be at a loss on how the audio in a game mixes together. Fortunately, in this section, we will start to introduce some of the basic concepts of game audio, which we will of course build upon in later chapters in this book.

Main game audio components

Game audio, unlike audio a sound designer would compose for film or television, will typically be broken down into three distinct areas as listed here:

  • Music: This includes content such as theme or background music, in-game music such as a radio or a band playing, and can even include certain audio effects. Creating or obtaining unique music for your game could be as complex as recording a music track in a sound studio to purchasing rights to a music track of the asset store. In Chapter 10, Composing Music, we will explore how to compose your own unique tunes.
  • Sound: This generally includes sound effects, such as creaking doors, explosions, footsteps, clicking, beeping, and many others. Most sound designers or developers will often browse through many of the free or paid sound effects sites to find a sound they like. Another option is to record your own sound effects, essentially becoming a Foley artist. In Chapter 10, Composing Music, we will look at some techniques to create some unique sound effects in software.

Note

Foley artists are traditionally people who create sound effects for film, television, and now games. The term Foley was coined from the originator, Jack Foley, who created real-time sound effects for early motion pictures. Today, the practice is no longer real time, but the name "Foley" is still synonymous with recording and creating sound effects.

  • Vocals: The addition of vocals to games is a relatively new addition. Vocals were first introduced in cut or intro game scenes but now they are a main element in any AAA title. Furthermore, most AAA titles will enlist a well-known actor to provide vocals for further enhancement of the game. In Chapter 9, Character Lip Syncing and Vocals, we will cover some details about generating vocals. As well in several other chapters of this book, we will highlight the use of vocal cues in scenes.

While game audio design is similar to film and television, in many components, it differs primarily by its implementation. Audio for film follows a linear well-defined pattern, whereas in games audio is non-linear and may even be dynamic or adaptive. We will of course cover many aspects of how game audio is dynamic and adaptive in the Adaptive Sound and Music section.

Diegetic versus non-diegetic sound

If you have never heard of the term diegetic, you may just have gotten a queasy feeling in your stomach wondering what you got yourself into. Do not worry, the term diegetic refers to audio that is audible in the scene or screen as a part of the action or interaction. Conversely, non-diegetic refers to sounds that are added to the scene or screen and are not visible. Perhaps; it is more helpful if we look at some examples of diegetic and non-diegetic sounds, listed here:

  • Diegetic sounds include:
    • Sound effects: Explosions, gun fire, car engine, or collisions
    • Music: Band playing, musical instruments onscreen playing, or car radio
    • Vocals: Character dialogue, voices, or crowds
  • Non-diegetic sounds include:
    • Sound effects: Off screen sound effects such as coins entering a purse, tones to denote activity changes in a game, or footsteps
    • Music: Scary background theme music, a novelty theme, or boss theme music
    • Vocals: Narration, character vocal cues, or haunting voices

These terms may sound rather abstract right now, but be rest assured, we will get fairly intimate with the use of non-diegetic sounds in the adaptive sound and music section. As you will learn, one of the cornerstones of developing great game audio is building up good non-diegetic sounds.

Note

You may have already noticed that game audio borrows or shares a number of common film and television terms sound designers use. That, of course, is not by accident. Games have been using the same principals of audio design established for movies and television for many years. In fact, later on in this book, we will explore the use of various commercial Digital Audio Workstations (DAW) traditionally used for film or television and now plugins to Unity.

Audio layers or groups

In virtually all digital games, the three base audio components we defined earlier may also include effects that will be broken into distinct layers or groups. This not only simplifies audio composition and development, which can become quickly complex as we will see, but also separates out critical audio elements. While you can think of each layer of audio playing separately during the game, from the player's perspective they will hear all the layers mixed together. The following list defines a set of basic layers we will use to group our audio:

  • Ambient and environmental audio: This includes both diegetic and non-diegetic audio such as waterfalls, ocean waves, birds chirping, a rowdy tavern, crowds, a humming power plant, or a band playing music. This group is not just limited to audio sound clips but may also include effects such as reverb, echo, distortion, or other environmental audio effects. We will cover ambient audio effects in more detail starting in Chapter 2, Scripting Audio.
  • Direct feedback audio: This will include any sound elements that that need to react directly to player input in a scene or on the interface. Diegetic examples of this would be shooting/reloading a gun, throwing a grenade, or watching something explode. Non-diegetic examples of this would be the sound of character getting shot, boss music playing, vocal cues, or dialog. Starting in a Chapter 2, Scripting Audio, we will cover several examples of this type of audio.
  • Interface audio: This includes sounds activated as part of the game interface. This typically would include items such as button clicks or notifications. We really won't go into too much depth in this area, as interface sounds are fairly standard and use the same principals you learn to manage other audio that is easily transferable to the interface.
  • Background or theme music: This area is relatively self-explanatory and immediately conjures up your favorite game theme music. However, background music can be used to dynamically change and thus alter the tone of a game during various conditions. This form of audio change is known as adaptive music and is something we will spend a great deal of time on, starting in the Adaptive sound and music section. In Chapter 2,Scripting Audio, we will introduce the use of background music in a scene.

Remember, this is only a basic definition of layers we have grouped our basic audio components into. As you will see through the rest of this book, there are a number of other ways we can group or layer audio. In Chapter 3, Introduction to the Unity Audio Mixer, we will cover the use and definition of audio groups in more detail.

Now that we have some very basic audio terminology defined, let's get into putting some of this knowledge to use in Unity. In the next section, we will look at downloading and setting up Unity.