Tim, not many people out there teach code in such a comprehensive and easy to digest manner like you do. Most tutorials are really hard to follow and the person teaching is either super unorganized, or just really bad at teaching in general for many reasons. But you get it dude, and people like me (people who wanna learn,) appreciate it a ton
i am new to python and pygame but i can say it has been the best 43 min of my time with coding.. and i never thought i will go through the day without using print() message = "good bye!!" print(message)
THIS WAS THE BEST TUTORIAL EVER I HAVE GONE THROUGH OVER 50 VIDEOS AND I ALWAYS GIVE UP BECAUSE THEY ARE TOO HARD BUT THIS WAS A VERY SIMPLE YET FUN PROJECT! TY SO MUCH KEEP IT GOING!
To be as knowledgeable as you clearly are and still be able to dumb it down enough to communicate that knowledge to a complete beginner is a rare skill. You made this SO easy. Thank you!
Pygame has been a lot of fun to learn... I'm still in the learning phase but the gears are already turning when thinking of new ideas to try and implement. Thank you for the great help... it only gets clear with practice and good guidance like you provide here 👍
Tim, thank you very much for this great tutorial. I got so addicted over the weekend that I changed the game to run in full screen, added sounds and music, lives, etc. As you said, it is great starting point and as well a real good example to give pupils an intro into programming on a fun way.
My boyfriend is super excited about teaching me how to code so I'm making a game to surprise him. This tutorial is super easy to follow and I am so thankful that you explain what the code does as you go through the steps for newbies like me. This is so helpful 🙏🙏
After watching just 2 of you videos, the "Learn Python with this one project" you made 5 months ago, and this one I decided to write the code to print a full times table to the console (will do it to a game window next) and I spaced all the numbers correctly in the console so they appear in nice columns... single digits and double digits made the spacing all wrong. Nothing fancy but its little bits like this that build familiarity with the syntax. My goal with pygame is to build a spirograph style project as I remember spending all my lunch breaks on the schools BBC micro in the science labs when I was 15 playing with the code to generate the images the time and effort you put into these tutorials is greatly appreciated and I will be going through all your videos to aid my learning journey.
This is nice, normally i thought python would be hard compared to CSS but with this lesson, i realized that it is actually simpler than i expected. From me to you, "Dude, I love your tutorials"!!!!!!
This was honestly such a fun tutorial! I now have a functional game that I can show off and mess with to try to work on my code abilities! Thank you! I was also able to add a lot of your descriptions as to why you put certain things where you did that way I can reference back to it if needed! Great tutorial!
Hey Tim! I just wanted to say how much I appreciate these videos! I am using them to learn python and it's going well for me. I'm about halfway done with this one rn, I look forward to following many more of you're tutorials! Thanks again.
Really grateful for this video. I had a bit of a rocky start and I had to rewind about 50 times because I was making errors but you explained everything clearly and concisely. I've got a long way to go but you have helped me take my first few steps on realizing some daft and hopefully fun ideas Thanks again :)
Wanted to make a comment to house the code. Fantastic tutorial. I recommend watching other videos on python to simply get an understanding of loops and variables. Then coming back. Makes the whole thing a lot more understandable !!
This tutorial was amazing and even turned it into a game about traversing a asteroid belt, I managed to replace the squares with images and now all I need to do is figure out on making a menu, and import audios along with a small tutorial box at the start
Incredible tutorial Tim!! The only thing that would have been more helpful for me to understand would probably be adding doc strings for functions and a few in line comments.
TIm, thank you so much for all of your great videos. They've been great for me to follow along and learn python. I wish you have an extended part of this video or a connected video that went into putting a graphic sprite as you mentioned so you could have more than just a red block. I went nerdy and made my background a space and TARDIS image and themed the messages and name from Doctor Who, but I am not nearly advanced enough to know how to change it to a sprite.
Really nice tutorial! If you guys finished this tutorial, try to figure out how to make game restart automatically after you got hit by "star" and then try to add score system. You learn best when you have to figure out thing on your own :)
yo I'm not going to lie, I'm a new programmer and this vid don't go into to while loops that much, But it made me understand while loops more then a video on them. Great job!
Thank you very much for helping me/us learn to code in this practical and explanatory way. You are clear and direct with your explanations and provide a good basis to move on from.
I got so many things wrong while doing this > < but I pushed through and hunted down my errors Great tutorial! very good for getting to grips with the simple elements needed for game making.
Tim, you have done a really great job of teaching this game to me I am very new to using pygame and I found this quite hard to do until I saw your video just one suggestion if you could also post some video's on customizing this game it would help a lot :)
Thank you so much for this introduction to game programming in Python. Nice tutorial with all the necessary knowledge. I very much appreciate your effort. THANK YOU.🙂
the stars wont delete after they collide with the player. I think i made a mistake or something but other than that your explination and everything was on point and perfect
this was a good project. thank you for sharing this. I have been a lot of the day going through this and even tinkering with the moving the character. I even added the up and down feature to play around with it just to see how that would work. But changed it back to just left and right. so much you can do with just what you showed here. thanks. and thanks again. only one problem I have with this is that my "stars" seem to be rotated the wrong way. lol. makes it a bit harder I guess. But awesome.
If your on a more current version of pygame or python, you may have to change the keys script. Try doing ‘if keys()[pygame.K_LEFT]:’ instead of ‘if keys[pygame.K_LEFT]:’
Could you explain why you have to do the star_count += clock.tick(60)? Couldnt you just do star_count += 5 or something since it's already in the main loop?
Does anyone knows how to fix this problem i typed everythink same as him but when i launched it it does not close it closes only if you close the run window /_ /
Thanks for the video. I always loved your videos keep it up. made the whole project and learnt a lot about pygame. never seen any tutorial like this on pygame
Tim, our master, Is this significantly beginner-friendly? To ensure everyone can follow through on the projects and videos you post daily, please give us some insight into the necessary prerequisites. We love you keep up the good work.
This isn't beginner friendly. You should already know about variables, functions, loops and be able to write some small logic in order to visual how everything is working in ur mind, otherwise you will probably feel lost. This is probably low intermediate to medium intermediate level
Im confused on how to get to the python menu that you are in, when i open my python terminal its just a black screen with some text but no with all of the stuff on yours. Just wondering how you installed python.
I think the if hit statement should come after draw function because we want our players to see the collision or else there will be a gap between the player and the star when the game ends
Hey folks I'm at the point where I have to draw the rectangle, but it just won't show up. I followed the code as shown in the video but it still doesn't appear. Is there a way to fix this?
Hey! Thanks for the tutorial, I finished it and completed it. However, I went through the code and can't find the issue, (my stars only come down when moving to the right), any idea what I could have done wrong? Thanks!
i am very noob with coding and currently doing a follow through.. for some reason after adding the bg.jpeg file and adding the draw call function, nothing pops up. What might have cause this? I am using visual studio in mac.
such a good and helpful video but i would loove if u had shown how we can use a custom sprite.. i had to spend a lot of time on that and ended up using chatgpt but otherwoise amazing video
after drawing the projectiles, when i try to launch in, after 2 seconds it crashes and says "AttributeError: 'list' object has no attribute 'y'" what can i do to fix it?
can you make gamedev tutorials with languages which are commonly used in the gamedev industry? like without a game engine but with opengl or sdl for example? there are other tutorials out there but I've been watching you since 2016 and you're way of teaching is much better than anyone else
You can use functions, and if you want a menu and more thing, you should create a main function first and in that function you initialize pygame, and to change between menu, game,etc, you need to create more functions inside the main each one with it's individual while True loop
And of course the variables, for pygame related variables you can create them in the main func, and call it from any place, but for normal variables you need to create them in the function where it will be used.
I was finally able to import a background image. The only thing now I’m having difficulty with is the caption when the window pops up the background image is showing except there is no caption. It’s a blank white bar. I can exit the window and close the window, but unfortunately, there’s no caption to the window and I have the code written
Tim, not many people out there teach code in such a comprehensive and easy to digest manner like you do. Most tutorials are really hard to follow and the person teaching is either super unorganized, or just really bad at teaching in general for many reasons. But you get it dude, and people like me (people who wanna learn,) appreciate it a ton
i am new to python and pygame but i can say it has been the best 43 min of my time with coding..
and i never thought i will go through the day without using print()
message = "good bye!!"
print(message)
or you can just print("goodbye!") or am i missing something?
@@ok.9516 u can but it looks more professional to write a variable for some reason
@@ok.9516, yes but it looks more advanced, that's why.
@@ok.9516 Yes you can do that, but they're making a joke.
@@ok.9516 its just good practice to use variables
TechWithTim = "The Goat Of Python"
if 2 > 1:
print(TechWithTim)
Output:
The Goat Of Python
THIS WAS THE BEST TUTORIAL EVER I HAVE GONE THROUGH OVER 50 VIDEOS AND I ALWAYS GIVE UP BECAUSE THEY ARE TOO HARD BUT THIS WAS A VERY SIMPLE YET FUN PROJECT!
TY SO MUCH KEEP IT GOING!
Are you taking ap csp
what is that????@@marc8451
To be as knowledgeable as you clearly are and still be able to dumb it down enough to communicate that knowledge to a complete beginner is a rare skill. You made this SO easy.
Thank you!
Pygame has been a lot of fun to learn... I'm still in the learning phase but the gears are already turning when thinking of new ideas to try and implement. Thank you for the great help... it only gets clear with practice and good guidance like you provide here 👍
Tim, thank you very much for this great tutorial. I got so addicted over the weekend that I changed the game to run in full screen, added sounds and music, lives, etc. As you said, it is great starting point and as well a real good example to give pupils an intro into programming on a fun way.
3:58
This is the first tutorial I got all the way through for Python. Very well made, thank you.
For anyone who's recently upgraded to Python 3.11, you'll need to add --pre to your pip command until they update PyGame.
That explains a lot... been having issues especially while debugging
add how/where? beginning? end?
@Joshua Rose very helpful to a beginner thank you
@Joshua Rose and where can one find this documentation?
do you say --prepip install pygame? doesn't work for me i'm confused
As a beginner python coder: your tutorials help me so much. Keep making them!
My boyfriend is super excited about teaching me how to code so I'm making a game to surprise him. This tutorial is super easy to follow and I am so thankful that you explain what the code does as you go through the steps for newbies like me. This is so helpful 🙏🙏
i wish you guys break up lol
You're GOATED bro.I respect your dedication after all these years from when you were very young...Keep it up
After watching just 2 of you videos, the "Learn Python with this one project" you made 5 months ago, and this one I decided to write the code to print a full times table to the console (will do it to a game window next) and I spaced all the numbers correctly in the console so they appear in nice columns... single digits and double digits made the spacing all wrong.
Nothing fancy but its little bits like this that build familiarity with the syntax.
My goal with pygame is to build a spirograph style project as I remember spending all my lunch breaks on the schools BBC micro in the science labs when I was 15 playing with the code to generate the images
the time and effort you put into these tutorials is greatly appreciated and I will be going through all your videos to aid my learning journey.
Thank you for that brilliant video, which opened another exciting programming way for me. 😁
This is nice, normally i thought python would be hard compared to CSS but with this lesson, i realized that
it is actually simpler than i expected.
From me to you, "Dude, I love your tutorials"!!!!!!
Wow thanks for the comment!
This was honestly such a fun tutorial! I now have a functional game that I can show off and mess with to try to work on my code abilities! Thank you! I was also able to add a lot of your descriptions as to why you put certain things where you did that way I can reference back to it if needed! Great tutorial!
First attempt, first game. Excellent tutorial, Your style of teaching is brilliant. Thank you very much!
I'm so happy I made this. I feel like I really got a foot in the door for game dev
Hey Tim! I just wanted to say how much I appreciate these videos! I am using them to learn python and it's going well for me. I'm about halfway done with this one rn, I look forward to following many more of you're tutorials! Thanks again.
Really grateful for this video. I had a bit of a rocky start and I had to rewind about 50 times because I was making errors but you explained everything clearly and concisely. I've got a long way to go but you have helped me take my first few steps on realizing some daft and hopefully fun ideas
Thanks again :)
Keep it up broo....I REALLY LOVE YOUR TUTORIAL
I finished the game, and I wasn't able to do the text, as I was using too old a version of python but I got it working and it's great! thanks!
Wanted to make a comment to house the code. Fantastic tutorial. I recommend watching other videos on python to simply get an understanding of loops and variables. Then coming back. Makes the whole thing a lot more understandable !!
This tutorial was amazing and even turned it into a game about traversing a asteroid belt, I managed to replace the squares with images and now all I need to do is figure out on making a menu, and import audios along with a small tutorial box at the start
Bro I Learned All of Pygame In this ONE tutorial
Incredible tutorial Tim!! The only thing that would have been more helpful for me to understand would probably be adding doc strings for functions and a few in line comments.
TIm, thank you so much for all of your great videos. They've been great for me to follow along and learn python. I wish you have an extended part of this video or a connected video that went into putting a graphic sprite as you mentioned so you could have more than just a red block. I went nerdy and made my background a space and TARDIS image and themed the messages and name from Doctor Who, but I am not nearly advanced enough to know how to change it to a sprite.
Well, this is the first pygame tutorial that actually made sense to me, thanks!!
I just made a strategy game in Python. Very happy.
You motivated me to make my own channel and teach programming. And so I did !! ))
Thanks tim made the game watched till the end always love your videos
I enjoy coding along with different projects, learn something new each time. Thank You
Glad you enjoy it!
Wow this is what I've been searching for!
Really nice tutorial! If you guys finished this tutorial, try to figure out how to make game restart automatically after you got hit by "star" and then try to add score system. You learn best when you have to figure out thing on your own :)
yo I'm not going to lie, I'm a new programmer and this vid don't go into to while loops that much, But it made me understand while loops more then a video on them. Great job!
Thanks man. Learned a lot from this tutorial, keep it up!
THANK YOU SO MUCH FOR THE TUTORIAL! now I can flex my work to my Big Bro!
Sat here watching this and this type of game was one of the first games I ever made when I got my 16k ram pack for my ZX-81
as a beginner, thanks a lot, the video was very clear and you explained the reasoning behind each step which i found very useful.
If there were a contest for the longest ads on a post you would win hands down!!!
I love this tutorial!
A real kickstart into Python if you already have some programming knowledge :)
Watched one video and already Subscribing. You make python language a lot easier than what im learning it in a duolingo type way.
Thank you very much for helping me/us learn to code in this practical and explanatory way. You are clear and direct with your explanations and provide a good basis to move on from.
That point u said if u reached this point u have tried boosted my morale to finish it 🏋️
I got so many things wrong while doing this > < but I pushed through and hunted down my errors
Great tutorial! very good for getting to grips with the simple elements needed for game making.
i cant run the game it says pygame.rect.Rect' object has no attribute 'append' can someone pls help me?
Hi getting erro with for event in pygame.event.get():
Screen popping up but disappearing. Doesn't stay there like you said.
Any idea how to fix?
Thanks for this awesome tutorial Tim, I needed this :)
Yoo thank you so much I've been wanting to learn pygame for so long!
Coding with Tim. Sounds like excellent game title.😊
At this part 8:16 it keeps saying my file is not found in directory, please help me
@@muhammadaristil3191 i used .jpg but it still doesn't work, idk how fix :(
@@muhammadaristil3191 oh nvm i understand now, thanks for the help
This was my first experience of using pygame and it was good
Tim, you have done a really great job of teaching this game to me I am very new to using pygame and I found this quite hard to do until I saw your video just one suggestion if you could also post some video's on customizing this game it would help a lot :)
my first time using python! thank you!
Thank you so much for this introduction to game programming in Python. Nice tutorial with all the necessary knowledge. I very much appreciate your effort. THANK YOU.🙂
the stars wont delete after they collide with the player. I think i made a mistake or something but other than that your explination and everything was on point and perfect
Extreamly good explanation with good examples. Keep it up!
thanks for going step by step. I'm very new to this!
Thank you very much for this video I really needed it! And you have great content! Subbed you
😀
22:11 the rectanlge is going of the screen on the left side but not on the right side help me quickas possible
TWT majoring on the majors! Pygaming like a BOSS!
It was a very good session learned a lot 🎉
this was a good project. thank you for sharing this. I have been a lot of the day going through this and even tinkering with the moving the character. I even added the up and down feature to play around with it just to see how that would work. But changed it back to just left and right. so much you can do with just what you showed here. thanks. and thanks again. only one problem I have with this is that my "stars" seem to be rotated the wrong way. lol. makes it a bit harder I guess. But awesome.
If your on a more current version of pygame or python, you may have to change the keys script. Try doing ‘if keys()[pygame.K_LEFT]:’ instead of ‘if keys[pygame.K_LEFT]:’
well done bro!!!!!
always doing funny projects. Keep moving forward !
I've been learning a lot from your videos. Many thanks from South Korea!
Could you make a video about python subprocess library ??
Brilliant yet simple tutorial ! Thanks, Tim !
Definitely good content thanks shouts from England 🫡💯🇬🇧
Great tutorial, many thanks :D
Could you explain why you have to do the star_count += clock.tick(60)? Couldnt you just do star_count += 5 or something since it's already in the main loop?
Does anyone knows how to fix this problem i typed everythink same as him but when i launched it it does not close it closes only if you close the run window /_ /
Hi! At 7:42 how were you able to save the image in the bc.jpeg file?
You have to put the image in the same folder as your code. Hope that helps🙂
Thanks for the video. I always loved your videos keep it up. made the whole project and learnt a lot about pygame. never seen any tutorial like this on pygame
this is amazing!!!!!!. I want to learn code and I'm a kid!! I know how to make a simple computer quiz
Tim, our master, Is this significantly beginner-friendly? To ensure everyone can follow through on the projects and videos you post daily, please give us some insight into the necessary prerequisites. We love you keep up the good work.
This isn't beginner friendly. You should already know about variables, functions, loops and be able to write some small logic in order to visual how everything is working in ur mind, otherwise you will probably feel lost. This is probably low intermediate to medium intermediate level
@@JoyBoyLaughs I mean can you walk though the project without any pygame knowledge. Now I think you got the point.
Thank youuuuu so muchhhh broooo ❤❤❤
Im confused on how to get to the python menu that you are in, when i open my python terminal its just a black screen with some text but no with all of the stuff on yours. Just wondering how you installed python.
its a program called visual studio code :))
I think the if hit statement should come after draw function because we want our players to see the collision or else there will be a gap between the player and the star when the game ends
For some reason the stars only fall when I am moving and specifically moving right do you know how to fix it?
AMAZING TUTORIAL!!
Hey folks I'm at the point where I have to draw the rectangle, but it just won't show up. I followed the code as shown in the video but it still doesn't appear. Is there a way to fix this?
THANKS TIM................................LOVE FROM PAKISTAN
Hello Tim! I am trying to begin python and I don't know where to code, what is the website you are using??
VS Code
I single handedly learned python from this video
Thank you so much!!! Loved it!
Hey! Thanks for the tutorial, I finished it and completed it. However, I went through the code and can't find the issue, (my stars only come down when moving to the right), any idea what I could have done wrong? Thanks!
TiM !!! Thank you. Salutations from France.
I am begginer and after watching this video i have come to know that how the python intresting is
how do you wrote def
i am very noob with coding and currently doing a follow through.. for some reason after adding the bg.jpeg file and adding the draw call function, nothing pops up. What might have cause this? I am using visual studio in mac.
great tutorial. Thank you!
How do you put the png image into the python
You`re so good, the goat.
i have dowloaded the pygame extension in visual studio code and the code doesnt work, it says no module named pygame.
pls help
Type “import pygame” at the top of your editor
@@klaps2463 oh ok thanks mate
Hi Tim
I m trying to program tetris . I don't know much about programming. What would you recommend to watch first before starting .
Thanks
such a good and helpful video but i would loove if u had shown how we can use a custom sprite.. i had to spend a lot of time on that and ended up using chatgpt but otherwoise amazing video
after drawing the projectiles, when i try to launch in, after 2 seconds it crashes and says "AttributeError: 'list' object has no attribute 'y'" what can i do to fix it?
can you make gamedev tutorials with languages which are commonly used in the gamedev industry? like without a game engine but with opengl or sdl for example? there are other tutorials out there but I've been watching you since 2016 and you're way of teaching is much better than anyone else
I'll consider it for sure!
How could I add a 'Try Again' button at the end when you touch the projectile? Thank you
Worked well loving ur tutorials. Having a problem, I want the game to continue and not exit after losing
You can use functions, and if you want a menu and more thing, you should create a main function first and in that function you initialize pygame, and to change between menu, game,etc, you need to create more functions inside the main each one with it's individual while True loop
And of course the variables, for pygame related variables you can create them in the main func, and call it from any place, but for normal variables you need to create them in the function where it will be used.
broski going godspeed
I was finally able to import a background image. The only thing now I’m having difficulty with is the caption when the window pops up the background image is showing except there is no caption. It’s a blank white bar. I can exit the window and close the window, but unfortunately, there’s no caption to the window and I have the code written