Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue-139: Add Music #140

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Tysterman74
Copy link
Collaborator

@Tysterman74 Tysterman74 commented Dec 11, 2024

Description

Add music and SFX to game

Related issue(s)

#139

List of changes

Added the following tracks

  • area_1.wav
  • area_2.wav
  • area_3.wav
  • boss_1.wav
  • heal.wav
  • shop.wav

Other changes:

  • Added AudioManager and added it to Autoloader
  • Play heal.wav when entering Heal Event
  • Player shop.wav when entering Shop Event
  • When entering Mob Event, calculate the percentage complete the player is on the Map and play either area_1, area_2, or area_3
  • When reaching the top floor, play boss_1

Tests

N/A

Additional notes

N/A

@Tysterman74 Tysterman74 marked this pull request as ready for review December 12, 2024 04:01
@Tysterman74 Tysterman74 mentioned this pull request Dec 14, 2024
Copy link
Collaborator

@Turtyo Turtyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issue with the code as is, but I noticed some issues when playing the game:

  • There is no sound if I start with something else than a mob fight (in the case I tested, with a dialogue at the start, no music is playing)
  • The sound is game is not the same balance as the sound of the original music, it sounds like the music is played stronger on the left than the right ear (mostly noticeable for the area 1 music, but it's present on all musics)

# Offset by 1 since it's reading from an array
var current_player_floor: float = PlayerManager.player_position.y + 1

var percentage_complete: float = (current_player_floor / number_of_floors) * 100
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use MapManager.get_map_percent_with_player_position instead to be consistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants