Creating Space Invaders in Pygame/Python

preview_player
Показать описание
A tutorial on how to create Space invaders in python with Pygame. This is a more advanced tutorial so I assume that you already know the basics of Pygame.

If you want to code along, you can find all the files and the code here:

Timestamps:
0:00:00 - Intro
0:00:46 - Basic setup
0:04:22 - Creating the player
0:19:21 - Creating the laser for the player
0:27:48 - Creating the obstacles
0:48:43 - Creating the aliens
1:20:27 - Collisions
1:27:48 - Adding the health system
1:34:19 - Adding the score system
1:42:50 - Adding the CRT styling
1:48:55 - Adding the music and sounds
1:52:03 - Adding the victory screen
Рекомендации по теме
Комментарии
Автор

This is the best programming channel on youtube.

janud
Автор

Man, you don't have a clue how much you have been helped me with your videos tutorial.

I am watching you from Mozambique and am super grateful for your work.

juniorMr
Автор

I'm already hyped for the platformer tutorial, loving the tutorials as well. Keep it up Clear Code and to those who are just learning like me :)

somebody
Автор

Thank you VERY much for this quality content! I learned a lot! Looking forward for the platformer and everything that comes next!
Thank you!!

vasarolnik
Автор

Bro you're amazing. I made flappy bird game from you and I learned so much. You have the best tutorials on this platform. Also I can't believe these are free too. Amazing job mate, keep up the good work.

sniper_hd
Автор

Awesome as usual. I learn so much from your tutorials. Thank you

chalkypj
Автор

Dude, I am studying Python and I found your channel... it's amazing!!! I'm in love with your videos and with the way you teach.

I am from Brazil and I wish we could have videos like yours. So I decided to start a channel about python and pygame! Maybe I'm gonna do it tomorrow haha but I am very excited to share it with people (in English, sharing your videos for my friends and in Brazilian Portuguese making my own videos).

Thank you so much and keep doing a great job!

CodeWithMilk
Автор

I like this Clear-Code-Videos. Such a good explanation, a good structure

klausbrier
Автор

Thank you for a great set of tutorials that you are putting out most useful.

stephencain
Автор

Nice! I love your vids. They are so quality

random_guy_on_youtube
Автор

This was a great tutorial. Thank you so much for the upload.

mesquitesmoked
Автор

thank you so much you helped me a lot, and because of you I learned so much and from the pygame module, it was a blast keep up your great work!!!

hyprbast
Автор

Great tutorial! Thankfully I didn't get jump scared this time :)

deathshot
Автор

Thank you very much for your work, so that we can learn. I'm testing PyScripter and it seems to me a very good ide.

fcobermudez
Автор

I love this channel! I added on to this game with dafluffypotatos particles from his tutorials!

OvenSeIls
Автор

Great guide, as always.

I changed a small thing that bugged me about the live-system.

First, I created a new Function for self.live_x_start_pos:
def update_lives(self):
self.live_x_start_pos = screen_width - (self.live_surf.get_size()[0] * (self.lives - 1) + (10 * self.lives))


For this function, I changed the 2 for (self.lives - 1) and the 20 for (10 * self.lives). Now I called this function in the place of the original line as well as in the player collision, right after reducing the lives per one. Reason being that 1st: now the positioning looks way better with more then two Extra-lives and 2nd: if you lose a live, you'll now lose the left-most icon instead of the right-most icon.

Seio
Автор

Fantastic video!! Thank you very much for this content.

javiervill
Автор

Wow!!!! Súper cool!!!, the sound is awesome!!!

jgarale
Автор

cant wait to try it myself, thx a lot!

ShaizeOn
Автор

bro this is amazing, i learn so much from you, thank you

EMRAN