Tutorial timestamps: 0:9:00 import assets 0:15:00 main function 0:32:30 ship class 0:39:00 setup player keys 0:46:30 player class 0:53:30 enemy class 1:13:00 laser class 1:37:39 enemy shooting 1:42:00 health bar 1:49:20 main menu
@arnosk87034 жыл бұрын
Great job
@cybertown47384 жыл бұрын
👌👌👌👌
@abantikajena1464 жыл бұрын
Thanks bhaiya
@barrelsynapse4 жыл бұрын
Thanks!
@johannesdjakobson18504 жыл бұрын
thanks!!
@ajiazhouАй бұрын
This is one of the best pygame tutorials online because he tells you what each step does
@lamedev13424 жыл бұрын
Congrats to everyone who finished the tutorial and created the game! We made it and didn't give up!
@ashsureshkumar91504 жыл бұрын
didnt work for me fudge
@caldwell9-04 жыл бұрын
Aditya ha ra
@elenkorkmaz40754 жыл бұрын
yeah!
@ayandak474 жыл бұрын
Am 19 mins in
@armaansood20814 жыл бұрын
3 sleepless nights but i did it
@ziiiizy4 жыл бұрын
Thank you so much, Tim! I was present for all 2 hours and learned a lot. This is my first official Pygame game! Keep the good work up!
@baphnie3 жыл бұрын
"Forgive me; I'm drawing with my mouse." *draws a perfect square with the hand of god*
@franciskurian93923 жыл бұрын
How did he do that
@usopphammergataling39103 жыл бұрын
@@franciskurian9392 *first* *draw* *a* *circle*
@franciskurian93923 жыл бұрын
@@usopphammergataling3910 that's the problem
@eshanbahuguna80884 жыл бұрын
holy shit! what a coincidence, i just finished making a space invaders game from another tutorial, and my man posts a better one
@bwip20334 жыл бұрын
A week ago I was barely scraping the surface of Python, following this tutorial made it much easier to see where syntax belongs and how everything communicates. This was a lot of fun - Thanks!
@ikben39833 жыл бұрын
lol i installed python like a couple days ago, was hard, now its ez with tim
@codysmith19153 жыл бұрын
I super appreciate this man, I was a c++ student in college but wanted to swap over to python. Stuff likes this make awesome little projects to practice the language
@trevorribbans22564 жыл бұрын
I love how it covers many topics, classes & dictionaries especially! Super helpful for me
@katchem56662 жыл бұрын
completed my first project ever! thanks for the vid.
@elenkorkmaz40754 жыл бұрын
Thank you so much it worked perfectly despite the loads mistakes I made... It had for me 4 days in a row, a few mental breakdowns and struggles, but I managed to solve everything and follow your path and I"m very thankful because I just finished my first python project with you :)! Btw I have an advice for people who watch this; create a checkpoint save and save it everytime when you ran the project without any error, so you wouldn`t have to restart the project everytime you have an error. Thanks again!
@riot_dingo2 жыл бұрын
17:58 That awkward silence tho lol Great vid man! It helped me so much Thank you!!!
@tonyfremont4 жыл бұрын
Been programming, for well over 40 years, in BASIC, various assembler languages, FORTRAN, COBOL, C, Perl, php, and several scripting thingys. After much resistance, I finally broke down and decided I should spend some time learning more about python. Watched the 4.5 hour tutorial from Mike, pygame demo of Connect 4 (part 1), and then watched this. Best use of a cold Saturday in a long time. In about 8 hours, I've a decent handle on the basics, along with graphics use. I can't thank this channel enough. I might actually learn some JavaScript now. ;)
@mattmovesmountains14434 жыл бұрын
About halfway through this code-along, my program would force-close as soon as I hit the shoot button. I couldn't for the life of me figure out what was different between my code and Tim's, so I made a file comparison program that printed each line of both of our codes, one line at a time. Got to the issue, fixed it, and it works! Noob for the win
@federicogemin17154 жыл бұрын
Top quality tutorial. Good job man!
@paulbagnis7814 жыл бұрын
Thank you for being such a great guy, love what you do, it's been two weeks working on your videos, just got me a top class last year project ! If you wan't to give courses in Paris, can get a word to my school ! Love from France !
@ggbo49364 жыл бұрын
Oh you're French too, I think I know you ! XOXO
@paulbagnis7814 жыл бұрын
@@ggbo4936 Love u brahhhh
@ggbo49364 жыл бұрын
Thank you to be so great, I can go to holidays now, you save my last year project. So nice ! Keep going love on you from France !
@msa35334 жыл бұрын
dude you are literally expanding our knowledge. thanks a lot
@ArpanNeupaneProductions4 жыл бұрын
Thank you for being specific and explaining what you were doing thoroughly. Keep it up!
@swamphonkey Жыл бұрын
Thanks!
@TechWithTim Жыл бұрын
Thank you!!
@SuperFilmFan11 Жыл бұрын
@@TechWithTim my lesers are shooting only once and then it is not shooting at all please help me and the you lost sine is showing only for 1 second
@CSonneck4 жыл бұрын
Merci Tim Très bien présenté. (Very well presented.) BRAVO Christophe from France
@arnosk87034 жыл бұрын
Moi aussi je suis francais.
@christophejan55872 жыл бұрын
French : merci mon gars , tu m'as beaucoup appris , merci de ta générosité
@gloryness4 жыл бұрын
YES TIM WAS LITERALLY WAITING FOR THIS
@anurasenarathna17032 жыл бұрын
One of the best game in my first computer, ZX Spectrum few decades ago. Thank you
@roshanican5043 жыл бұрын
With this tutorial it's been my second pygame but i know everything's waste if we really won't understand the code itself and and be able to built Everything from scratch and add some features so hopefully, I'll do it, please pray for my grandpa guys it's like he is really sick but what i am hoping is to work hard and get a job to support his treatment... But i really believe prayers or dua change things... So thanks to Tim again It's really amazing for people like me who can get this content for free literally...
@christopherfrias1833 жыл бұрын
Is he better?
@robinnutbeam7503 жыл бұрын
Hi Tim. Great tutorial, it has helped me to better understand what code in Python/ Pygame can create. I managed to add background music to this game, which I learnt from one of your other Pygame videos I had an error with the def collide (obj1, obj2): section. When I ran the program it said that the argument result expected was an int value but returned a float value. I managed to get the code running by using the int function before the offset_x and offset_y. like this: def collide(obj1, obj2): offset_x = obj2.x - obj1.x offset_y = obj2.y - obj1.y return obj1.mask.overlap(obj2.mask, (int(offset_x), int(offset_y))) != None If anyone else had the same problem I hope this helps. All other code works great :) thanks Tim
@williamneck78974 жыл бұрын
Thanks for being so specific explaining every single line of the code, learning python this way becomes much easier and dynamic than reading books full of theory (I'm not saying these are useless but for me learning hands on is proving to improve the learning curve and the interest in programming in a beginner level) Thanks again Tim keep it up!!
@mountainlion90022 жыл бұрын
thank you so much my brother Tech With Tim i'm using this for my final project
@neelbiswas59924 жыл бұрын
At 48:34, instead of using self.ship_img, use the variable for the yellow ship (YELLOW_SPACE_SHIP)
8 ай бұрын
Awesome, Tim! Kudos! Greetings from Brazil!
@devguyahnaf4 жыл бұрын
Thx Tim for this tutorial. Keep going with it because I need this one. Also stay safe
@zLowe3 жыл бұрын
Dude You are AWSOME! excellet tutorial I learned so much. Better then 4 weeks of school
@angel-ig4 жыл бұрын
23:01 He said he was drawing with the mouse, but that's the best square I've ever seen.
@ekrem_dincel4 жыл бұрын
Lol this is a perfect square I think.
@sreeramoffcl4 жыл бұрын
Hold shift while drawing to get a straight line.
@__someone89383 жыл бұрын
Shift + mouse
@jibster1483 жыл бұрын
Cheers Tim mate, class at what you do sir
@Ashersminicartoons4 жыл бұрын
I've been subbed to this channel since you guys had 100K subs! Amazing tutorial Tim!!
@caijason94864 жыл бұрын
thanks for the tutorial. Tim. It saved me a lot of time to be familier with an interesting game module in Python. Great support !
@aaeuj4 жыл бұрын
I was waiting for this, stay safe my friends 😷
@suguruchhaya31944 жыл бұрын
Love this tutorial!! One thing to mention is that you have to have mastered beginner python concepts and also know how to use classes to understand what the heck is going on.
@oomaithamizhan31474 жыл бұрын
Exactly....very consoling
@Th3RiddlerYT4 жыл бұрын
Really appreciate these videos! I have given programming a second go around and am really sticking with it this time. Following tutorials such as yours expand my knowledge and teach by doing at the same time. You got yourself a new sub! P.S. I'll check out that podcast too ;)
@CorridorJ Жыл бұрын
how did it go? still programing?
@Th3RiddlerYT Жыл бұрын
@@CorridorJ Kinda sorta. I'm a statistical programmer - so somewhat related!
@eddiemeekin9180 Жыл бұрын
Just finished your beginners oygame tutorial. Was so badly hoping you would have a tutorial for this (I feel this is the next step to that video) and obviously you pulled through! Dunno how I would have felt following a tutorial from somebody else. You are an Amazing tutor
@harrisoncrettol4 жыл бұрын
I appreciate the hard work that goes into these videos. I noticed a small bug in the program where everything on the screen had almost like a ghosting effect. Fixed it by adding "WIN.fill((0,0,0))" directly after the redraw_window function. Hopefully this helps
@jadenwirhol32603 жыл бұрын
Dude, keep this up. I love these videos
@hemanta2124 жыл бұрын
pip is actually recursive acronym "Pip Install Packages"
@diliupg4 жыл бұрын
pip pip hooray!! :-D
@Tomo-uj8qy4 жыл бұрын
yo that's crazy, but ion remember askin my jibba
@jackfishion59644 жыл бұрын
Smh my head
@kavinbharathirm94784 жыл бұрын
@@jackfishion5964 I see what you did there ...
@baddreams09193 жыл бұрын
i thought it was "Please instal packages"
@zeinan.16553 жыл бұрын
and to sum this up: ... You're the best of the best ♥ *appreciation* 👏👏
@probabilityfilter3 жыл бұрын
If anyone of you are getting the "FileNotFoundError: No such file or directory" error (at around the 10min mark) then one of the reasons could be that you are not running your Python from the folder that you are working from. Meaning, many IDEs work from the root or base folder like ".../Documents/Python Scripts" and if you created a folder for this project like ".../Documents/Python Scripts/Space Invaders" then you need to change your IDE's working folder to ".../Space Invaders". Also remember to use the correct slash \ vs / , whenever you need to use it for paths etc. Also space between words of a folder name need to be handled appropriately.
@noxzeuz Жыл бұрын
this was great, i actullay understand most of this :D, maybe you go a little fast for me, but i just have to slow down the speed of the vid! Great job!
@l4m54 жыл бұрын
Legends code in the default IDLE DARK MODE.
@tnetroP4 жыл бұрын
Uber legends code in total dark, remove the lightbulb, turn off keyboard backlighting and turn the monitor off. Hardcore darkmode.
@Vielmont4 жыл бұрын
@@tnetroP lol
@gokulbeats69324 жыл бұрын
@@tnetroP 😂
@projectvibe12264 жыл бұрын
I use IDLE because my trashy laptop can't download pycharm nor sublime
@nemanjastefanovic92154 жыл бұрын
@@projectvibe1226 You can use repl.it. It is a browser based IDE, there is no downloads and even my laptop can use it. (It is very old)
@alexmckinley79 Жыл бұрын
Thank you so much for this tutorial. Your projects are really helping me practice skills and get more confident.
@elosopodast3 жыл бұрын
At one point, when you REPLACE, in python it also replaces the file name from ship to player and then it throw an error, so I had to go back an manually replace player back to ship so it could find the right asset.
@noone-gr4is4 жыл бұрын
Dude this is the video I was waiting for!
@v.smourya80054 жыл бұрын
Excellent Tutorial !! I was able to follow through the whole tutorial with so much ease ! Thank you Tim :)
@neelbiswas59924 жыл бұрын
Best of luck for your new podcast!
@curtis97013 жыл бұрын
Hey man, I just want to say I appreciate the living hell out of you. How have I only just discovered you. I guess perhaps its because this is the first time I have dabbled in pygame and you came up. But good god. I have not found a better teacher for coding related topics. Seriously, you teach better than my profs do. If your someone who has never touched pygame, following along, you go over all the built in functions and what they actually do. I love that when you're using an unfamiliar library. I even downloaded Sublime text to try out. Was curious as to how you got the intelligence going and to get the parameters to pop up for the built in functions?
@varivalentinuzzi36024 жыл бұрын
Great lesson. I changed to just lose a life instead of game over when health comes to zero. I also want to introduce a points counter each time shoot down an enemy ship. To test my self
@philipeby54182 жыл бұрын
I noticed that too. I think it was just a bug he didn't catch. But great tutorial nonetheless
@dejavukun4 жыл бұрын
Thanks a lot for your videos Tim. I had a question. How do you start with building such projects? Do you use references? Do you use other people's code initially? Like supposed you are starting out with PyGame module(I know that now you are pretty experienced with it and you can build up stuff on own), how would you approach building a game like let's say PONG. Could you explain your approach. Could you make a video on this topic? Like how we can approach things while making a project which can minimize copying stuff. One thing that I do is that if I learn something from a blog or a video, i try to understand it. Then, mostly I will make a variant of it. That way, I am practicing also and using the concepts I learnt without copying much.
@jfsimard794 жыл бұрын
Towards the end Tim was like "Alright, let's wrap this up, been recording for HOURS." hahah. Thanks for tutorial, Pygame is so cool.
@johannesvartdal6242 жыл бұрын
Time out with Tim is an awesome name!
@franciscomenezes20554 жыл бұрын
Muito bom, estou começando no pygame e seu vídeo ajudou muito a entender melhor a iteração entre objetos.
@thepaperbowser2 жыл бұрын
For the issue of enemy lasers shooting off center from the enemy ships, I used a different solution that doesn't involve overriding the inherited shoot method: Use an image editing program (Photoshop, Paint 3D, etc.) to edit the size of each laser image asset (red, green, and blue) to be the same width as its corresponding ship image asset (red, green, and blue). NOTE: Make sure to keep the transparent background! Thank you for the tutorial! This is really helping me learn Python and is giving me good practical practice for how to work with classes.
Yo dawg, we heard you liked functions, so we put a function IN YO FUNCTION! So you can run a function while you run a function!
@LuisPereira-bn8jq4 жыл бұрын
Really neat tutorial. Had fun implementing this one.
@hermesbonilla47754 жыл бұрын
One Question: how did you create the art in the tutorial? I'd like to add more features and just wanted to know :)
@revanthgsr3 жыл бұрын
Me too. I already added healthpacks with a bitmap image from paint. i tried making hearts for the lives to increase but i am getting a white background
@rafasantos234 жыл бұрын
*The best Tutorial of 2020, thanks for this one Tim*
@skilz80984 жыл бұрын
Nice python tutorial. Just a couple of caveats... I made a small modification to the game logic, in the run loop where you were checking to see if lives were
@krishnaraj39894 жыл бұрын
am not even that experienced in game programming except for working with cpp and sfml, but i do agree that game programming is one of the best ways to learn any language.
@drax38013 жыл бұрын
VRY GOOD TUTORIAL TIM... VERY INDPIRATIONAL AND UNDERSTANDING THANKS ALOT
@GamingBrasilTuto4 жыл бұрын
at 50:00 i'm getting this error: TypeError: argument 1 must be pygame.Surface, not None. I change in class Ship, self.ship_img = None to self.ship_img = YELLOW_SPACE_SHIP and works but just for yellow color. What i can do?
@gembirg80714 жыл бұрын
Same
@fanispapaspyrou98854 жыл бұрын
Same
@edos37833 жыл бұрын
You're such a cool guy Tim thanks so much !
@glaceondev41494 жыл бұрын
Hey there,if you got any errors like: " int got float" then the error is in the instance of player and if you have tried to divide the WIDTH/HEIGHT with some values so it will spawn at the center or somewhere of your screen if so...then the problem is when you try to divide that numbers that returns a floating number so what you can do is: import decimal decimal.Decilam(Now just do your math stuffs) i faced this error and saw the entire video 3 times..but after all i found this problem..its hard to find this type of error...HOPE THIS HELPS
@flame74954 жыл бұрын
ok?
@flame74954 жыл бұрын
thanks I gues
@uli90014 жыл бұрын
Thanks Tim! Again a great tutorial with absolutely no necessity to watch it with increased speed ;-)
@bryanromo71384 жыл бұрын
Hey Tim, great video as always! I'm a begginer and your videos help me a lot :) I wanted to make a video about: "I made a videogame watching a tutorial" (this tutorial) obviusly referencing you and your channel. Can you give me permission? Anyways thanks as always!!
@rakeshkulkarni55524 жыл бұрын
I learnt lots of new ideas for python other than pygame, great tutorial .
@mehdibekri95864 жыл бұрын
if you guys find a problem with scaling the BG ur probably missing a coma lol i was stuck there for a whole hour
@brainy34293 жыл бұрын
It is a dash( or minus sign), not a underscore.Tim tricked us haha.
@karelsalminen26714 жыл бұрын
This was a really fun and educational little code-along project! Greetings from Finland!
@dabberdood20093 жыл бұрын
chezard 1 1 1
@jcsmith95184 жыл бұрын
Hey Tim, trying to learn Python and trying the game. Q: How to increase screen speed? Tried modification of FPS but don't work. Thanks for tutorial!
@jhonmekonnen64654 жыл бұрын
i think the speed is due to your computer power, try increasing the player_velocity
@lucanotti2246 Жыл бұрын
Awesome tutorial man!
@vladijunior204 жыл бұрын
Hey Tim. Amazing tutorial !! I managed to make the game and I really enjoyed your way of teaching. Quick question, I am trying to make my version of the game by adding "lives" which could be an enemy ship but instead of removing 10 points of life and collide, it will add 10 points to my player. I tried a few ways by myself but without luck. My way of thinking was to define that when the enemy ship from when randomly was selected, if it is green for example to add points. I guess the error was mostly that I havent defined ship."green" anywhere. Any help or comments will be highly appreciated. Thanks again for the video
@philipeby54182 жыл бұрын
Did you figure it out?
@jasongrace62743 жыл бұрын
You explain very well. Love ya man!
@jasongrace62743 жыл бұрын
OOO KAY! Well a little too much, I got impressed in the first 20 mins, but now it feels like it's never gonna end. Puff!
@georgiivanov86314 жыл бұрын
Web scraping tutorial!!!!
@shawnjames32424 жыл бұрын
Ya
@AQlee4 жыл бұрын
Maybe an RSS reader
@franciscolucarini87614 жыл бұрын
For bug bounty or pentesting
@sprayzu4 жыл бұрын
with login and csrf code pls !
@hossumquat3 жыл бұрын
If anyone is wondering why the Y coordinate increases going down instead of up, like it does in mathematics, I believe the reason is because that is how screen rasterization on the old CRTs were done. It would draw from the top-left corner and go to the right first, then back and down a line to draw the next row, etc. Why did that do it that way? Probably because that was the way people read books here in the west, left to right and top to bottom in the same way. So maybe that will help you remember how the coordinate systems work in graphics programming.
@hamod14520004 жыл бұрын
His website is down, can someone upload the image assets somewhere else for us?
@SmellyNutz4 жыл бұрын
It isn't now, I just downloaded
@ritikvishvakarma71524 жыл бұрын
You are doing a really good job. Suddenly I found your channel and I became your fan
@emojiguy63744 жыл бұрын
Tim: don't name the file pygame Me: let me try 😈 Later.... Well you know what happened.
@Kicsa3 жыл бұрын
You have real good vids Tim, I just can't focus, help me! keep up the good work.
@acropolise29454 жыл бұрын
Imagine doing this thing but using Unity instead so it'll take you 10 minutes...
@hbros68114 жыл бұрын
yeah, in unity this will be a lot quicker xD
@rootamin3 жыл бұрын
Best wishes for you ...From Iran
@deshansalitha24774 жыл бұрын
Thanks for the tutorial i"m new to python. But with your help i got lot of gain. thanks for the video
@niteshbagla60454 жыл бұрын
Finally completed , thanks for the game
@sashamuller97434 жыл бұрын
took me days to work through this lol. Thank you Tim for all your hard work, i honestly don't know how you do it.
@oomaithamizhan31474 жыл бұрын
How many days u spent...friend
@P.L.D.4 жыл бұрын
Thanks Tim! You are the best!
@WahrerKuroKiba4 жыл бұрын
After providing a proper path for the image files and not what you did, it worked for me. Altough the background just gets overwritten and gradually becomes just grey when ships go over it LOL
@starleaf-luna3 жыл бұрын
u probably did something wrong, try again
@doughaskins1603 жыл бұрын
Thank you so much. Just started learning and this was a challenge AND it fired my imagination
@lemastertech3 жыл бұрын
Awesome Video Man
@gabriellita7236 Жыл бұрын
Thank you for this amazing tutorial
@kaelwang12514 жыл бұрын
Very good video! Thank you so much! Keep up the good work!
@meitsv47334 жыл бұрын
it's a great vid. keep uploading!
@arnaldogonzalez13 жыл бұрын
Super helpful intro to pygame. Thanks a ton!
@fabu3244 жыл бұрын
Very cool and interesting tutorial!!! Just finished it and I defenetly larnt a lot! Thanks a lot!!!
@brianm25724 жыл бұрын
great tutorial, just finished!
@Ali-vu6eo4 жыл бұрын
bro u deserve more subs.. thankyou so much for the tutorial