2.2.8 Cycle 8 - Background Music

Design:

Objectives

In the eighth cycle, my objectives are to implement the background music as specified in the Systems Diagram in 2.1 Design Frame. The aim for this is for it to be catchy and memorable, this will encourage people to play the game and try to keep it in their minds.

Usability Features

The music will stay in the Player's head if it is catchy. Therefore, they will think about the game a lot and enjoy playing it.

Pseudocode

The pseudocode for the new level and its detail is shown below:

// Music Coin
On collision with "Coin":
    Destroy the "Coin" object
    Play the "Background Music" with no additional parameters
    Increment the number of coins collected (coins += 1)
End on collision

Development:

Outcome

  • The code for this can be viewed below:

Challenges

Some challenges I faced during this cycle:

  • At first, I tried to implement a method for the music to be toggled on and off however, it proved to be very difficult.

  • I then tried to use two different keys to turn on and off the music however, that was incredibly difficult too.

Testing:

Tests performed in this cycle are evidenced below, they were a crucial aspect to my development.

Tests

Test
Instructions
What I expect
What actually happens
Pass/Fail

1

Run code.

The game to start, boundaries rendered, player, Grunts placed and teleporter avaliable for use.

As expected

Pass

2

Move the Player's character into the coin.

The background music starts to play.

As expected

Pass

Evidence

The screen recording below shows the catchy background music implemented into the game, it completes the following tasks for this cycle:

Last updated