Chapter 7. Improving Your Gaming Experience

In this chapter, we will cover the following recipes:

  • Importing audio clips
  • The Audio Source component
  • Coding audio
  • Instantiating Particle Systems at runtime
  • Game options—audio volume
  • Game options—toggling audio
  • Playing video clips in the scene

It seems we have enough dough to work with! Let's start by adding sounds to the prototype.

Introduction

In this chapter, we add details and extra functionality to our prototype, starting with audio. Audio in video games is, in our opinion, a sort of ambiguous matter. On one side, audio is an important part of any video game, as it is complements its graphics to immerse the player into the actual game world and game action. There are so many games that are mostly popular because of their soundtrack, and there is good literature on this subject too. If you'd like to delve into the theory of audio in games, you can check out an interesting read about the diegesis theory, available at http://devmag.org.za/2012/04/19/video-game-audio-diegesis-theory-2/.

On the other side, audio in video games is generally taken care of by an audio designer— a contractor who is rarely a permanent member of the development team. Most of the time, the audio designer starts working on a project towards its end. The main negative consequence of this industry habit is that audio rarely gets the attention it would require during the preproduction phase of a project.

The rise of mobile gaming didn't help the cause of audio designers, as the casual style of mobile gaming, which encourages playing everywhere while doing anything, tends to make players prefer disabling the game audio entirely.

That said, we begin this chapter with two recipes about managing audio files in Unity.

The other main topic we will discuss in this chapter is particle effects. Particle effects are bits of graphics that are displayed on screen to improve the visual appeal of a video game. Explosions, smoke puffs, glitters, and rainfall are all examples of particle effects applied to video games.

Besides the visual impact, particles may also be very important from a design perspective, as they provide a tool to improve the player's feedback on the consequences of their own game actions. Well-designed particle effects can definitely help a player understand whether they are performing well or badly, while playing.

In the second part of this chapter, we will show you how to create particle effects in Unity and how to implement them in the prototype.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.24.180