Can I reach out to you for questions? Im using a function to display the score like you show and its not working. I also dont see where you called that function.
Seriously you do great job because: + explaining logical parts on seperate screen and then go into implententing + you make a chance to code by yourself + you just use simple drawing on screen to make code and logical parts more understandable + video is split on some smaller parts + tempo is accurate
I also like the fact that he makes videos talking about individual mechanics, as they can be used as ideas for smaller exercises for practising pygame.
@Ar! / Penyuin i meant that clear code is explaining eveyrhting so sometimes for more experienced programmers, if you put the speed to 1.25, you can go through a bit faster without worrying ur missing things. if u dont understand what clear code is saying, u dont have to set the speed to 1.25... it was just a suggestion
I just turned 60, I've been a technologist my entire adult life and have taught many "programming" courses (proprietary languages) for several fortune 100 companies but I'm relatively new to Python. I have to admit my first thought was, this person has a lot of nerve putting out an almost 4 hour video on the subject. I have to admit, when you're good, you're good and you are really good. I did the entire 3:47:57 over the course of 3 days and I got lost one time, _init_ instead of double underscores __init__. That's it. That was the one thing I screwed up, otherwise I learned a ton of new stuff and I'm, really pleased with how it all worked out. In my experience, it's pretty rare in these type of videos for the finished product to look like the author intended but you nailed it. Can't wait to learn more from you. Thanks! All the best, Dennis.
Indeed! I'm most impressed. I was able to learn so much by this simple tutorial. No, this is not a simple tutorial, it's actually a real mini course about the basics of python game and python itself.
Hahaha, how is it so hard to find programming education like this: the teacher actually spends time explaining concepts instead of explaining lines of code with fruits, colors, and animals while glossing over important material. You are a godsend.
Lmao. Seriously. "Now if we run our code and set is_this_a_banana to False and print it to the screen, we can see that the terminal says False. Let's move on to Object Oriented Programming. Here we'll make a Dog class..."
Never before have i experienced such a fun and pleasuring learning experience on any kind of video tutorial ever. I can only thank you for you effort, this is now to me the definition of quality content.
46 minutes, I am coding along the video. This is already my new favourite channel of youtube man ! The clarity of speech. The time given for self exercises. This channel is too much !! You are the boss
I'm halfway through and I really appreciate your teaching style. You move quickly but explain everything and why you're doing it. I'm trying to make a top down RPG game so I find it helpful to learn from a tutorial that's doing something different so i have to actually think about the concepts.
The quality of your videos is out of this world CC! Relaxing, valuable and the way you explain things is top notch. I'd like to see a short 2D dungeon-like RPG level game idea with a simple scene changing - that would be a challenge :D P.S. I miss your background tutorial music you used in flappy bird ^^
always happy to see you here and thank you so much! I am working on some more advanced games, and a rpg style game is definitely in there but the sooner ones will be space invader and a Mario clone :) And half the people like the music and the other didn't, I don't really know if it should be there or not ^^ How is your game dev journey going by the way? I bet you made something cool already!
@@ClearCode It's going really great! As a fan of the Apple tech, I started doing iOS app development. Some of the first projects were the Pong game inspired by your video, lol. Having some solid programming knowledge, I'm planning to start a new channel about making apps to share my dev journey. Perhaps we would cross our content sometimes in the future. ^^
@@mixlaproduction WHAT? Do you think it'd be possible for you to teach me or like could you tell me how to begin developing apps in python and begin learning this stuff? I stumbled on this channel months ago but post poned it until my school was on break thats why I'm gonna go through this video and code my own project then just code everything this guy has on his channel.
I started at a more difficult tutorial of yours that I was loving but could not get past an issue I was running into. Starting back from the beginning and solidifying the basics with this video helps so much. From all the videos of yours I've followed I have always loved how clearly you explain these concepts. You make it easy to understand! Thank you for all your videos! I can tell I'm learning especially when there is an urge to clean up the code while working through it, when at one point I didn't even know that was a thing!
Your videos literally seems like magic. It's amazing how you go step by step on each process and also give us exercises to try on our own. I hope you keep making more videos and your channel grows exponentially.
This is such a great tutorial!! I never leave comments but I have to thank you for explaining everything so clearly and explicitly. I was starting the pydew tutorial and almost didn't do this one because I followed a few pygame tutorials before, but this one really helped me actually understand what I was doing lol. Thank you!!
This is one of the best tutorials I've watched. He explains everything and makes it really easy to visualize how it works, and different ways to use it. This is one of the few long tutorials I've followed to the end, and I enjoyed every second of it. 10/10, would recommend.
I’m learning how to code in Python at school and this video has been very helpful for my final project, I can’t enumerate how thankful I am for Clear Code and his tutorials, they’re amazing
This is honestly one of the best tutorials I've ever watched. You get little exercises every now and then (keeping you from falling asleep) that aren't too easy, but still easy enough to make you feel like you're smart. The video is entertaining but you also learn a lot, and it's very easy to follow. This was the first tutorial that was fun for me to follow along
lost my house to recent hurricane fiona. watching your videos kept me going now im following along to up my pygame skills. by far the best way to get good at python. thank you
I just finished coding along this project, it took me about a week, and I'm very proud of myself and how the game turned out! Thank you so much for this awesome tutorial! Will be tackling next ones soon!💯
I love the way you structure your videos. its like ok i just taught you and showed you now you try to do this part on your own, and guess what, i did it on my own.
Hi, I just want to say thank you for making tutorials like this! I've always wanted to try my hand at making games. I followed your python tutorial and now this one and I love your style of teaching. The way you present the information, then show it in code and leave exercises for the viewer is very helpful. I plan to watch your piedew valley and zelda tutorials after this, but first I'll try making some easy games myself to solidify your teachings. Cheers!
This is absolutely fantastic. So well explained. Slowly but interestingly dealt with and so I feel like I'm actually learning fundamentals and can come back to this on my own at a later date and actually create my own stuff! I'm so happy that this has so many (well deserved) likes and views. Thank you.
I just discovered this tutorial. I'm only 47:46 into the video and I can already tell that this is by far the best video tutorial I've seen to date on UA-cam. The presenter is clear and concise. He explains what is going on in the program/code without being overly technical or simplistic. I'm a fairly good Python programmer and decided to expand my knowledge into game development. All I can say is "Wow!" I'm looking forward to completing the entire tutorial.
@@beepbot lol I looked at pygame about 5:years ago. It's all dead social media and the forums, questions never got an answer....you know that there is no more development on the framework right?
Your tutorials are top notch my friend. Comprehensive, both theory AND code, and the big kicker is the exercises. I did the first few hours of 3 different Python for Beginners courses before finding yours. Took me a few weeks, but I finally finished it. And now here you are teaching me Pygame in the same comfy, and well detailed learning environment. Thank you so much for the time you take to make these videos!
I have to say that your tutorials really stand out from the rest in terms of quality and learning speed. Everything always works as you specify and remains understandable. The Godot 4 tutorial was great, and I think this one is also very good. Thank you for that.
Decided to learn pygame for fun. Have to say that I was losing motivation before I found this video. Explained simply, not overcomplicated and not too fast. Really helpful that you explain the idea before implementing the code. You gave me a ton of motivation to learn again! Thanks!
Yea, youtube is hungry for money and automatically play 3h+ videos when it’s detecting that you are asleep. They then proceed to play a shit ton of advertisements.
there is no way this tutorial have this less view !! it explains so easily !! its quality is too good than any other pygame turtorial ! Thank you so much for this awesome video !! It deserves much more !
I knew about 60% of what you explained and I still watched every second of the video! Your structure, tone and patience is admirable. Thank you for creating this content!
I really can't express how happy I am to have found this video. I had been dabbling with learning programming, and using python in particular, but every course or lesson I found online was so abstract that it was difficult for me to follow along. This was genuinely so helpful to just follow along and learn with, that I feel more confident after this 4 hour video than I did after completing CS50, and I can't praise you enough for that!
Best tutorial Honestly I'm new to pygame and this has taught me soo much other tutorials are hard to follow but this is easy to follow i love showing my parents and friends my progress thank you
I can't put into words how much I appreciate you putting out this video, and the pace at which you explain things for beginners like me. Thank you so much. I wish you all the best.
Just finished watching and coding along with this video; I have officially created my first video game! 🎉 Very impressed with your channel, and I look forward to creating more projects from your videos and becoming a better programmer!
I've just started learning pygame and developing game apps. I found some tutorials, on you tube, that were good but yours are excellent! You're very precise and explain every step of the way, clearly. Thank you for these excellent teaching videos.
I'm really weary of falling into tutorial hell, but you told us the inner workings so well that I seriously have been confident enough to do my own stuff after this tutorial. Thank you so much this might be the best programming tutorial I have ever seen.
@@liangchen4679Yeah! I ended up making a simple snake clone after this video and then switched to MonoGame. Stuff I learnt in this videos still applies to MonoGame, so you really can't go wrong with this.
You Sir , are a gift for this planet,the way you are explaining it is just awesome. I prefer watching you doing this game that watching Netflix! I'm not even a code developper, braught here by the UA-cam algorithm and I'm very thankful to find your channel, Sir. Thank you for your existence and your generosity for sharing your methods with the rest of the world. Salutations from France.
This video was a blast !! Not only the quality but the nice pace, the exercises, the explanations... everything was wonderful. I just program for fun whenever I feel like it, and now i'll watch your 8h video making a Zelda style game since it brought me here in the first place ^^
This is a great tutorial. I am still in the middle of my python course on Udemy (still making a black jack game - just using the in built python modules) but one goal I have is to make a simple turn based xcom style game based on Stargate and this really opened up my eyes into what is possible. Thanks very much
I usually do not comment to any youtube videos, but this one is an exception. You explained everything with so much detail and clarity and kept the changes that each piece of code makes to the game. The pace with which you explained the concepts is neither too slow nor too fast. I found this tutorial as THE tutorial to learn pygame. Thank you so much for putting in so much effort and time to make this video to help beginners like myself!
I've watched the entire video and I want to say thank you so much! This tutorial is really great. The explanation is easy to understand and I especially love how there are exercises in between which I don't see much in other tutorial videos. I have so much fun coding this !
Everything was making sense until 2:30:01 when better enemy logic came and destroyed me 😂 EDIT: I WENT THROUGH IT AND ALL OF IT DID MAKE SENSE AND NOW I HAVE A AMAZING GAME
Finally, I've found a video with 100% detailed explanation for every step and even more! I now understand how pygame works and it made my life so much easier. Thank you so much for your kind help for those of us, who really needed this tutorial.
Hey can you make some games using OOP? I've been doing some of your tutorials and well they end up getting really messy for me, and it would just be great if you start teaching us how to implement OOP to keep our code more organized.
Canal tão injustiçado. O cara faz um vídeo completão desse na línguagem mais popular do mundo na biblioteca de jogos mais completa nessa língua e ainda é inglês pra literalmente todo mundo aprender. Mas tão pouco inscritos e likes e relativamente poucas views... Não faz sentido! Falo por mim como brasileiro, esse canal é esplêndido! E tenho certeza que o sortudo que achar esse canal vai falar o mesmo. Continue com o bom trabalho que os apreciadores de verdade vão te agradecer imensamente!
@Clear Code, thank you so much for the PyGame Tutorial. As an out-of-practice OOPython Programmer, I was going to use Encapsulation for the MANY Sprite similarities. However, you beat me to the punch and made it possible for me to practice my own OOP Experience against yours. Thank you so much for both the challenges and the video as I worked on my GameJam for the month. It really meant a lot!
Hello there! I am learning python for the last months, i came across with many video tutorials, your teaching method is great, you explain every point of your thought, and that's the way for students to proceed. I am watching this video again again, taking notes, great reference video. Keep up the good work, and feel great about this. thank you
Hi Clear Code. I have been having a problem in this tutorial recently. At 1:21:17 in the tutorial, you are making a bigger rectangle relative to a already declared rectangle using the width parameter in the draw method. When you did this, it added a border instead of a rectangle, and it was larger than if you drew the rectangle without a border. The border was also hollow, so you put in another rectangle to fill in the space. In pygame version 2.1.1, I think this was changed, and when you try to put a border now, the border wont be larger than the original rectangle, it will fill in the rectangle a bit instead, leaving part of the center hollow. This means you can't make the rectangle bigger relative to another rectangle using this method. Do you have any other idea of how to do this instead? Edit: I finally realized there was a thing called the INFALTE method. I didn't realize that lol hahah
@@Dracanus1 To make the rectangle bigger now, you can type the next line pygame.draw.rect(screen,'Pink',score_rect.inflate(10,10)) The numbers are x and y respectively. It can be changed however you like.
@@LemonPengu18 - This seems to work - On Linux running pygame 2.1.2 (SDL 2.0.20, Python 3.10.6) It feels like it should throw some kind of deprecation warning, because this probably breaks existing code (as if Python 3 didn't break existing code...) Thanks.
For anyone wondering about the inflate method and how to get your boarder to round, the documentation covers that under drawing rectangles. What I ended up using was this: pygame.draw.rect(screen, 'Pink', score_rect.inflate(12, 12), border_radius=10) Edit: As far as I can tell you can do this with just one line. You dont need one with and one without.
Thanks CC. Great course 👍. One suggestion though, when you plan on overwriting code like you did while you explaining the sprite class, it would be easier to understand if you deleted the redundant code. Other than that this is top-notch stuff!
Now that you have a solid introduction for pygame, will you make an intermediate-level tutorial that includes the use of classes and more slightly advanced topics?
I think here at 2:04:10 we can just change the first variable in score_surf to currentime//1000, no need to change 2 lines and convert to integer, it works perfectly.
1:59:58 you need to call your function which is (display_score) inside your game_active , then you see timer on your screen ❤ 2:35:01 #obstacle_movment obstacle_rect_list = obstacle_movment(obstacle_list) not obstacle_rect_list😊 3:07:11 if you still have problem with fly animation use this in your game_active : if event.type == fly_animation_timer: fly_frames_index = (fly_frames_index + 1) % 2 fly_surf = fly_frames[fly_frames_index]😊
I did all the requirements for the 1st one, but it still doesnt show the score, it doesnt even appear on screen when I remove the rest of the elements, and the coords are correct,, is there anythingf needet to import or something?
Update, i found out that the error is in the -score_surf=test_font.render(str(current_time),False,(3,68,24))- line, which doesnt display the numbers. I tried displaying 'clock' instead of 'current_time' and it appeared on screen as . Also, when I start the program, the spaces in (fps= . ) are smaller for the first couple of frames, so obviously the numbers are invisible, I think my font didn't support numbers
Amazing video, all the other tutorials zoom through everything and I just end up copy-pasting without knowing what I am doing, thank you for the detailed explanations.
I'm roughly 50 minutes out from finishing but this was exactly what I was looking for. I could have read through the documentation (and still will) but this has really gave me a nice understanding of the basics of pygame to move forward with an action RPG I'm thinking of fleshing out. Thank you very much for the tutorial!
First of all, thank you for putting so much time into this. I really learned alot from your tutorial. I'd like to provide you with some constructive criticism if I may. Take it from a guy who watched all 4 hours of this. I appreciate how thorough you were and how you walked us through your thinking and mindset. However, you really started to lose me in the end and following this tutorial became painful. Many times you would go so fast and then test the game that I'd have to rewind and often I missed steps because you went so fast. I mustve had at least 20-30 errors that I had to figure out on my own because I was trying to keep up with you so much that I wasn't really paying attention to what I was doing. That also makes it very difficult to learn. I understand this isn't for the beginner but if that's the case, you shouldnt have did everything so manually at first then make it so simple at the end. All the back and forth had me losing track and it was very scatter brained. All that being said, I still do think you did a great job but in the future perhaps consider your audience and how they may be slower than you. Give them time to catch up before scrolling down 90 lines then scrolling back up 50 lines etc. Also maybe plan the video better ahead of time so it's not so all over the place. You still earned my like and sub.
You are exactly 3 weeks late😭 I needed a tutorial like this 3 weeks ago. I made this Tron game.. this video would have made it way easyy. Anyways I am making different games now.. this video surely will help me a lot🖖 Great Video!
2:04:17 You could have use the integer division operator // instead of /, and doing the conversion in a separate line, so you don't need to do it in different places in the code, like this: score = pygame.time.get_ticks() - start_time score = score // 1000
if you have the "no video mode has been set" problem, at 3:15:10 You need to create your player (3:14:15) AFTER you define your screen: (screen = pygame.display.set_mode(x, y))
what does a pygame developer say when they epically pwn someone in a video game?!? get_rect!!! xD (i am being held hostage in haiti by local gang members please help me)
I have to create a game in Python for a final project in college. I felt pretty lost until I found this video. It does a perfect job of highlighting the basic tools available through pygame and I learned more from this video than the last 3 weeks of class.
I do have one minor (possibly dumb) suggestion: instead of player_gravity, call it player_speed. Then, player_gravity is the value you deduct from player_speed in the while loop. This makes more sense to me :)
Amazing video, I've now added your Zelda and mario videos to a playlist and will be following along! I'm especcially excited for the Zelda clone video!! The best thing about your explanations is this; when you wanted to add a new feature you added it in a easy way just to get it in the code, but the more complex the game got, you had to go back and update the previous code so it worked or was more effcient. I really found this actually showed the workflow of a gamedev and it was great to see! Its a great lesson because it teaches different techniques but also allows creativity to blossom. Amazing work!
I learnt a little python 3 years ago, but then switched to c#. Having coded with c# since then and probably completely forgotten all the python syntax, I’m ready to jump back into python, and this seems like a good start !
I just started learning python today, I have to say the way you teach this is 100% the best way, giving time for people to figure shit out for themselves is *chef's kiss*
Awesome video! Tip to anyone reading this comment: At 2:35:15 you don't need to add the "else: return []". Instead, simply detent the first return statement once (hit backspace). Since we initialize the list to an empty list to begin with, the method will continue to return the empty list until it is updated.
Thank you so much for this video! I've been wanting to make video games for a long time yet had never started because I thought I'd needed to be a lot better at programming in order to start, but this video has helped a ton for understanding Pygame and core concepts for game programming :D
I was watching the video and asking one question.. Why nobody shows in these tutorials how to work with OOP... Than I got to the end of the video and I have to say, this is the best video on PyGame I watched so far ... THANK YOU VERY MUCH! I finally learnt something and I FINALLY understand the OOP better now.
If you like this kind of content please consider supporting me on Patreon
Thank you sir!
ee
Can I reach out to you for questions? Im using a function to display the score like you show and its not working. I also dont see where you called that function.
Love that you release an amazing, 4 hour tutorial like this and it just ends abruptly with, 'so I hope that was helpful' 😆
Seriously you do great job because:
+ explaining logical parts on seperate screen and then go into implententing
+ you make a chance to code by yourself
+ you just use simple drawing on screen to make code and logical parts more understandable
+ video is split on some smaller parts
+ tempo is accurate
Yeh thats right
I also like the fact that he makes videos talking about individual mechanics, as they can be used as ideas for smaller exercises for practising pygame.
for more experienced programmers, use 1.25x speed since u dont have to make sure u catch and understand everythin
@Ar! / Penyuin i meant that clear code is explaining eveyrhting so sometimes for more experienced programmers, if you put the speed to 1.25, you can go through a bit faster without worrying ur missing things. if u dont understand what clear code is saying, u dont have to set the speed to 1.25... it was just a suggestion
Agree great at teaching/showing/explainging, not to much, one by one, calm and a steady tempo
I just turned 60, I've been a technologist my entire adult life and have taught many "programming" courses (proprietary languages) for several fortune 100 companies but I'm relatively new to Python. I have to admit my first thought was, this person has a lot of nerve putting out an almost 4 hour video on the subject. I have to admit, when you're good, you're good and you are really good. I did the entire 3:47:57 over the course of 3 days and I got lost one time, _init_ instead of double underscores __init__. That's it. That was the one thing I screwed up, otherwise I learned a ton of new stuff and I'm, really pleased with how it all worked out. In my experience, it's pretty rare in these type of videos for the finished product to look like the author intended but you nailed it. Can't wait to learn more from you. Thanks! All the best, Dennis.
Thanks to your comment i was able to find out why did the code reached a recursion limit- i wrote init with two Ns 🫠
Yeah, that got me too, I think __init__ is for function, though
Python is the way. Every time I try to follow C++ tutorials, there's always version incompatibilities and compiler errors.
@@matyaspolzer5887 pretty hard innit mate
@@hybridknight2531 lol
I can't believe that you actually uploaded this free for everyone. This is one of the greatest tutorials I've ever seen. Thank you 💜
Indeed! I'm most impressed. I was able to learn so much by this simple tutorial. No, this is not a simple tutorial, it's actually a real mini course about the basics of python game and python itself.
"I hope it makes sense" said bro after doing the clearest explanation I've ever seen, excellent content.
Hahaha, how is it so hard to find programming education like this: the teacher actually spends time explaining concepts instead of explaining lines of code with fruits, colors, and animals while glossing over important material.
You are a godsend.
Lol 🤣🤣
Fruits colours animals 🤣🤣🤣
This had me laughing for a good minute
haha you're barely diplomatic but said it way better than I could have
Lmao. Seriously.
"Now if we run our code and set is_this_a_banana to False and print it to the screen, we can see that the terminal says False. Let's move on to Object Oriented Programming. Here we'll make a Dog class..."
this is tooooooooooo relatable :)
Never before have i experienced such a fun and pleasuring learning experience on any kind of video tutorial ever. I can only thank you for you effort, this is now to me the definition of quality content.
+
@@nats.3183 yup this is true
46 minutes, I am coding along the video. This is already my new favourite channel of youtube man !
The clarity of speech. The time given for self exercises. This channel is too much !! You are the boss
I'm halfway through and I really appreciate your teaching style. You move quickly but explain everything and why you're doing it. I'm trying to make a top down RPG game so I find it helpful to learn from a tutorial that's doing something different so i have to actually think about the concepts.
Never have I even paid this much attention to an online video tutorial. thanks for making it easy to understand. keep up the good work!
The quality of your videos is out of this world CC! Relaxing, valuable and the way you explain things is top notch.
I'd like to see a short 2D dungeon-like RPG level game idea with a simple scene changing - that would be a challenge :D
P.S. I miss your background tutorial music you used in flappy bird ^^
always happy to see you here and thank you so much! I am working on some more advanced games, and a rpg style game is definitely in there but the sooner ones will be space invader and a Mario clone :)
And half the people like the music and the other didn't, I don't really know if it should be there or not ^^
How is your game dev journey going by the way? I bet you made something cool already!
@@ClearCode Also could you cover custom menu bars? That would be great
Exactly! A 2D Retro Survival RPG game would be so cool, if the story line is also great, then life is complete :)
@@ClearCode It's going really great! As a fan of the Apple tech, I started doing iOS app development. Some of the first projects were the Pong game inspired by your video, lol. Having some solid programming knowledge, I'm planning to start a new channel about making apps to share my dev journey. Perhaps we would cross our content sometimes in the future. ^^
@@mixlaproduction WHAT? Do you think it'd be possible for you to teach me or like could you tell me how to begin developing apps in python and begin learning this stuff? I stumbled on this channel months ago but post poned it until my school was on break thats why I'm gonna go through this video and code my own project then just code everything this guy has on his channel.
I started at a more difficult tutorial of yours that I was loving but could not get past an issue I was running into. Starting back from the beginning and solidifying the basics with this video helps so much. From all the videos of yours I've followed I have always loved how clearly you explain these concepts. You make it easy to understand! Thank you for all your videos! I can tell I'm learning especially when there is an urge to clean up the code while working through it, when at one point I didn't even know that was a thing!
Gravity in the real world makes objects to fall quadratically, not exponentially. Your implementation of gravity is actually physically accurate.
It's mostly because of mario we do that- because if mario fell accurately he'd fall really slowly
If something has a mass and if you make it faster its mass will increase and if that thing is going down it will go down faster in every second
@@erdenejargalbattulga2891 the effect of said supposed change in mass is so negligible it's passed off in a rounding error
@@erdenejargalbattulga2891 only significant the closer you go to the light speed....
1:36:19
He already knows this lol
Your videos literally seems like magic. It's amazing how you go step by step on each process and also give us exercises to try on our own. I hope you keep making more videos and your channel grows exponentially.
This is such a great tutorial!! I never leave comments but I have to thank you for explaining everything so clearly and explicitly. I was starting the pydew tutorial and almost didn't do this one because I followed a few pygame tutorials before, but this one really helped me actually understand what I was doing lol. Thank you!!
This is one of the best tutorials I've watched. He explains everything and makes it really easy to visualize how it works, and different ways to use it. This is one of the few long tutorials I've followed to the end, and I enjoyed every second of it. 10/10, would recommend.
I’m learning how to code in Python at school and this video has been very helpful for my final project, I can’t enumerate how thankful I am for Clear Code and his tutorials, they’re amazing
What an excellent tutorial! I finished almost a third of it and I am following the instructions without any obstacles. Well done!
This is honestly one of the best tutorials I've ever watched. You get little exercises every now and then (keeping you from falling asleep) that aren't too easy, but still easy enough to make you feel like you're smart. The video is entertaining but you also learn a lot, and it's very easy to follow. This was the first tutorial that was fun for me to follow along
lost my house to recent hurricane fiona. watching your videos kept me going now im following along to up my pygame skills. by far the best way to get good at python. thank you
Hey, thank you so much and so sorry what happened to you, hope things are getting better now!
@@ClearCode least I could do brother.
Got your house back?
Dude I just started looking to learn how to make games with pygame and I am so thankful that you uploaded this at such a perfect timing
Thank you for this tutorial. It's the first time I've watched a 4 hour tutorial back to back, and every minute was packed with value. Great job!
I just finished coding along this project, it took me about a week, and I'm very proud of myself and how the game turned out! Thank you so much for this awesome tutorial! Will be tackling next ones soon!💯
I love the way you structure your videos. its like ok i just taught you and showed you now you try to do this part on your own, and guess what, i did it on my own.
Hi, I just want to say thank you for making tutorials like this! I've always wanted to try my hand at making games. I followed your python tutorial and now this one and I love your style of teaching. The way you present the information, then show it in code and leave exercises for the viewer is very helpful. I plan to watch your piedew valley and zelda tutorials after this, but first I'll try making some easy games myself to solidify your teachings. Cheers!
I love how ur aesthetics also carry over to the games you make
This is absolutely fantastic. So well explained. Slowly but interestingly dealt with and so I feel like I'm actually learning fundamentals and can come back to this on my own at a later date and actually create my own stuff!
I'm so happy that this has so many (well deserved) likes and views.
Thank you.
I just discovered this tutorial. I'm only 47:46 into the video and I can already tell that this is by far the best video tutorial I've seen to date on UA-cam. The presenter is clear and concise. He explains what is going on in the program/code without being overly technical or simplistic. I'm a fairly good Python programmer and decided to expand my knowledge into game development. All I can say is "Wow!" I'm looking forward to completing the entire tutorial.
You should move to Godot, pygame is DEAD
@@beepbot lol I looked at pygame about 5:years ago. It's all dead social media and the forums, questions never got an answer....you know that there is no more development on the framework right?
@@foreignwarren7361 no one asked
@@pidro1954 so what, doesn't change the fact pygame is shit and a waste of time....trying to save folks.
@@foreignwarren7361 wtf are you doing here then ?
Your tutorials are top notch my friend. Comprehensive, both theory AND code, and the big kicker is the exercises. I did the first few hours of 3 different Python for Beginners courses before finding yours. Took me a few weeks, but I finally finished it. And now here you are teaching me Pygame in the same comfy, and well detailed learning environment.
Thank you so much for the time you take to make these videos!
I have to say that your tutorials really stand out from the rest in terms of quality and learning speed. Everything always works as you specify and remains understandable. The Godot 4 tutorial was great, and I think this one is also very good. Thank you for that.
Decided to learn pygame for fun. Have to say that I was losing motivation before I found this video. Explained simply, not overcomplicated and not too fast. Really helpful that you explain the idea before implementing the code. You gave me a ton of motivation to learn again! Thanks!
Who else woke up to this
it's a sign
@@Illager_Fries_Gaming I'm not that smart foo 😂🤷♀️ I was watching dj Ghost
i was watching some dude make hollow knight in minecraft and woke up to this
Yea, youtube is hungry for money and automatically play 3h+ videos when it’s detecting that you are asleep. They then proceed to play a shit ton of advertisements.
I just did
there is no way this tutorial have this less view !!
it explains so easily !! its quality is too good than any other pygame turtorial !
Thank you so much for this awesome video !!
It deserves much more !
Good morning Sir !!
@@peenywallie What a Great Weather we have !!
I knew about 60% of what you explained and I still watched every second of the video! Your structure, tone and patience is admirable. Thank you for creating this content!
I really can't express how happy I am to have found this video. I had been dabbling with learning programming, and using python in particular, but every course or lesson I found online was so abstract that it was difficult for me to follow along. This was genuinely so helpful to just follow along and learn with, that I feel more confident after this 4 hour video than I did after completing CS50, and I can't praise you enough for that!
This was the clearest and best explanation of python I have ever seen
Best tutorial
Honestly I'm new to pygame and this has taught me soo much
other tutorials are hard to follow but this is easy to follow
i love showing my parents and friends my progress
thank you
I can't put into words how much I appreciate you putting out this video, and the pace at which you explain things for beginners like me. Thank you so much. I wish you all the best.
Just finished watching and coding along with this video; I have officially created my first video game! 🎉 Very impressed with your channel, and I look forward to creating more projects from your videos and becoming a better programmer!
I've just started learning pygame and developing game apps. I found some tutorials, on you tube, that were good but yours are excellent! You're very precise and explain every step of the way, clearly.
Thank you for these excellent teaching videos.
(note for myself)
1:10:00 mouse stuff
2:23:50 enemy logic
2:50:00 animation
probably indent errors ;)
don't mind me using that too
waht a
thanks
You are an amazing teacher. This tutorial is the first one I found that explains everything in the most meticulous details. Thank you!
Yes
I have followed many pygame tutorials but this is the best one because he explains everything...
Unn G
I'm really weary of falling into tutorial hell, but you told us the inner workings so well that I seriously have been confident enough to do my own stuff after this tutorial. Thank you so much this might be the best programming tutorial I have ever seen.
same feeling bro, 30mins in finally found a good tutorial. Subbed, following this guy from now on :)
@@liangchen4679Yeah! I ended up making a simple snake clone after this video and then switched to MonoGame. Stuff I learnt in this videos still applies to MonoGame, so you really can't go wrong with this.
The greatest tutorial i have ever seen!!
Watched 32 mins so far and this is the best tutorial I've seen, liked and subscribed.
This was excellent! I've just jumped into programming in Python and this tutorial is exactly what I was looking for. Kudos and thank you!
Really great teacher. You are very helpful to the community and anyone who wants to learn.
You Sir , are a gift for this planet,the way you are explaining it is just awesome. I prefer watching you doing this game that watching Netflix! I'm not even a code developper, braught here by the UA-cam algorithm and I'm very thankful to find your channel, Sir. Thank you for your existence and your generosity for sharing your methods with the rest of the world. Salutations from France.
i 've been through a lot of programming courses, but your course is so different , simple ,concise and straight forward . keep the great work
This video was a blast !! Not only the quality but the nice pace, the exercises, the explanations... everything was wonderful.
I just program for fun whenever I feel like it, and now i'll watch your 8h video making a Zelda style game since it brought me here in the first place ^^
This is a great tutorial. I am still in the middle of my python course on Udemy (still making a black jack game - just using the in built python modules) but one goal I have is to make a simple turn based xcom style game based on Stargate and this really opened up my eyes into what is possible. Thanks very much
this video has explained Python better to me than 3 months of university lectures
I usually do not comment to any youtube videos, but this one is an exception. You explained everything with so much detail and clarity and kept the changes that each piece of code makes to the game. The pace with which you explained the concepts is neither too slow nor too fast. I found this tutorial as THE tutorial to learn pygame. Thank you so much for putting in so much effort and time to make this video to help beginners like myself!
Man this is the best tutorial i have seen on youtube so far . thanks for providing this top tier tutorial for free
you're the bestest best person in this world. this is amazing.
I've watched the entire video and I want to say thank you so much! This tutorial is really great. The explanation is easy to understand and I especially love how there are exercises in between which I don't see much in other tutorial videos. I have so much fun coding this !
Everything was making sense until 2:30:01 when better enemy logic came and destroyed me 😂
EDIT: I WENT THROUGH IT AND ALL OF IT DID MAKE SENSE AND NOW I HAVE A AMAZING GAME
dude such a start and general attitude, great lecture for both practical and theoritical aspects! keep up! seriously so good!
Finally, I've found a video with 100% detailed explanation for every step and even more! I now understand how pygame works and it made my life so much easier. Thank you so much for your kind help for those of us, who really needed this tutorial.
"We could run this" *Me: running it* "But you won't be able to close this" *Also me: Ah shitt*
Hey can you make some games using OOP? I've been doing some of your tutorials and well they end up getting really messy for me, and it would just be great if you start teaching us how to implement OOP to keep our code more organized.
Canal tão injustiçado.
O cara faz um vídeo completão desse na línguagem mais popular do mundo na biblioteca de jogos mais completa nessa língua e ainda é inglês pra literalmente todo mundo aprender.
Mas tão pouco inscritos e likes e relativamente poucas views... Não faz sentido!
Falo por mim como brasileiro, esse canal é esplêndido! E tenho certeza que o sortudo que achar esse canal vai falar o mesmo. Continue com o bom trabalho que os apreciadores de verdade vão te agradecer imensamente!
Pro nicho que é programação + python + game development, o video é relativamente bem popular até.
Mas realmente o canal devia ter muuuuuuuuito mais inscritos
@Clear Code, thank you so much for the PyGame Tutorial. As an out-of-practice OOPython Programmer, I was going to use Encapsulation for the MANY Sprite similarities. However, you beat me to the punch and made it possible for me to practice my own OOP Experience against yours. Thank you so much for both the challenges and the video as I worked on my GameJam for the month. It really meant a lot!
Hello there! I am learning python for the last months, i came across with many video tutorials, your teaching method is great, you explain every point of your thought, and that's the way for students to proceed. I am watching this video again again, taking notes, great reference video. Keep up the good work, and feel great about this. thank you
Hi Clear Code. I have been having a problem in this tutorial recently. At 1:21:17 in the tutorial, you are making a bigger rectangle relative to a already declared rectangle using the width parameter in the draw method. When you did this, it added a border instead of a rectangle, and it was larger than if you drew the rectangle without a border. The border was also hollow, so you put in another rectangle to fill in the space. In pygame version 2.1.1, I think this was changed, and when you try to put a border now, the border wont be larger than the original rectangle, it will fill in the rectangle a bit instead, leaving part of the center hollow. This means you can't make the rectangle bigger relative to another rectangle using this method. Do you have any other idea of how to do this instead?
Edit: I finally realized there was a thing called the INFALTE method. I didn't realize that lol hahah
Hey, where did you use the inflate method? For me it's not working properly.
@@Dracanus1 To make the rectangle bigger now, you can type the next line
pygame.draw.rect(screen,'Pink',score_rect.inflate(10,10))
The numbers are x and y respectively. It can be changed however you like.
@@LemonPengu18 - This seems to work - On Linux running pygame 2.1.2 (SDL 2.0.20, Python 3.10.6)
It feels like it should throw some kind of deprecation warning, because this probably breaks existing code (as if Python 3 didn't break existing code...)
Thanks.
For anyone wondering about the inflate method and how to get your boarder to round, the documentation covers that under drawing rectangles. What I ended up using was this:
pygame.draw.rect(screen, 'Pink', score_rect.inflate(12, 12), border_radius=10)
Edit: As far as I can tell you can do this with just one line. You dont need one with and one without.
Thanks, that was an issue I was searching an answer for too.
Thanks CC. Great course 👍. One suggestion though, when you plan on overwriting code like you did while you explaining the sprite class, it would be easier to understand if you deleted the redundant code. Other than that this is top-notch stuff!
Now that you have a solid introduction for pygame, will you make an intermediate-level tutorial that includes the use of classes and more slightly advanced topics?
yes!
@@ClearCode yay!
@Qki Would love to know that too
It's coming soon... right?
Dude I have been following you're tutorials for a while and they are fire keep up with the good work! :)
This is really what I wanted. Explaining everything what I really wanted.
Man you are really great!! THANK YOU SOO MUCH.
Day 1 (23/02): 22:25
Day 2: 1:29:34
Day 3: 2:23:38
Day 4: end
I think here at 2:04:10 we can just change the first variable in score_surf to currentime//1000, no need to change 2 lines and convert to integer, it works perfectly.
1:59:58
you need to call your function which is (display_score) inside your game_active , then you see timer on your screen ❤
2:35:01
#obstacle_movment
obstacle_rect_list = obstacle_movment(obstacle_list) not obstacle_rect_list😊
3:07:11 if you still have problem with fly animation use this in your game_active :
if event.type == fly_animation_timer:
fly_frames_index = (fly_frames_index + 1) % 2
fly_surf = fly_frames[fly_frames_index]😊
I did all the requirements for the 1st one, but it still doesnt show the score, it doesnt even appear on screen when I remove the rest of the elements, and the coords are correct,, is there anythingf needet to import or something?
Update, i found out that the error is in the -score_surf=test_font.render(str(current_time),False,(3,68,24))- line, which doesnt display the numbers. I tried displaying 'clock' instead of 'current_time' and it appeared on screen as . Also, when I start the program, the spaces in (fps= . ) are smaller for the first couple of frames, so obviously the numbers are invisible, I think my font didn't support numbers
That was the solutipon, I had to use anothert font sorry for bothering ;)
Amazing video, all the other tutorials zoom through everything and I just end up copy-pasting without knowing what I am doing, thank you for the detailed explanations.
I'm roughly 50 minutes out from finishing but this was exactly what I was looking for. I could have read through the documentation (and still will) but this has really gave me a nice understanding of the basics of pygame to move forward with an action RPG I'm thinking of fleshing out. Thank you very much for the tutorial!
First of all, thank you for putting so much time into this. I really learned alot from your tutorial. I'd like to provide you with some constructive criticism if I may. Take it from a guy who watched all 4 hours of this. I appreciate how thorough you were and how you walked us through your thinking and mindset. However, you really started to lose me in the end and following this tutorial became painful. Many times you would go so fast and then test the game that I'd have to rewind and often I missed steps because you went so fast. I mustve had at least 20-30 errors that I had to figure out on my own because I was trying to keep up with you so much that I wasn't really paying attention to what I was doing. That also makes it very difficult to learn. I understand this isn't for the beginner but if that's the case, you shouldnt have did everything so manually at first then make it so simple at the end. All the back and forth had me losing track and it was very scatter brained. All that being said, I still do think you did a great job but in the future perhaps consider your audience and how they may be slower than you. Give them time to catch up before scrolling down 90 lines then scrolling back up 50 lines etc. Also maybe plan the video better ahead of time so it's not so all over the place. You still earned my like and sub.
You are exactly 3 weeks late😭 I needed a tutorial like this 3 weeks ago. I made this Tron game.. this video would have made it way easyy. Anyways I am making different games now.. this video surely will help me a lot🖖
Great Video!
2:04:17 You could have use the integer division operator // instead of /, and doing the conversion in a separate line, so you don't need to do it in different places in the code, like this:
score = pygame.time.get_ticks() - start_time
score = score // 1000
Or score //= 1000
Or score = (pygame.time.get_ticks() - start_time) // 1000
I just completed the tutorial, and I have to say, I learnt more from this tutorial than I did from a year long coding course! Great job!
Huge thanks for such a wonderful introduction not only to the pygame module but also to the world of gamemaking! You're great!
I'm gonna try make basically a clone of mario using this tutorial hope it goes well.
send link plz
same :P
im trying to make a clone of geometry dash with this video
DiD ot go well?
if you have the "no video mode has been set" problem, at 3:15:10
You need to create your player (3:14:15) AFTER you define your screen: (screen = pygame.display.set_mode(x, y))
thanks a lot dude,I was so frustrated because of this issue
AttributeError: 'Player' object has no attribute 'rect' :(((
Do you know how to select multiple units like in a RTS game and deploy them on a 2d map?
hehe that would be interesting to know :)
Nothing hard, just get selection square bound, iterate over units and add them into a list of selected units
This is hands down the best programming tutorial I've ever encountered. Thank you so much!!!
You are such a great teacher! Giving examples and time to do it on our own helps with the learning and lets us use what we already know. Thank you!
"Please dont call the code right now"
Me who already did that: -_-
same
Personal timestamp - 3:09:36
what does a pygame developer say when they epically pwn someone in a video game?!? get_rect!!! xD (i am being held hostage in haiti by local gang members please help me)
I have to create a game in Python for a final project in college. I felt pretty lost until I found this video. It does a perfect job of highlighting the basic tools available through pygame and I learned more from this video than the last 3 weeks of class.
By far the best programming tutorial I have ever watched, every second is worthwhile, I truly appreciate your effort, +1 subscribed :)
I do have one minor (possibly dumb) suggestion: instead of player_gravity, call it player_speed. Then, player_gravity is the value you deduct from player_speed in the while loop. This makes more sense to me :)
Instructions unclear accidentally made minecraft
😂😂
Amazing video, I've now added your Zelda and mario videos to a playlist and will be following along! I'm especcially excited for the Zelda clone video!! The best thing about your explanations is this; when you wanted to add a new feature you added it in a easy way just to get it in the code, but the more complex the game got, you had to go back and update the previous code so it worked or was more effcient. I really found this actually showed the workflow of a gamedev and it was great to see! Its a great lesson because it teaches different techniques but also allows creativity to blossom. Amazing work!
This tutorial left me actually wanting to come back after taking breaks every like 45 mins, and you explain it really well!
I learnt a little python 3 years ago, but then switched to c#. Having coded with c# since then and probably completely forgotten all the python syntax, I’m ready to jump back into python, and this seems like a good start !
I just started learning python today, I have to say the way you teach this is 100% the best way, giving time for people to figure shit out for themselves is *chef's kiss*
Awesome video! Tip to anyone reading this comment: At 2:35:15 you don't need to add the "else: return []". Instead, simply detent the first return statement once (hit backspace). Since we initialize the list to an empty list to begin with, the method will continue to return the empty list until it is updated.
I'm new to the channel, and absolutely impressed with the quality. The pacing and detail of this video; course, really; is phenomenal. Great job!
Best pygame tutorial ever. Thanks a lot man. I'm impressed how much work you put into this.👏🏻👏🏻
Thank you so much for this video! I've been wanting to make video games for a long time yet had never started because I thought I'd needed to be a lot better at programming in order to start, but this video has helped a ton for understanding Pygame and core concepts for game programming :D
I was watching the video and asking one question.. Why nobody shows in these tutorials how to work with OOP... Than I got to the end of the video and I have to say, this is the best video on PyGame I watched so far ... THANK YOU VERY MUCH! I finally learnt something and I FINALLY understand the OOP better now.
You should check out DaFluffyPotato's pygame tutorials