
Pygame Tutorial – Creating Space Invaders
Tech With Tim
Views: 694682
Like: 20417
In this pygame tutorial we will be working through creating a full space shooter/invader game! I will be teaching the pygame module and some basic game design principles as we walk through this long python 3 pygame tutorial.
🎙If you want to show your support please subscribe to @Time Out With Tim, where I’ll be posting weekly podcasts!
⚙ How to Install Pygame (Windows):
⚙ How to Install Pygame (Mac):
💾 Game Assets & Code Download:
💾 Game Assets Only Download:
◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
📸 Instagram:
🌎 Website
📱 Twitter:
⭐ Discord:
📝 LinkedIn:
📂 GitHub:
🔊 Podcast:
💵 One-Time Donations:
💰 Patreon:
◾◾◾◾◾◾
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
⭐ Tags ⭐
– Tech With Tim
– Python Tutorials
– Pygame Tutorial
– Pyagame Space Shooter
– Python Pygame Tutorial
– Pyagame Tutorial Python
⭐ Hashtags ⭐
#python #pygame
02.11.2022
Hello, I am working on this game, and I have a little question to ask. When an enemy is killed, why the lasers he shot are also removed?
bro often you are saying that if i run this image and there is a image is showing like how to run that what is the key is it ctrl+b
I dint know why but every time i try to run it it gives a error message about the png but i have all of them does someone maybe know what to do
I love the game thank you Tim
😀😀😀😀😀😀😀😀😀😀
Full name of pip is PYPI, which stands for Python Package Index.
how can i make enemies move left?
My 'ship.draw(WIN)' in the redraw function isn't working
Does anyone know how he's able to open a new file in sublime text and name the file immediately at the bottom? I usually have to open a file and do save as etc.
exciting
French : merci mon gars , tu m'as beaucoup appris , merci de ta générosité
im making the game for my dads birthday i hope he likes it
I have the assets showing in my files by it says file not found in working directory what does that mean
@55.32 I'm getting an indentation error on line 66 when putting in the super().__init__(x, y, health)
any solutions?
interesting. I usually use unity and c sharp and it works really well for me and i have programmed a few really good games with it, but pygame can be better in some situations, when you want more control. Thanks for the tutorial!
I know this video is old but can anyone help me because I have reached 1:39:24 but my ships still shoot before they reach the screen so it makes it realy hard to play. Please help.
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.
how do i fix indention error
57:01 just marking
can someone post their code bc i think i went wrong somewhere and i just wanted to check
keeps saying can't find import pygame, looked up multiple places to fix, but still getting same error. it installs but doesn't recognize?
I'm up to 38:40 but when I go to run program to see the red square I get a blank screen and the error:
"NameError: name 'ship' is not defined"
I've checked many times and my code is indentical. Anyone know where I'm going wrong? Can't figure it out. Thanks
what does obj mean in the class menu
Wow…..I am very impressed been a woman I saw some good recommendations about *⬆️⬆️⬆️on telegram I give it a trial but to my greatest surprise I got a cc with high balance from him.thanks buddy.
can you help me, i cant install pygame on my computer ;-;
Really good content❤. just take a momement and appreciate him.
when i say import pygame in cmds it just says import isnt a correct term
pls help
17:58 That awkward silence tho lol
Great vid man! It helped me so much Thank you!!!
Perfect game!
Love the vid
Anyone know how to implement a scoreboard in this?
Mate what r u using for autocompletition with sublime text? Thx in advance and great job for the tutorial
!
thanks for all you do man
why is it when i press exit but it doesnt closed even though i put in the code for it to do that
hi i just finished the video and i am actually impressed this video i s amazing
this is my first time trying to code game on python and i succeed
this was little hard and i thought about quit the app like 2 times (: but after playing with the code i could run it clear like in your video
even i screen recordedd some of my proccess can i post it on youtube?
to help others dont make some rookie mistakes that i did .
also thank you very much tim i always remember you as the one who made me start coding(;
sorry if i am spell some words wrong its 12 AM and i am really tired <3
How can I turn it into Apk
"inconsistent use of tabs and spaces in indentation" I CANNOT CHANGE THE INPUT FROM MOUSE BUTTON TO THE K BUTTON. WHYYYYYYYYY?!?!??!?!?!?!!???!?!??
its not finding the images in the assets folder 🙁
Traceback
FileNotFoundError: No file bla bla bla bla
no matter what I'm changing nothing happening
pls help I don't understand what is the problem with
At the position modification, mine doesn't work
keys = pygame.key.get_pressed()
That area of the video. The box doesn't do anything when pressed
Hey now. At 48 minutes, after you replace ship with player, it won't load the ship and I get "argument 1 must be pygame.Surface, not None." I've looked over code and tried searching for an answer but can't figure it out. Please help. Thanks for your videos BTW. They're awesome
completed my first project ever! thanks for the vid.
What is software and hardware specification 2d space shooter game
What is front end and backend technology
I can not install os, time and random? Is it something wrong with my Pycharm?
I dont know how to put python file into the same file as assets 🙁
when i type def main() for the quit screen it says folder not found & freezes when i hit the X button ? please help
Thanks foe your tutorial. Very helpful
You shouldn’t call a kabel
Functional (collide) in this case from a class.
You would put the object into the collide() function in your main loop. That way your class is never dependent on an external function!
How could someone monetise a game like this? I'm thinking of trying to build a game in JS but just curious how someone could make money from it etc. thanks.
25:16