Pygame Tutorial - Creating Space Invaders -

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


  1. 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?

  2. 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

  3. 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

  4. I love the game thank you Tim

  5. Full name of pip is PYPI, which stands for Python Package Index.

  6. My 'ship.draw(WIN)' in the redraw function isn't working

  7. 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.

  8. French : merci mon gars , tu m'as beaucoup appris , merci de ta générosité

  9. im making the game for my dads birthday i hope he likes it

  10. I have the assets showing in my files by it says file not found in working directory what does that mean

  11. @55.32 I'm getting an indentation error on line 66 when putting in the super().__init__(x, y, health)

    any solutions?

  12. 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!

  13. 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.

  14. 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.

  15. how do i fix indention error

  16. can someone post their code bc i think i went wrong somewhere and i just wanted to check

  17. keeps saying can't find import pygame, looked up multiple places to fix, but still getting same error. it installs but doesn't recognize?

  18. 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

  19. Debby Ryan 👉cpnflipz on telegram👈 says:

    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.

  20. can you help me, i cant install pygame on my computer ;-;

  21. Really good content❤. just take a momement and appreciate him.

  22. when i say import pygame in cmds it just says import isnt a correct term
    pls help

  23. 17:58 That awkward silence tho lol

    Great vid man! It helped me so much Thank you!!!

  24. Anyone know how to implement a scoreboard in this?

  25. Mate what r u using for autocompletition with sublime text? Thx in advance and great job for the tutorial

  26. why is it when i press exit but it doesnt closed even though i put in the code for it to do that

  27. 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

  28. "inconsistent use of tabs and spaces in indentation" I CANNOT CHANGE THE INPUT FROM MOUSE BUTTON TO THE K BUTTON. WHYYYYYYYYY?!?!??!?!?!?!!???!?!??

  29. its not finding the images in the assets folder 🙁

  30. 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

  31. 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

  32. 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

  33. completed my first project ever! thanks for the vid.

  34. What is software and hardware specification 2d space shooter game

  35. I can not install os, time and random? Is it something wrong with my Pycharm?

  36. I dont know how to put python file into the same file as assets 🙁

  37. when i type def main() for the quit screen it says folder not found & freezes when i hit the X button ? please help

  38. 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!

  39. 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.

Leave a Reply

Your email address will not be published.