Skip to content

Commit

Permalink
music changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PK-cod3ch3mist committed Nov 29, 2023
1 parent c2a4071 commit 0cc8f3f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 15 deletions.
Binary file modified assets/music/opening-track.wav
Binary file not shown.
Binary file modified assets/music/pace-beat.wav
Binary file not shown.
Binary file removed assets/music/start-beat.wav
Binary file not shown.
2 changes: 2 additions & 0 deletions assets/scores/highscores.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
139
10
2 changes: 2 additions & 0 deletions globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
pygame.mixer.Sound("assets/sounds/D4.wav"),
pygame.mixer.Sound("assets/sounds/F4.wav"),
)
for sound in STAFFSOUNDS:
sound.set_volume(0.25)

TOTAL_STAFFS = len(STAFFSOUNDS)
TOTAL_NOTES = 6
Expand Down
51 changes: 36 additions & 15 deletions textcontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,38 +42,59 @@ def general_text(

def game_over_func(score: int, highscores: list):
game_over_text, game_over_text_rect = general_text(
"Game Over", globals.WIDTH / 2, 100, head_level=0
"Game Over", globals.WIDTH / 2, 75, head_level=0
)
lines = [(game_over_text, game_over_text_rect)]
lines.append(
general_text(
"Your Score: " + str(int(score)),
pos_x=globals.WIDTH / 2,
pos_y=200,
pos_y=150,
l_align=0,
)
)
lines.append(general_text("Highscores:", globals.WIDTH / 2, 250, head_level=1))
y_position = 300
lines.append(general_text("Highscores:", globals.WIDTH / 2, 200, head_level=1))
y_position = 250
num = 1
for s in highscores:
lines.append(
general_text(str(num) + ". " + str(s), globals.WIDTH / 2, y_position)
)
y_position += 50
num += 1

prompt_text, prompt_text_rect = general_text(
"Press any key to restart", globals.WIDTH / 2, globals.HEIGHT - 100
)
# TODO: Add credits if any
# lines.append(
# general_text(
# "Credits:",
# pos_x=globals.WIDTH / 2,
# pos_y=globals.HEIGHT / 2 + 200,
# head_level=1,
# )
# )
"Press any key to restart", globals.WIDTH / 2, globals.HEIGHT - 50
)
# TODO: Add credits if any in slight grey color
y_position += 25
lines.append(
general_text(
"Credits:",
pos_x=globals.WIDTH / 2,
pos_y=y_position,
head_level=1,
color=(150, 150, 150),
)
)
y_position += 50
lines.append(
general_text(
"Developed by: Pratyush Kumar",
globals.WIDTH / 2,
y_position,
color=(150, 150, 150),
)
)
y_position += 50
lines.append(
general_text(
"Music by: Pratyush Kumar (developed using GarageBand)",
globals.WIDTH / 2,
y_position,
color=(150, 150, 150),
)
)
return (lines, (prompt_text, prompt_text_rect))


Expand Down

0 comments on commit 0cc8f3f

Please sign in to comment.