hey! I started watching your pong game series yesterday and finished the first 2 parts, and it was such a surprize that you posted another one thank you so much you really explain everything so well and I learned a lot from you, you are so underrated and I don't know how you still dont have more than 100k subs keep up the work and you will reach it someday. Can you please continue this series in like adding difficulty and a timer that counts how much time you are in the game playing, maybe a main menu with game modes like a one that you can move the player left and right... I would really appreciate it and if you make this game as much as its basics are simple a really cool game it will help grow your youtube channel a lot and maybe after you finish pong you can create others like snake and much more. Thank you again for this amazing videos
Hey! I really wanted to leave a comment here since you really deserve some feedback for the effort you put into your videos.Been playing around with some python for a while and thought it would be cool to use pygame to learn some basic stuff before diving into machine learning. Went through the docs of pygame a little bit and decided that i am way to lazy to go through it all by myself yet so i went on youtube and found your videos.I really want to say that i really like the way you explain and especially the way you visualize the abstract concepts. If you go on like that im sure you are going to have alot of followers soon.I am an experienced java developer by the way.You're doing a great job there!Chapeau!
Really appreciate this - I was trying to figure out my pong collisions with the top and bottom, and this helped a lot in my understanding! I added some changes in mine so it wasn't just a threshold and wouldn't repeatedly collide with anything.
Can you please tell me how to put a picture or a sound in the same directory of my code I use pycharm community edition and been trying to solve this problem for almost 2 weeks, I tried a lot of methods but none worked. Also, I don't know if its a mistake but thelink in the description leads to a video about surface laptops
Hey, thanks for letting me know, fixed the link. And not sure what you mean about the directory. all you need to put all the files in the some folder in the file explorer.
@@ClearCode I tried everything and I am using only one sound its still not working I use this code{pong_sound = pygame.mixer.Sound("pong_pygame.wav")} I named my file pong_pygame.ogg this problem also happens when I try to put a bg image it gives FileNotFoundError or sometimes cannot open file can you please help me I tried everything!
for the sound file the solution is quite easy, when you import it you need to add the proper file ending, so the line in python should be: pong_sound = pygame.mixer.Sound("pong_pygame.ogg") so the use the file ending ogg instead of wav. Maybe doublecheck all the names?
@@ClearCode Thank you so much it worked been trying to solve this problem for weeks, the problem just wasn't correctly putting it in the same directory!
just click on clone and then you can see a dropdown menu; in there click on 'download zip' and then it should download all the files. I think it would be a bit overkill to do an entire video on that.
Hey, thanks for all this great content. I was mid way through making this pong game when it came to my mind if there is a way to change the ball's color when it collides with the player and the opponent. For example, the ball would turn red when the opponent hit it and blue when the player did it. I've been trying to do it but can't achieve it. Hope you can help me with this and once again, thanks for everything!
For some reason I'm having the hardest time incorporating the sound file into the game. Maybe I'm not as familiar with pycharm and importing files (I'm very new to programming) but every time i do it comes up with an encoding error
@@thenamesloca okay, that is a strange error, can you upload the entire thing to github or something? Then I'll have a look. Afraid I haven't seen that error message before and there doesn't seem to be much on it online. You got very unlucky, sorry :)
@@ClearCode Sorry for the delay. I'm new to this all and github as well but I've uploaded my files to github. Please let me know if I should change how I uploaded for easier look over. I'm learning all of this as I go so sorry for the chaos. My user name is everydaySeidr and this is the upload github.com/everydaySeidr/beginner-pong.git
I know this video is old but I thought Id share some issues that I had that may help some others. If your file gives you pygame.error: cannot open file 'pong.ogg', I was able to fix this by changing them to .wav files. Not sure why, perhaps something to due with the encoding or limited frueqencies of the OGG? not an audio guy tho so could be wrong. Regardless, hope this helps someone.
sorry about that... I thought that the light them with dark text was a good contrast and helped readability. But I changed my mind really fast after doing some editing in the evening, newer tutorials are better with that :)
Great stuff. A few suggestions. I was unable to download the sounds from github; it didn't work on chrome and "file not supported on microsoft edge". Also, can you show us how to end the game with a winner? Finally, you used a lot of global variables and you said that was bad form. Can you show us a way to code it without the global variables?
Hey, I am working on more tutorials on the pong game, should be ready next week. I am not sure what the problem with github is, I'll check it tomorrow.
hey! I started watching your pong game series yesterday and finished the first 2 parts, and it was such a surprize that you posted another one thank you so much you really explain everything so well and I learned a lot from you, you are so underrated and I don't know how you still dont have more than 100k subs keep up the work and you will reach it someday. Can you please continue this series in like adding difficulty and a timer that counts how much time you are in the game playing, maybe a main menu with game modes like a one that you can move the player left and right... I would really appreciate it and if you make this game as much as its basics are simple a really cool game it will help grow your youtube channel a lot and maybe after you finish pong you can create others like snake and much more. Thank you again for this amazing videos
Hey! I really wanted to leave a comment here since you really deserve some feedback for the effort you put into your videos.Been playing around with some python for a while and thought it would be cool to use pygame to learn some basic stuff before diving into machine learning. Went through the docs of pygame a little bit and decided that i am way to lazy to go through it all by myself yet so i went on youtube and found your videos.I really want to say that i really like the way you explain and especially the way you visualize the abstract concepts. If you go on like that im sure you are going to have alot of followers soon.I am an experienced java developer by the way.You're doing a great job there!Chapeau!
Hey thank you so much. Always happy to hear kind words! :)
Really appreciate this - I was trying to figure out my pong collisions with the top and bottom, and this helped a lot in my understanding! I added some changes in mine so it wasn't just a threshold and wouldn't repeatedly collide with anything.
Thanks, the sound really adds to the game.
I didn't understand code at 5:19
if abs(ball,right -player.left)
Thank you so much! Your video helped with my Pong game collision
How can you change the direction the ball goes to after every hit? How it's always the same Is there a way?? Please??
Had to use winsound for the sound. Pymixer was giving me problems. Awesome lesson!!
Great tutorial. Thank you very much
So underrated
Thanks bro you're the best
thank you man.well done
you can also do pong_sound.play() instead of pygame.mixer.Sound.play(pong_sound)
:)
U R GOD OF PYGAME FOR ME !!!! LOVE YOUR CONTENT :)
who thinks he will reach 100k very very very soon ?!
Hi, how do I make it so that the opponent ai paddle moves once the bot is above/below the middle of it instead of the ends? Thanks
Can you please tell me how to put a picture or a sound in the same directory of my code I use pycharm community edition and been trying to solve this problem for almost 2 weeks, I tried a lot of methods but none worked. Also, I don't know if its a mistake but thelink in the description leads to a video about surface laptops
Hey, thanks for letting me know, fixed the link. And not sure what you mean about the directory. all you need to put all the files in the some folder in the file explorer.
@@ClearCode I tried everything and I am using only one sound
its still not working I use this code{pong_sound = pygame.mixer.Sound("pong_pygame.wav")}
I named my file pong_pygame.ogg this problem also happens when I try to put a bg image it gives FileNotFoundError or sometimes cannot open file can you please help me I tried everything!
for the sound file the solution is quite easy, when you import it you need to add the proper file ending, so the line in python should be: pong_sound = pygame.mixer.Sound("pong_pygame.ogg") so the use the file ending ogg instead of wav. Maybe doublecheck all the names?
@@ClearCode Thank you so much it worked been trying to solve this problem for weeks, the problem just wasn't correctly putting it in the same directory!
@@yussefhallak981 well done :)
why u have put 10 in collision part
I have a problem, I couldn't download the files, could you please do a tutorial on downloading them?
just click on clone and then you can see a dropdown menu; in there click on 'download zip' and then it should download all the files. I think it would be a bit overkill to do an entire video on that.
Hey, thanks for all this great content. I was mid way through making this pong game when it came to my mind if there is a way to change the ball's color when it collides with the player and the opponent. For example, the ball would turn red when the opponent hit it and blue when the player did it. I've been trying to do it but can't achieve it. Hope you can help me with this and once again, thanks for everything!
For some reason I'm having the hardest time incorporating the sound file into the game. Maybe I'm not as familiar with pycharm and importing files (I'm very new to programming) but every time i do it comes up with an encoding error
what's the error?
@@ClearCode the file was loaded in a wrong encoding: 'UTF-8'
@@thenamesloca okay, that is a strange error, can you upload the entire thing to github or something? Then I'll have a look. Afraid I haven't seen that error message before and there doesn't seem to be much on it online. You got very unlucky, sorry :)
I'll do that! Thank you so much!
@@ClearCode Sorry for the delay. I'm new to this all and github as well but I've uploaded my files to github. Please let me know if I should change how I uploaded for easier look over. I'm learning all of this as I go so sorry for the chaos. My user name is everydaySeidr and this is the upload github.com/everydaySeidr/beginner-pong.git
I know this video is old but I thought Id share some issues that I had that may help some others. If your file gives you pygame.error: cannot open file 'pong.ogg', I was able to fix this by changing them to .wav files.
Not sure why, perhaps something to due with the encoding or limited frueqencies of the OGG? not an audio guy tho so could be wrong. Regardless, hope this helps someone.
Helped me. .wav is the way! Edit: I also didn't have to change the buffer when using .wav. Why even use a weird .ogg file when .wav just works?
Where can I get the sound files?
Hey, sorry about that, forgot to add the GitHub link: github.com/clear-code-projects/Pong_in_Pygame
@@ClearCode Thanks!
why did you thange the theme to light? :'( my eyes are burning...
jokes aside , I really love this video/series, keep it up!
sorry about that... I thought that the light them with dark text was a good contrast and helped readability. But I changed my mind really fast after doing some editing in the evening, newer tutorials are better with that :)
Great stuff. A few suggestions. I was unable to download the sounds from github; it didn't work on chrome and "file not supported on microsoft edge". Also, can you show us how to end the game with a winner? Finally, you used a lot of global variables and you said that was bad form. Can you show us a way to code it without the global variables?
Hey, I am working on more tutorials on the pong game, should be ready next week. I am not sure what the problem with github is, I'll check it tomorrow.
Thanks
Bro dont reply to the comment "wanna be friends" , that channel is a hacker
Don't worry, my parents raised me well to not talk to weirdos on the internet :)
Lol nice, and yeah your content is good👍
hey! I can't download the files of the sounds.. Do you know how I can use them?
Hey, how do you try to download them? I just tried to download the entire project folder and that works fine.