In this lesson, you’ll add background music to your game. The sounds and music you will use in this lesson and the next are in the sound
directory:
As with most things in pygame
, using mixer
starts with an initialization step:
98# Setup for music and sounds. Defaults are good.
99pygame.mixer.init()
100
101# Initialize pygame
102pygame.init()
After the system is initialized, you can get your background music setup:
helenyip2 on March 21, 2020
Sky_dodge_theme.ogg
file is not in the folder via the link provided.