PyGame Platformer Game Beginner Tutorial in Python - PART 11 | Adding Music and Sound Effects

preview_player
Показать описание
In this Python tutorial I code a Platformer Game using the PyGame module. I'm going to add background game music as well as different sound effects

Note, sprites and sounds are open source:

Check out my other PyGame tutorials:
Рекомендации по теме
Комментарии
Автор

Been having alot of fun following this series! Awesome work! Looking forward to the level designer :D

davysabbe
Автор

I am so glad for every lesson!
thank you very much Russ!

kpacccavchik
Автор

how would i change the music from the main menu to the main game?

amazingduck
Автор

i wrote every bit of the code perfectly, no spelling mistakes, the code overall shows no errors but the sounds just won't play, what can i do so the sound works?

drkblade
Автор

How can I add sound for running? I tried adding run_fx.play() to the place where we took key inputs, but that made the running sound play once for each frame of the animation, I suspect. How can I fix this?

sekka
Автор

how would i change the main music tracks based on zones

Adam-TheLiftedKing
Автор

Hi Russ. How can I switch from one music track to a different one after a specific event (like after a certain time or a certain score)? I know that there is mixer.music.queue but I want to switch music before it runs out naturally. For example at score 5 the first music should stop and the new one should start.

CallTheDay
Автор

This series is amazing, but could you make a tutorial on how to make a level designer

aarushjain
Автор

my music sounds like crap when open the game distorted and reverby sound, anyone??

sezaiunver
Автор

Bonjour,
Bravo, ce jeu est très complet.

michelbecart
Автор

Im getting error saying that the function pygame.mixer.music.load takes 2 arguments. Can someone help?

nikostsiodras
Автор

One intresting thing happend. When I added music i follow-ed identically (don't mind me I just use full paths).

pygame.mixer.music.play(-1, 0.0, 5000)

and I get an error:
Traceback (most recent call last):
File "c:/Users/ViktorasPC/Desktop/Coding/Python/games/platformer/platformer.py", line 47, in <module>
pygame.mixer.music.play(-1, 0.0, 5000)
TypeError: function takes at most 2 arguments (3 given)

Maybe there was an update?

burbulinadas
Автор

Hi russ, when I jump under a block were I shouldn't beable to jump it plays the jump effect rapidly. how do I make it so I only play the sound once when I tap the spacebar instead of rapidly


Thanks great series man your the best

jackcadeau