I am a brand new coder, with no expirience. Finding an actually helpful video has been really difficult, but this one helped out more than I can explain. Thank you so much, just the first program about pong showed me more about game design and code than I ever would have though I would know
just finished Pong and added an extra feature, when the ball hits the paddle it increases speed by multiplying dx and dy by 1.03, it gives a really smooth increase in difficulty as the ball bounces and makes the game more interesting. to apply this simply add "ball.dx *= 1.03" and "ball.dy *= 1.03" at the end of both paddle collision functions. ps. thanks free code camp for helping me find easier to interpret information on how to code, if I didn't see this and python for beginners or something like it, I would still be spending my nights confused or playing videogames instead of learning something useful.
This was the most straight-forward Python tutorials I have seen so far. The people are really good at coding and explain things really well! I will definetly recommend this channel to my friend who also wants to learn Python. Thanks again for teaching me and other people Python!
I created my first app by doing what he did, didn't do nothing by myself but it's the best way of learning because the next time I'll at least have the concept. Learning practically is the best way.
This is an EXCELLENT test to see if you are “learn by doing” type of learner. New programmers can just dive in. Quite a bit of it will stick, even if it doesn’t make much sense right now.
My man, i am a beginner and, i have a doubt about "how to learn", like I don't have any idea how to build a tetris game for example, or a project from "Top Python Projects for beginners" like I found on internet, picking the tetris example, for I to be able to learn how to build it, should I watch the tutorial, get some notes and try to rebuild it or idk, maybe I am doing wrong, because I feel like it's just a really giant universe that it's not like a linear path where i can say: "well, today i'm going to study this so I can follow this study planning so by the end of the month I will be able to build a tetris game because I will know all the necessary things, it's not like math, if you know what I mean
In the Pong game there is a small check you forgot to do With this program the paddles can go out of bounds This gets fixed with a small if (I tested diff values and 250 is the one that better fits for me) def paddle_a_up(): y = paddle_a.ycor() if(y < 250): y += 20 paddle_a.sety(y) (y > -250 for paddle_a_down and paddle_b_down) Still a 10/10 video :D
@@eltrcxen3459 I wouldn't paste it. Put the if statement right after the def y statement and make sure you tab or space the following code you should have implemented earlier
26:53 on line 95, if you find the line difficult you can change the line in simpler to understand like: if ball.xcor() > 350 and (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40): In the video on line 95, after 'and', the comparison (ball.ycor() < paddle_b.ycor() + 40 and ball.ycor() > paddle_b.ycor() - 40) is same as (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40), but the 2nd one is easy to read/understand. Likewise, at 29:15, you can change (ball.xcor() > 340 and ball.xcor() < 350) to (340 < ball.xcor() < 350) so the overall command would look like, if (340 < ball.xcor() < 350) and (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40):
@@anidea8012 I'll try to explain the following code: if (340 < ball.xcor() < 350) and (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40): **Note: The above code is modified by me, in the video at 29:30, the original code is: if (ball.xcor() > 340 and ball.xcor() < 350) and (ball.ycor() < paddle_b.ycor() + 40 and ball.ycor() > paddle_b.ycor() - 40) Here after 'if', it's written as: (340 < ball.xcor() < 350) The above code means, the x-coordinate of the ball here represented by 'ball.xcor()' should be greater than 340 and less than 350, meaning it should be between 340 and 350. In the video, it is written as: (ball.xcor() > 340 and ball.xcor() < 350) which is the same thing, meaning the ball.xcor() should be greater than 340 and ball.xcor() should be less than 350. On the other code, after 'and', it is written as: (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40) This means that the 'ball.ycor()' should be between 'paddle_b.ycor() + 40' and 'paddle_b.ycor() - 40' In the video, it is written as: (ball.ycor() < paddle_b.ycor() + 40 and ball.ycor() > paddle_b.ycor() - 40) which is the same thing. You may wonder how that 40 came. we know the height of the paddle is 100, meaning +50 up and -50 down, but the height of the ball is 20, meaning +10 up and -10 down. So, if we subtract 10 by 50, we get 40. Hope this clears it up.
I am already far less frustrated with you than I was with another video from the same channel. Good pacing. Good explanation. And you aren't jumping all over the place in a way that is confusing. Thank you!
At 9:37 you talk about the importance of testing as you go. This is SO true! At one point I accidentally put paddles after main loop, and it broke everything haha. Took me five minutes to realize what I'd done, but I learned from it, so it worked out :)
@@youssefamr8073 tbh you should make paddle out of the main game loop(or else it will just make a paddle everytime the funtion in while run again, causing 2 turtle with same name appearing, and making it break) but you should check the keybind in the main loop, because if you don't it will only check when the python run through the funtion, which is probably 0.0001 sec or idk, so you need to put it in the while funtion to keep it always checking your keybind and you should just make the define paddle_a movement outside of the main game loop, or else it would define paddle_a movement every time the funtion inside while run again(probably like 0.0001 sec)
@@vagifasadov4660 i think yes for real.. sometimes courses for beginners learn you basics too much that you just get bored and you feel like 'where is the goal of all of this ?' but with this course you really know what is the goal of what it is happening
5 minutes in and he hasn't explained anything. It's just copy what I type. No explanation of what each function does or how it works so you can do it on your own. Really not learning or understanding anything
If you want to force the ball to move at a constant speed/frame rate in the PONG game, you may add a time.sleep(1/60) command in the while True: loop, and just play with the ball velocity if you need it to move faster or slower. Great video!
@@claytonyoung1351 I did, in my initial comment: You just need to add a time.sleep(1/60) statement in the while True: main loop. Let me see if I can copy my entire program in my next comment.
if ball.ycor()>290: ball.sety(290) ball.dy=-ball.dy # Reverse direction of movement winsound.PlaySound("bounce.wav",winsound.SND_ASYNC) if ball.ycor()380: ball.goto(0,0) ball.dx=-ball.dx # Reverse direction of movement score_a=score_a+1 pen.clear() pen.write("Player A: {} Player B: {}".format(score_a,score_b),align="center",font=("Consolas",16,"normal")) if ball.xcor()330 and ball.xcor()
My man: I can't express enough gratitude on how you explain everything! Without a doubt one of the best courses. You teached me the basics under 24h + you made me want to dive deeper instead of falling a sleep.. THANKS THANKS THANKS!!
@@DailyIntern Because of the work, I can't start tutorial series that teaches languages basics, I build projects with different technologies(Laravel and vuejs at the moment). Because on real world at jobs, you are not going to write plain PHP anymore so, taking another courses(are many already on youtube) for the basics and building projects with me will be more helpful!
Normally I thought python is used for programming artificial intelligence but now is used for game programming, no way. Bro I'm learning python a soon as possible. Who's with me
The tutorials give a great insight in how to code in Python. I do have one big comment on these tutorials. Always use readable and understandable names for variables, functions, etc. So not 'w' but 'width' or even better 'windowWidth'. Don't cheap out on this. The IDE's these days do a great job with intellisense for this. Solid and readable code is sooo important in order to deliver great code.
The first tutorial for Pong was really well done and easy to understand! Great job Christian! Unfortunately, the second tutorial for Snake was not nearly as easy to follow or understand. I was really disappointed after getting at least halfway through and then found out that it wasn't working. (Right around 1:18 in the video.) I assumed I mistyped something and went through every piece of code. What I had typed was identical. Then, I tried going to the source code link and cutting and pasting pieces over what I had typed to see if I could find my error. That still didn't work. Finally, I just cut and pasted the entire source code over mine and it still doesn't work. I don't know if I should give the benefit of the doubt and assume that this worked in an earlier version of Python since the tutorial was from a few years ago. The error was: for key in keys: TypeError: Iterating over key states is not supported I have to admit, I wouldn't recommend this tutorial based on not only the poor explanations, but the fact that it doesn't seem to work as written. This is a course for beginners and I unfortunately don't know that I can troubleshoot this issue. Frustrating. Again, not to be all negative --- the first tutorial was great!! New information: I searched the error and found someone who seemed to have the same problem with this tutorial. They recommended removing "for key in keys:" completely from the move method in the snake class. This seems to have worked. Cautiously continuing this tutorial...but concerned hahaha
The pong tutorial was great. Christian is an excellent teacher who understands how to teach. He kept hammering home that we should always write a little code to check if it works. The second video with Tim has been pretty horrible. He throws all that advice away and just codes blindly for a long time before explaining anything. I am going to complete the connect 4 tutorial next but the snake one was a huge waste of time. I don't know whats going on and I don't really have much leg to stand on to make this work. Seeing at the Tetris and multiplayer one are also from Tim, I will probably not do those. I was hoping the snake tutorial would teach object oriented programming but it was just a code along with little stopping to explain anything. I think one thing I would like from both videos are instructions on how to set up and download all packages. I feel like pure beginners will really trip up on that.
The first instructor is really good for beginners. The second guy was impossible to follow along with, so i skipped it. Third one wasn't too bad. Fourth one jumped all over the place making it hard to understand what is going on. I ended up with an error and can't figure out the issue to save my life. Even went back and rewatched the segment up until that point and i have still have no idea what is wrong. Dont even feel like trying the fifth one. The reason i like the first guy so much are the reasons i didn't like the next 3. why would you wait to test the program until its halfway done? why would you not explain the errors you made so i have a better understanding of them and how not to make those same errors? if i just wanted to copy code i would rip some from google. The first guy does an amazing job of explaining exactly what is going on and routinely tested the code after each segment, so if i had an error i could just rewatch a small portion of the video instead of having to rewatch 45 minutes of code trying to find the one place i messed up. to anyone reading this i recommend going to his youtube channel and watching his other tutorials.
great course, Now I finished pong and I added some more for example 1)the paddles will stay inside the game area 2) the game ends after one player scores 3 goals and the scores will start from 0 - 0 3) the players know who won the last game now I want to add one more thing which is How many times each player has won. Thanks
@@evanangelocampos9323 In the game loop, check if score_a >= 3 or score_b >= 3. Then if it is, score_a = 0 score_b = 0. If you want to actually end the game when the score reaches 3, just type turtle.bye()
For those getting problems when following directly along with the pong tutorial, it appears that the shapesize function has changed since the version used in the tutorial. The new syntax is just paddle_a.shapesize(5, 1)
Fabrizio Bandiera I found out I was getting that error because not a lot of python 3 ide’s natively support the turtle package yet. I downloaded pycharm and ran it on there and I didn’t have much problem.
@@cdante13h Thank You, I've never tried PyCharm at the mo I'm using VSC which is very user friendly :) I have another question: since I use linux and I have got 4 versions of Python installed, I would like to install for example the pygame package in my usr/bin/python3.8 and I've tried many times but I can only install the packages in usr/bin/python3 do you know if there's any way to do this ? Cheers
I watched a tutorial about how to use pygame and it was WAY too complicated for me, I am a beginner and can do the following: Print, for I in range(), while true loops, int, input, str.lower, and a lot more! Pygame is a lot more complicated but I know a friend who is teaching me python who said he will explain it a bit more! This tutorial is so far way easier!
For anyone who gets annoyed that the ball goes in the borded at -290 put it at -285 instead it will bounce right off the border like it did at the top. Man im way too proud of figuring that out 😂
He got errors because the turtle module always throws a bunch of errors when you close the window while the programming didn't finish writing. In this case, the program runs infinitely, so it will always throw errors when you close the window.
Yay, 1st guy! I remember you from the SameGame labs video! That was quite a good one, I still recommend it to people who want to get the basics of game design (and squeeze in MVC + TDD).
@@watchmyvideoplease7986 but I was here :v I wanted to know python syntax so I came to this video, didn't watched it all the way through, but it let me work around with what I got Though I'm not a master in any language (not anymore (I was studying cpp some years ago, but now I forgot mostly everything)) I know the basic things about programming, like in a sudo language
Okay, tutorials were good but I really wish Tim had made the functions and classes with us for the snake game, I mean it would have made it easier and he could have also explained why we made the class for each thing. I personally understand a bit of why, but still.
This is really fun. Kind of makes me want to find a time machine to go tell my teenage self to get into programming to cope with the never ending depression my schizo-affective disorder causes.
It's cool to see this video. Despite me not needing to watch this video due to me having created dozens of games in pygame over the years, it is cool to see you guys helping newcomers to what I had to learn from books and online documentation. ✌️
I need 30 hours in a day so that I can find extra 6 hours to learn everything these guys offer. I always want to learn, but don't find enough free time after doing regular job. 😔
i dont understand how you dont have the time? maybe the weekend or after work, shower eat and then learn, that what i do.. i am working 7 to 4 and i can do online trading and sell and buy acount or physical product, and when im home i do thing that take more time like study, the only thing i have to keep mysleft from doing is spent all my night on netflix or gaming or watch funny video, and sleep a little less, maybe that sound a lot but that the price to pay. i hope my comment help you somehow! ps im not englishman
@@Woef718 If that's the case then all they have to do is break the video down into parts. If you can't watch the whole video or even hours then break it down into 30 minute segments and does those whenever you have the extra time each day or every other day
For those on Windows that were unable to figure out why you got the windows sound try this. Right on file -> Properties -> [copy file location] -> Replace Forward slash with Back Splash -> Paste in: winsound.PlaySound("[File Location]", winsound.SND_ASYNC) For example: import winsound winsound.PlaySound("C:/Coding/Python/pong/pong/bounce.wav", winsound.SND_ASYNC) I hope this is able to help someone!
Great showcase of the *_pygame_* module, thanks for sharing, a few minor suggestions for Tech With Tim... 1:22:26 The lambda function here seams completely unnecessary a simple *_in_* expression would suffice: *_if (x, y) in positions:_* *_continue_* *_else:_* *_break_* 1:30:00 The lambda function here seams completely unnecessary a simple *_in_* expression would suffice: *_if s.body[x] in s.body[x+1: ]_* *_..._* 1:31:22 The name *_self_* should be replaced with *_snake_* to avoid confusion.
refactoring lambda expressions is often good practice but using self to refer to the object is both the convention and suggested way to reflexively refer to an object in python when you're defining methods and attributes
I really liked the Pong tutorial, the presenter explains everything nice an slow, step by step with checking each change! Absolutely great! Then there is the second tutorial! Snake - I think it is absolutely terrible! I appreciate that you provide a FREE tutorial but I am afraid that this implementation of snake will frustrate a lot of people. Ideas for improvement: 1. Slow it down, go more step by step. Like drawing the grid surface first. (without all the other classes already in the code) 2. Don't put all functions and classes that are required into the document in the beginning (how am I supposed to learn something setting up such an architecture of classes and functions) 3. Don't copy paste big chunks into the code and then quickly explain them. 4. I wanted to learn something about OOP - the tutorial starts out with two classes and a bunch of functions ... why are they there ? how do I figure this out on my own when I want to build something?
Hans Brodi absolutely. I was 2 min in the snake tutorial and I quit. He‘s way too fast for a beginner and it lacks structure. Feels like he didn’t prepare for the lesson and improvised on the fly.
Guys, for the pong tutorial, I have to type "onkey()" rather than "onkeypress()". Is it that my python launcher is a older vr or is he teaching python 2?
@@-leapplayz-4684 thanks. That's not what I meant though. I mean the thing that let's you see the game when you press play in python. Alright found it.
the first pong tutorial was amazing. Christ fully explain the code and i came to understand it. How ever, the second tutorial felt like i was just typing some random code in blindly and i didnt understand anything. A better and more explanation would be appreciated
First tutorial was awesome, with a wonderful progression of how the most basic of games are made. Second one (snake) not so much. Very haphazard with little to no explanation on how to properly set up your game environment or the objects within them.
I know this comment is 5 months old but I agree completely. While I'm grateful for a free tutorial, since I like to write the code on a notebook and then pass it on through python, it was very confusing when he would just add code and then 2 minutes later say, "oh, you can just erase this". again, grateful to these guys for the tutorials but it's really hard to keep up.
The first game was great and while I really appreciate the effort the second game completely lost me. I have zero idea what we're doing and why we're doing it lol.
That's how it is mate, you can learn Python but the APIs have the logic of their creators, so most of the time everything overlaps; That's just the programming world, nothing we can do about it. Best is, keep up with a changing logic of why things are. I hope u understand.
I think the snake game would have been more helpful if he'd added comments to his code to better explain things like the previous turtle pong example. Or maybe a better practice is to write some kind of contents section written pretty much entirely of comments with reference to the blocks of code explaining its purpose. Just an idea.
WINDOWS SOUND for Pong bounce : what we were told in the video didn't work for me. I used winsound.PlaySound('bounce.wav', winsound.SND_FILENAME). Use single quotes not doubles. Just using doubles can stop the sound working.
the first tutorial is awesome. you learn some neat basics that even allow you to make your own very simple atari-like games. the second, rather than being a tutorial is just some guy making a game.
sir, if you could give a better explanation on what wn.trace() is , it would've been a huge help for me :) ...The tutorial was sooooo nice and I loved it since Im a beginner on Python and are currently learning just the beginning binary files (.dat) at school....I wanted to speed things up a little, and that's how I cam to know about this 6 hr course.....It was insanely helpful and the boundaries of my knowledge about Python expanded to a huge extent! I had a doubt about what wn.trace() is actually about....Can you like tell what it's all about?
Can someone make english subtitles, please? That will be really helpful for non english speakers (Like me, I speak spanish but I cannot understand many words and sentences that the instructor says). The spanish speakers will be really grateful with something like that
I really liked the rock, paper, scissors game, because I always wanted to learn how to make an online game, and this was the only clear explanation of how I should do it and why.
This is a great video, KUDOS! You are using built in Functions to program the games. For a newbie, how or what is the Best / Fastest way to learn about the Functions, learn that there is a Function exists that can do what is needed?
1:09:48 minor note to self: instead of passing in a flag to a Cube when drawing to indicate that it is an eye, I would have an “is_eye” flag be a member of Cube. I believe this would be better encapsulation. (I’ll come back to this to see if I am wrong)
I think this is a great tutorial. I've learned traditional OOP programming with C# Java, JS + web stuff like HTML etc. Know I should learn Python super fast, started learning just the syntax was just more than boring. I do some boring syntax learning than I get back here, and everything falls in place. Thanks, Christian for your effort. I've just read you got into Vuejs. Excellent choice compared to Angular ( I did that as well)
Tutorials have been really nice to practice programming while getting free games. I ended up using a different tutorial on the channel for a snake game and had fun choosing pictures and sound effects for the games
Such a great Tutorial! Just finished Ping Pong game, learned a lot! I also added a new feature in my game, I added some random length collidable blocks which fall at randomly from top and ball speeds up after collision with them. Also adjusted the paddles so that then do not go out of the window.
It would be helpful if you added a division into topics by times in the video itself, because it is very long and some people (like me) may only need a specific part of it
OK but why are you staring directly at my soul?
Does not happen a lot of times but your comment really made me laugh :D
You're funny, man..
I didn't expect to come across a comment like this. Lol
Works on my VS Code on Windows properly. Try copy/pasting the full code (there is a link in description) and see if that works.
Lol
I am a brand new coder, with no expirience. Finding an actually helpful video has been really difficult, but this one helped out more than I can explain. Thank you so much, just the first program about pong showed me more about game design and code than I ever would have though I would know
me too😃
came from a material engineer background, honestly i believe that we won't survive if we don't pick up coding
@@FRESH-SHAMLAN what do you mean you wont survive
The first tutorial is the best!
the teacher explains EVERYTHING and advices on the little details we have to focus on.
Ong
The first game was sooo nice to remake myself for practice!! Had tons of fun!
Hey how to test your program
@@info659 what do you mean? If you use pycharm just play your program, than you can see if it works.
@@phoenixyt124 but how to play your program?
@@info659 just click run in the top right corner. the green arrow.
@@info659 or f5
just finished Pong and added an extra feature, when the ball hits the paddle it increases speed by multiplying dx and dy by 1.03, it gives a really smooth increase in difficulty as the ball bounces and makes the game more interesting.
to apply this simply add "ball.dx *= 1.03" and "ball.dy *= 1.03" at the end of both paddle collision functions.
ps. thanks free code camp for helping me find easier to interpret information on how to code, if I didn't see this and python for beginners or something like it, I would still be spending my nights confused or playing videogames instead of learning something useful.
I'm doing the same thing, great minds think alike I guess
I made it so that paddle a decreases paddle b decreases
b increase i mean
is there a was to make it reset the speed after you score?
@@MateusFerreira-on3kp is there a was to make it reset the speed after you score?
Imagine pressing space bar 4 times
this post was made by TAB gang
one two three four one two three four
*TAB GANG IS THE BEST :>*
you just saved a lot of people's (including me)' time, thank you
*Ctrl + S GANG*
Where did the astrophysics student open a Tab for drinks after failing his final? The Space Bar
This was the most straight-forward Python tutorials I have seen so far. The people are really good at coding and explain things really well! I will definetly recommend this channel to my friend who also wants to learn Python. Thanks again for teaching me and other people Python!
I created my first app by doing what he did, didn't do nothing by myself but it's the best way of learning because the next time I'll at least have the concept. Learning practically is the best way.
Instructions unclear accidentally made Gta 7
Iam going to release gta 7 :)
LOL
@B D iteration
@@bijayanath9308 don't release it with that name, GTA name is copyrighted, use some other name instead
Then who made mc
This is an EXCELLENT test to see if you are “learn by doing” type of learner. New programmers can just dive in. Quite a bit of it will stick, even if it doesn’t make much sense right now.
You should be learning the basics and how to program before you even think about making games. Game programming isn't for beginners.
f
Thanks. That has really encouraged me.
My man, i am a beginner and, i have a doubt about "how to learn", like I don't have any idea how to build a tetris game for example, or a project from "Top Python Projects for beginners" like I found on internet, picking the tetris example, for I to be able to learn how to build it, should I watch the tutorial, get some notes and try to rebuild it or idk, maybe I am doing wrong, because I feel like it's just a really giant universe that it's not like a linear path where i can say: "well, today i'm going to study this so I can follow this study planning so by the end of the month I will be able to build a tetris game because I will know all the necessary things, it's not like math, if you know what I mean
@@henriquedelben It's been a year, how did you start your first project and how's the coding journey been? I've in similar shoes as you were lol
It's not being lazy, this is how a professional programmer should be. Fast and efficient
Just wanted to say thanks to all those involved in creating, editing, and posting this. Tremendously helpful to us new coders. Liked and subscribed!
In the Pong game there is a small check you forgot to do
With this program the paddles can go out of bounds
This gets fixed with a small if (I tested diff values and 250 is the one that better fits for me)
def paddle_a_up():
y = paddle_a.ycor()
if(y < 250):
y += 20
paddle_a.sety(y)
(y > -250 for paddle_a_down and paddle_b_down)
Still a 10/10 video :D
hi, where do i paste this code? and is there anything i need to alter
@@eltrcxen3459 I wouldn't paste it. Put the if statement right after the def y statement and make sure you tab or space the following code you should have implemented earlier
i copy paste the pong game it dont works:( the boll is toot fast
@@User-qc7gn set dx and dy values to 0.2 instead of 2
@@mohammedrizin6761 thanks 🙏
26:53
on line 95, if you find the line difficult you can change the line in simpler to understand like:
if ball.xcor() > 350 and (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40):
In the video on line 95, after 'and', the comparison (ball.ycor() < paddle_b.ycor() + 40 and ball.ycor() > paddle_b.ycor() - 40) is same as (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40), but the 2nd one is easy to read/understand.
Likewise, at 29:15, you can change (ball.xcor() > 340 and ball.xcor() < 350) to (340 < ball.xcor() < 350)
so the overall command would look like,
if (340 < ball.xcor() < 350) and (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40):
I still struggle to understand that line
@@anidea8012
I'll try to explain the following code:
if (340 < ball.xcor() < 350) and (paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40):
**Note: The above code is modified by me, in the video at 29:30, the original code is:
if (ball.xcor() > 340 and ball.xcor() < 350) and (ball.ycor() < paddle_b.ycor() + 40 and ball.ycor() > paddle_b.ycor() - 40)
Here after 'if', it's written as:
(340 < ball.xcor() < 350)
The above code means, the x-coordinate of the ball here represented by 'ball.xcor()' should be greater than 340 and less than 350, meaning it should be between 340 and 350. In the video, it is written as:
(ball.xcor() > 340 and ball.xcor() < 350)
which is the same thing, meaning the ball.xcor() should be greater than 340 and ball.xcor() should be less than 350.
On the other code, after 'and', it is written as:
(paddle_b.ycor() + 40 > ball.ycor() > paddle_b.ycor() - 40)
This means that the 'ball.ycor()' should be between 'paddle_b.ycor() + 40' and 'paddle_b.ycor() - 40'
In the video, it is written as:
(ball.ycor() < paddle_b.ycor() + 40 and ball.ycor() > paddle_b.ycor() - 40)
which is the same thing.
You may wonder how that 40 came. we know the height of the paddle is 100, meaning +50 up and -50 down, but the height of the ball is 20, meaning +10 up and -10 down. So, if we subtract 10 by 50, we get 40.
Hope this clears it up.
@@pranishkhadgi2723 thx men, this helped me. had trouble witht he collision
@@hjmhfm Glad it helped
@@pranishkhadgi2723 thank you sm
I am already far less frustrated with you than I was with another video from the same channel. Good pacing. Good explanation. And you aren't jumping all over the place in a way that is confusing. Thank you!
At 9:37 you talk about the importance of testing as you go. This is SO true! At one point I accidentally put paddles after main loop, and it broke everything haha. Took me five minutes to realize what I'd done, but I learned from it, so it worked out :)
same!
Can i ask you a question. Shouldn’t the paddles be in the main loop ? I don’t understand how it checks if we move up and down without going twice
@@youssefamr8073 same problem with u, i just can move up and down once!!!
oh i fixed it, '+=' but i typed '=+' :)))
@@youssefamr8073 tbh
you should make paddle out of the main game loop(or else it will just make a paddle everytime the funtion in while run again, causing 2 turtle with same name appearing, and making it break)
but you should check the keybind in the main loop, because if you don't it will only check when the python run through the funtion, which is probably 0.0001 sec or idk, so you need to put it in the while funtion to keep it always checking your keybind
and you should just make the define paddle_a movement outside of the main game loop, or else it would define paddle_a movement every time the funtion inside while run again(probably like 0.0001 sec)
Learn by doing!! Thank you so much. 5 mins in and have learned more than a 6 week course for beginners
for real?
@@vagifasadov4660 i think yes for real.. sometimes courses for beginners learn you basics too much that you just get bored and you feel like 'where is the goal of all of this ?' but with this course you really know what is the goal of what it is happening
@@piantoart2199 do u know anything like this for C language?
@@vagifasadov4660 No i am still with python
5 minutes in and he hasn't explained anything. It's just copy what I type. No explanation of what each function does or how it works so you can do it on your own. Really not learning or understanding anything
who's making a game in lockdown
damn!
its me.
follow me on avakin life
my name is:
likemeh profile
nooooo im making a game outside of lockdown, right in front of my local covid hotspot
@@mistermomo2904 ohk
Laser Asia 😅
@@mistermomo2904 what happened?
If you want to force the ball to move at a constant speed/frame rate in the PONG game, you may add a time.sleep(1/60) command in the while True: loop, and just play with the ball velocity if you need it to move faster or slower. Great video!
Oh thank goodness I was struggling trying to figure that out. Thanks man
how? xd
Can you provide the code for this?
@@claytonyoung1351 I did, in my initial comment: You just need to add a time.sleep(1/60) statement in the while True: main loop. Let me see if I can copy my entire program in my next comment.
import turtle
import time
import winsound
wn=turtle.Screen()
wn.setup(width=800,height=600)
wn.title("PONG - Modified by John A. Paravantis - September 2022")
wn.bgcolor("papayawhip")
wn.tracer(0) # Stop window from updating
ball_velocity=5
paddle_velocity=7
paddle_offset=50
# Score
score_a=0
score_b=0
# Paddle A
paddle_a=turtle.Turtle() # Create paddle_a Turtle object
paddle_a.speed(0) # Max animation speed
paddle_a.shape("square")
paddle_a.shapesize(stretch_wid=5,stretch_len=1)
paddle_a.color("maroon")
paddle_a.penup()
paddle_a.goto(-350,0)
# Paddle B
paddle_b=turtle.Turtle() # Create paddle_b Turtle object
paddle_b.speed(0) # Max animation speed
paddle_b.shape("square")
paddle_b.shapesize(stretch_wid=5,stretch_len=1)
paddle_b.color("maroon")
paddle_b.penup()
paddle_b.goto(350,0)
# Ball
ball=turtle.Turtle()
ball.speed(0) # Max animation speed
ball.shape("square")
ball.color("dodgerblue")
ball.penup()
ball.goto(0,0)
# Ball movement
ball.dx=ball_velocity # movement by pixels
ball.dy=ball_velocity
# Scoring mechanism
pen=turtle.Turtle()
pen.speed(0)
pen.color("red")
pen.penup()
pen.hideturtle()
pen.goto(0,260)
pen.write("Player A: 0 Player B: 0",align="center",font=("Consolas",16,"normal"))
# Function
def paddle_a_up():
y=paddle_a.ycor()
y=y+paddle_velocity
paddle_a.sety(y)
def paddle_a_down():
y=paddle_a.ycor()
y=y-paddle_velocity
paddle_a.sety(y)
def paddle_b_up():
y=paddle_b.ycor()
y=y+paddle_velocity
paddle_b.sety(y)
def paddle_b_down():
y=paddle_b.ycor()
y=y-paddle_velocity
paddle_b.sety(y)
# Keyboard bindings
wn.listen()
wn.onkeypress(paddle_a_up,"w") # Make sure you are in US keyboard
wn.onkeypress(paddle_a_down,"s")
wn.onkeypress(paddle_a_up,"W")
wn.onkeypress(paddle_a_down,"S")
wn.onkeypress(paddle_b_up,"Up")
wn.onkeypress(paddle_b_down,"Down")
# MAIN LOOP
while True:
time.sleep(1/60) # Keep frame rate constant
wn.update()
# Move the ball
ball.setx(ball.xcor()+ball.dx)
ball.sety(ball.ycor()+ball.dy)
# Check borders
if ball.ycor()>290:
ball.sety(290)
ball.dy=-ball.dy # Reverse direction of movement
winsound.PlaySound("bounce.wav",winsound.SND_ASYNC)
if ball.ycor()380:
ball.goto(0,0)
ball.dx=-ball.dx # Reverse direction of movement
score_a=score_a+1
pen.clear()
pen.write("Player A: {} Player B: {}".format(score_a,score_b),align="center",font=("Consolas",16,"normal"))
if ball.xcor()330 and ball.xcor()
My man: I can't express enough gratitude on how you explain everything! Without a doubt one of the best courses. You teached me the basics under 24h + you made me want to dive deeper instead of falling a sleep.. THANKS THANKS THANKS!!
This is great! When i was in college I built a simple game too, but didn't have any options to get a job on python where i live so I'm a php guy...
feel ya bruh
@A khan what do you need help with?
Then teach us PHP brother
@@DailyIntern Because of the work, I can't start tutorial series that teaches languages basics, I build projects with different technologies(Laravel and vuejs at the moment). Because on real world at jobs, you are not going to write plain PHP anymore so, taking another courses(are many already on youtube) for the basics and building projects with me will be more helpful!
Condolences, man... ;)
Normally I thought python is used for programming artificial intelligence but now is used for game programming, no way. Bro I'm learning python a soon as possible. Who's with me
Bro taught me more then any of my teachers did In 4 years
same
Timestamp:
1:20 Pong
45:38 Snake
1:35:05 Connect four
2:42:46 Tetris
4:22:28 Multiplayer Game
thanks dude
Thanks
Very thanks
👍👍 Two thumbs up for you my friend
I am Really really surprised i just began searching for i python game courses i opened youtube and this video showed up.
Thank you so much FCC
Google knows everything
Yeah Don't use google
Omg the pong game is amazing! So satisfying as a beginner!!
is it just me or the first guy's voice was so nice to listen to while learning
The tutorials give a great insight in how to code in Python. I do have one big comment on these tutorials. Always use readable and understandable names for variables, functions, etc. So not 'w' but 'width' or even better 'windowWidth'. Don't cheap out on this. The IDE's these days do a great job with intellisense for this. Solid and readable code is sooo important in order to deliver great code.
That first Pong tutorial is fantastic, thank you!
The first tutorial was so good!
Exactly, so bad
i know right
@xavi hahaha exactly!
@@wesleyfan7286 then you are not a true programmer
the first one was coding and running the second one I had no idea what was happening
The first tutorial for Pong was really well done and easy to understand! Great job Christian!
Unfortunately, the second tutorial for Snake was not nearly as easy to follow or understand. I was really disappointed after getting at least halfway through and then found out that it wasn't working. (Right around 1:18 in the video.) I assumed I mistyped something and went through every piece of code. What I had typed was identical. Then, I tried going to the source code link and cutting and pasting pieces over what I had typed to see if I could find my error. That still didn't work. Finally, I just cut and pasted the entire source code over mine and it still doesn't work. I don't know if I should give the benefit of the doubt and assume that this worked in an earlier version of Python since the tutorial was from a few years ago. The error was:
for key in keys:
TypeError: Iterating over key states is not supported
I have to admit, I wouldn't recommend this tutorial based on not only the poor explanations, but the fact that it doesn't seem to work as written. This is a course for beginners and I unfortunately don't know that I can troubleshoot this issue. Frustrating.
Again, not to be all negative --- the first tutorial was great!!
New information: I searched the error and found someone who seemed to have the same problem with this tutorial. They recommended removing "for key in keys:" completely from the move method in the snake class. This seems to have worked. Cautiously continuing this tutorial...but concerned hahaha
Only for Pong and Snake, will be updated:
Detailed timestamp :
I : Pong | 1:20
1:19 Pong (Start)
3:40 Pong (Main game loop)
5:17 Pong (Paddle A)
9:10 Pong (Paddle B)
9:51 Pong (Ball)
10:45 Pong (Functions)
13:08 Pong (Keyboard binding)
16:47 Pong (Ball xy movement)
17:43 Pong (Move the ball)
19:41 Pong (Border checking)
26:22 Pong (Paddle and ball collisions)
32:24 Pong (Pen)
35:24 Pong (Score)
40:00 Pong (Sounds)
2 : Snake | 45:38
45:41 Snake (Start)
47:20 Snake (Main)
50:50 Snake (Redraw window)
51:35 Snake (Draw grid)
55:48 Snake (Making snake object)
58:00 Snake (Making snake move)
58:46 Snake (Keyboard bindings)
1:09:18 Snake (Draw method)
1:14:09 Snake (Drawing)
1:18:30 Snake (Stop move)
1:20:25 Snake (Snack)
1:24:06 Snake (Colors)
1:25:27 Snake (Add lenght to snake when ate snack)
1:27:31 Snake (Set direction for cube)
1:28:35 Snake (Generating snack into screen)
1:29:30 Snake (Check dead if snake hit its body)
1:30:05 Snake (Display Score)
1:30:53 Snake (Explaining Reset)
1:31:42 Snake (Messagebox)
1:33:33 Snake (Add subject and contents)
Thanks!
This is so helpful. Thanks :-)
Title: Learn python by building games
Video: Learn building games using python
Both
Depends on the learner
The pong tutorial was great. Christian is an excellent teacher who understands how to teach. He kept hammering home that we should always write a little code to check if it works. The second video with Tim has been pretty horrible. He throws all that advice away and just codes blindly for a long time before explaining anything. I am going to complete the connect 4 tutorial next but the snake one was a huge waste of time. I don't know whats going on and I don't really have much leg to stand on to make this work. Seeing at the Tetris and multiplayer one are also from Tim, I will probably not do those. I was hoping the snake tutorial would teach object oriented programming but it was just a code along with little stopping to explain anything.
I think one thing I would like from both videos are instructions on how to set up and download all packages. I feel like pure beginners will really trip up on that.
300% agree with you
becuase tim's vids arent for begginers
ohk can you tell me which project template we have to choose to do ping pong game
Christian has a Snake game tutorial for python too
@@bobbysingh5666 The code was broken
You can smooth the movement of the ball in the pong tutorial with wn.tracer(1), but it will slow the ball animation down greatly.
thank you
The first instructor is really good for beginners. The second guy was impossible to follow along with, so i skipped it. Third one wasn't too bad. Fourth one jumped all over the place making it hard to understand what is going on. I ended up with an error and can't figure out the issue to save my life. Even went back and rewatched the segment up until that point and i have still have no idea what is wrong. Dont even feel like trying the fifth one. The reason i like the first guy so much are the reasons i didn't like the next 3. why would you wait to test the program until its halfway done? why would you not explain the errors you made so i have a better understanding of them and how not to make those same errors? if i just wanted to copy code i would rip some from google. The first guy does an amazing job of explaining exactly what is going on and routinely tested the code after each segment, so if i had an error i could just rewatch a small portion of the video instead of having to rewatch 45 minutes of code trying to find the one place i messed up. to anyone reading this i recommend going to his youtube channel and watching his other tutorials.
great course, Now I finished pong and I added some more for example
1)the paddles will stay inside the game area
2) the game ends after one player scores 3 goals
and the scores will start from 0 - 0
3) the players know who won the last game
now I want to add one more thing which is How many times each player has won.
Thanks
How to make the code that ends the game when one player scores 3 goals bro?
@@evanangelocampos9323 In the game loop, check if score_a >= 3 or score_b >= 3. Then if it is, score_a = 0 score_b = 0. If you want to actually end the game when the score reaches 3, just type turtle.bye()
For those getting problems when following directly along with the pong tutorial, it appears that the shapesize function has changed since the version used in the tutorial. The new syntax is just paddle_a.shapesize(5, 1)
thanks :)
I’m getting an error saying there’s an error on the wn = turtle.Screen() like
And that there is no display name and now $DISPLAY environment variable.
@@cdante13h Hi, me too I'm using Python 3.6.9 and all the wm = blablabla are Attribute Errors... maybe the syntax has changed ?!?
Fabrizio Bandiera I found out I was getting that error because not a lot of python 3 ide’s natively support the turtle package yet. I downloaded pycharm and ran it on there and I didn’t have much problem.
@@cdante13h Thank You, I've never tried PyCharm at the mo I'm using VSC which is very user friendly :)
I have another question: since I use linux and I have got 4 versions of Python installed, I would like to install for example the pygame package in my usr/bin/python3.8 and I've tried many times but I can only install the packages in usr/bin/python3 do you know if there's any way to do this ? Cheers
I watched a tutorial about how to use pygame and it was WAY too complicated for me, I am a beginner and can do the following: Print, for I in range(), while true loops, int, input, str.lower, and a lot more! Pygame is a lot more complicated but I know a friend who is teaching me python who said he will explain it a bit more! This tutorial is so far way easier!
How old are you ??
@@itachiff5895 How old are you ??
@@mrcheese1373 How old are you ??
@@Zyromade How old are you?
@@distinctivegamer4472 how old are you?
For anyone who gets annoyed that the ball goes in the borded at -290 put it at -285 instead it will bounce right off the border like it did at the top. Man im way too proud of figuring that out 😂
Thx thought i was missing a code
The guy on pong got a lot of errors that I didn’t get lol edit: it was also a great tutorial. One of the only ones I could follow.
He got errors because the turtle module always throws a bunch of errors when you close the window while the programming didn't finish writing. In this case, the program runs infinitely, so it will always throw errors when you close the window.
Yay, 1st guy! I remember you from the SameGame labs video! That was quite a good one, I still recommend it to people who want to get the basics of game design (and squeeze in MVC + TDD).
hey, could you please post the link ? I need to squeeze in MVC so bad :(
The ping tutorial was amazing, I changed the colours up and it looked amazing
I have huge respect for Free code camp. You're doing real service to humanity. Respect from Pakistan to all the contributors.
That one guy was definetly not beginner friendly, and i don't even have to tell you who he is, you know it
Who are you talking about?
RockyTVShow r u talking about the guy who made snake? Yea that’s Tim, he’s not that beginner friendly tbh:)
In the beginning, a guy says that those tutorials are for who already know other programming languages and now want to learn specifically python
@@watchmyvideoplease7986 but I was here :v
I wanted to know python syntax so I came to this video, didn't watched it all the way through, but it let me work around with what I got
Though I'm not a master in any language (not anymore (I was studying cpp some years ago, but now I forgot mostly everything)) I know the basic things about programming, like in a sudo language
I found it very helpful and learn a lot from all tutorials in this
Okay, tutorials were good but I really wish Tim had made the functions and classes with us for the snake game, I mean it would have made it easier and he could have also explained why we made the class for each thing. I personally understand a bit of why, but still.
00:00 Pong
45:38 Snake
1:35:05 Connect Four
Timestamp: 51:00
thanks mate
Thank for the stamp
Lmao its in descriptio
This is really fun. Kind of makes me want to find a time machine to go tell my teenage self to get into programming to cope with the never ending depression my schizo-affective disorder causes.
Thank you so much for making this FREE 6 HOURS AND 45 MINUTES COURSE!! I'm so amazed by this holy smokes!
It's cool to see this video. Despite me not needing to watch this video due to me having created dozens of games in pygame over the years, it is cool to see you guys helping newcomers to what I had to learn from books and online documentation. ✌️
What was the best source for you? Any particular book or documentation you can tell me?
I need 30 hours in a day so that I can find extra 6 hours to learn everything these guys offer. I always want to learn, but don't find enough free time after doing regular job. 😔
i dont understand how you dont have the time? maybe the weekend or after work, shower eat and then learn, that what i do.. i am working 7 to 4 and i can do online trading and sell and buy acount or physical product, and when im home i do thing that take more time like study, the only thing i have to keep mysleft from doing is spent all my night on netflix or gaming or watch funny video, and sleep a little less, maybe that sound a lot but that the price to pay. i hope my comment help you somehow!
ps im not englishman
@@often4077 well that is great that you can do that but he has maybe more responsibilities or chores to do.
@@Woef718 If that's the case then all they have to do is break the video down into parts. If you can't watch the whole video or even hours then break it down into 30 minute segments and does those whenever you have the extra time each day or every other day
For those on Windows that were unable to figure out why you got the windows sound try this.
Right on file -> Properties -> [copy file location] -> Replace Forward slash with Back Splash -> Paste in:
winsound.PlaySound("[File Location]", winsound.SND_ASYNC)
For example:
import winsound
winsound.PlaySound("C:/Coding/Python/pong/pong/bounce.wav", winsound.SND_ASYNC)
I hope this is able to help someone!
I was struggling with the sound, as a pure beginner, this helped. Thank you
@@mistakenoblivion im glad I was able to help a little! 😁
Great showcase of the *_pygame_* module, thanks for sharing, a few minor suggestions for Tech With Tim...
1:22:26 The lambda function here seams completely unnecessary a simple *_in_* expression would suffice:
*_if (x, y) in positions:_*
*_continue_*
*_else:_*
*_break_*
1:30:00 The lambda function here seams completely unnecessary a simple *_in_* expression would suffice:
*_if s.body[x] in s.body[x+1: ]_*
*_..._*
1:31:22 The name *_self_* should be replaced with *_snake_* to avoid confusion.
underrated comment
Thanks
refactoring lambda expressions is often good practice but using self to refer to the object is both the convention and suggested way to reflexively refer to an object in python when you're defining methods and attributes
I really liked the Pong tutorial, the presenter explains everything nice an slow, step by step with checking each change! Absolutely great!
Then there is the second tutorial! Snake - I think it is absolutely terrible! I appreciate that you provide a FREE tutorial but I am afraid that this implementation of snake will frustrate a lot of people.
Ideas for improvement:
1. Slow it down, go more step by step. Like drawing the grid surface first. (without all the other classes already in the code)
2. Don't put all functions and classes that are required into the document in the beginning (how am I supposed to learn something setting up such an architecture of classes and functions)
3. Don't copy paste big chunks into the code and then quickly explain them.
4. I wanted to learn something about OOP - the tutorial starts out with two classes and a bunch of functions ... why are they there ? how do I figure this out on my own when I want to build something?
Hans Brodi absolutely. I was 2 min in the snake tutorial and I quit. He‘s way too fast for a beginner and it lacks structure. Feels like he didn’t prepare for the lesson and improvised on the fly.
You are right, the 1st one was gold
Exactly man
Guys, for the pong tutorial, I have to type "onkey()" rather than "onkeypress()". Is it that my python launcher is a older vr or is he teaching python 2?
Nobody Cares
Go to this video’s desc and go to the dude, who made pong, channel. He got a snake tutorial
wow just how to learn the program took this guy 6 hours to build thank you!
He says he is lazy but me:expects a sike
Amazing.
Best python gamemaking tutorial on youtube.
Pong was the best one because he went through everything slowly and didn’t skip any steps or assume we could just figure some things out
Learning coding ,and now I realized that building the pong game “one of the simplest games ever lol” is not possible for me yet.
same my paddle doesn't go down when the code is all correct
@@bloomz4524 same issue
@@bloomz4524 well clearly it's not correct if it doesn't work
Allready 5 min in, I loved it. Very honest and calm. Thank you so much for the help 😌
It's crazy how you can learn anything on the internet for free!
Just when I was looking into refreshing my python knowledge, FCC strikes again!
In another universe, where Kripp isn’t bald and did something with his college degree
Thank you so much. Just made pong, you've explained it so well.
Thank you so much! I’m just starting with Python and VS and this tutorial is so helpful! ❤️🙏🏻
Thank you so much just when I need the most. Programming for life. 💸💸🚀🚀😄
iam actually just here because i forgot the command to open the visual console.
Open a folder in file explorer
Shift rightclick and select open with power shell window then type code . And it will open vs code in that folder
@@-leapplayz-4684 thanks. That's not what I meant though. I mean the thing that let's you see the game when you press play in python. Alright found it.
@@mitschcrafter6766 how do you open it?
@@weegoprints its at the beginning of the video. just look trough.
Hhhhh lol 😂😂
how, just how do ytou have the time to make a 6 HOUR video its just amazing props to you man.
watching the ball fly off the screen is hilarious
the first pong tutorial was amazing. Christ fully explain the code and i came to understand it. How ever, the second tutorial felt like i was just typing some random code in blindly and i didnt understand anything. A better and more explanation would be appreciated
I love you show me your real face on youtube and reply if you love me too😘😘💋💋
First tutorial was awesome, with a wonderful progression of how the most basic of games are made. Second one (snake) not so much. Very haphazard with little to no explanation on how to properly set up your game environment or the objects within them.
I know this comment is 5 months old but I agree completely. While I'm grateful for a free tutorial, since I like to write the code on a notebook and then pass it on through python, it was very confusing when he would just add code and then 2 minutes later say, "oh, you can just erase this". again, grateful to these guys for the tutorials but it's really hard to keep up.
I agree.
I managed to make pong, it was so fun through the mistakes and the success, now gonna go back to the beginner tutorial to learn more
This is the best way to learn... by practicing!!!
The first game was great and while I really appreciate the effort the second game completely lost me. I have zero idea what we're doing and why we're doing it lol.
That's how it is mate, you can learn Python but the APIs have the logic of their creators, so most of the time everything overlaps; That's just the programming world, nothing we can do about it. Best is, keep up with a changing logic of why things are. I hope u understand.
I think the snake game would have been more helpful if he'd added comments to his code to better explain things like the previous turtle pong example. Or maybe a better practice is to write some kind of contents section written pretty much entirely of comments with reference to the blocks of code explaining its purpose. Just an idea.
The guy is was terrible in his teaching pattern! Frustrating
man, you have the best explanations of making games! thank you all, it was nice to learn for your videos!
Wow. you have an iconic face of a geek, and I mean it in the most possitive way. You could make an brand from that, start your iconic channel!
WINDOWS SOUND for Pong bounce : what we were told in the video didn't work for me. I used winsound.PlaySound('bounce.wav', winsound.SND_FILENAME). Use single quotes not doubles. Just using doubles can stop the sound working.
1:15 Pong
10:40 Pong Functions
16:30 Ball
👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎 👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎👎
@@Muhammadusman-fb2dp what
the first tutorial is awesome. you learn some neat basics that even allow you to make your own very simple atari-like games. the second, rather than being a tutorial is just some guy making a game.
this is soooo helpful! didn't get the snake game though :(
sir, if you could give a better explanation on what wn.trace() is , it would've been a huge help for me :) ...The tutorial was sooooo nice and I loved it since Im a beginner on Python and are currently learning just the beginning binary files (.dat) at school....I wanted to speed things up a little, and that's how I cam to know about this 6 hr course.....It was insanely helpful and the boundaries of my knowledge about Python expanded to a huge extent! I had a doubt about what wn.trace() is actually about....Can you like tell what it's all about?
Can someone make english subtitles, please? That will be really helpful for non english speakers (Like me, I speak spanish but I cannot understand many words and sentences that the instructor says). The spanish speakers will be really grateful with something like that
I barely had to rewatch the pong game. Amazing tutorial!
I really liked the rock, paper, scissors game, because I always wanted to learn how to make an online game, and this was the only clear explanation of how I should do it and why.
This is a great video, KUDOS!
You are using built in Functions to program the games.
For a newbie, how or what is the Best / Fastest way to learn about the Functions, learn that there is a Function exists that can do what is needed?
I also find it helpful to go shopping around for functions that do what I want. Where, you might ask? DuckDuckGo, of course.
You use spaces. Now I know why my friend recommended you.
The fourth spaces
1:09:48 minor note to self: instead of passing in a flag to a Cube when drawing to indicate that it is an eye, I would have an “is_eye” flag be a member of Cube. I believe this would be better encapsulation. (I’ll come back to this to see if I am wrong)
19:20
line 76, in
Ball.setx(Ball.xcor+Ball.dx)
TypeError: unsupported operand type(s) for +: 'method' and 'int'
I think this is a great tutorial. I've learned traditional OOP programming with C# Java, JS + web stuff like HTML etc. Know I should learn Python super fast, started learning just the syntax was just more than boring. I do some boring syntax learning than I get back here, and everything falls in place. Thanks, Christian for your effort. I've just read you got into Vuejs. Excellent choice compared to Angular ( I did that as well)
where and how did you learn traditional OOP programming?
Make Pong a bit more interesting by increasing the dx and dy by 0.1 every time the ball hits the paddle.
yeah that's what i was think! to be honest it would make it a bit more interesting
Thanks man!! This was great! I learned so much about game making!
Tutorials have been really nice to practice programming while getting free games. I ended up using a different tutorial on the channel for a snake game and had fun choosing pictures and sound effects for the games
I liked Mike Dane the most and want him here.
His voice combined with the Nasa shirt makes me ready to learn.
Such a great Tutorial! Just finished Ping Pong game, learned a lot! I also added a new feature in my game, I added some random length collidable blocks which fall at randomly from top and ball speeds up after collision with them. Also adjusted the paddles so that then do not go out of the window.
The ping one was great
The first tutorial is absolutely fantastic!
Tnks..For more videos like this, cheers from Argentina!
i dont like how in pong the speed of the ball isnt consistent but this is a great tutorial so far (ive only done the first)
Right? It's a great tutorial, but I tried it on pycharm and the ball just goes hyper fast. Maybe it's the engine or my pc's graphic cards or whatever
@@midknightmiddleman5887 yeah you should try learning pygame for game developmebt
@@midknightmiddleman5887 I set the ball.dx and ball.dy to 0.1 and it slowed it down
dude you is professional
It would be helpful if you added a division into topics by times in the video itself, because it is very long and some people (like me) may only need a specific part of it