Week 11 - Sound Design

Tuesday 3rd, Monday 9th December 2019.

Release 2 - Sprint 2. Scrum Master: James Farrell

 

Overview 

This week, we focused on completing the sound design aspect of our game. My main role involved the implementation of a 3D sound engine. 

Product

The main products of this week were:

  • Implement Controller Mapping
  • Update Level Layout
  • Design Billboard Effects
  • Configure 3D Sound
  • Implement 3D Sound Effects

Process

Implement Controller Mapping

I implemented XNA's GamePad class to add controller mapping support. This change will allow players to interact with our game using a gamepad. I connected each input (controller buttons) to relevant outputs (in-game actions). I also implemented a system that automatically detects a gamepad, once it is connected. This means that the player can easily switch between keyboard and controller. I hooked up an Xbox controller to make sure that everything works

Update Level Layout

I updated our in-game level using the additional assets that I created in Sprint 10. I imported each file into XNA and re-named them where necessary. I numbered each room to keep track of its position within the grid. In total, there were 36 rooms. I realized that I would need to allocate more space within my bit-shifted 3D array (currently, there are only 5 bits allocated to rooms, providing me with a maximum of 32 different types of rooms - 2^5). I edited the algorithm to allocate 6 'room' bits instead. This consequently updated the starting bit position of all remaining grid elements. I then edited the 'map data' text file, to place each room into the map. I tested everything out once I was done, to make sure that everything worked.

Design Billboard Effects

I designed a set of billboard effects for use within our game. These effects will appear on-screen when the player performs some action. For example, a 'slash' billboard will appear on-screen when the user attacks an enemy - this will provide visual feedback for the player when in combat. I used pen and paper to outline a set of effects, before re-creating my designs using Photoshop.

Configure 3D Sound

Previously, we used 2D sound effects throughout the game. This felt rather flat as our sound seemed to have no dimension. We decided to update our game to support 3D sound effects. I began by placing audio emitters at each audio source within our game. I then updated the position of the audio listener, each time that the player moved. The audio listener represents the in-game player position. These two systems work in tandem, to make audio appear as if it coming from a set source within the game. For example, if the player is standing adjacent to an item, they will hear the 'item_twinkle' sound coming towards them. This is relative to the direction that the player is currently facing (if the item is to their left, they will hear the sound coming from their left earphone/speaker). This adds a layer of realism and depth to our game.

Implement 3D Sound Effects

I used our updated engine to place 3D sound effects into our game. I replaced all 2D diegetic sounds (such as footsteps and combat actions), with 3D sound effects. This was a relatively quick process, as it only involved placing an emitter at each source. I also edited existing sound events, to publish 3D sound events instead of 2D sound events. I ran into a problem while testing my code - I realised that the audio would only play from one speaker. After some time, I discovered a 'forward vector' member in the audio listener class. I decided to assign the players 'look' vector to the 'forward' vector, assuming that they were meant to mirror each other. Thankfully, this fixed the problem.

Issues

I forgot to update our Scrum board on Tuesday. Although work had been completed, it had not been recorded. Annoyingly, this created a flat line in our burndown and burnup charts.

I felt quite under pressure this week, as multiple assignments were due at the same time. I often found myself switching between projects, as I tried to progress evenly in both. This was made worse towards the end of the week, as I realised that our UDP journals were to be submitted on Monday. Overall, this resulted in a busy weekend, but I was thankfully able to submit everything on time.