Pygame Space Invaders Beginner Tutorial in Python - PART 4 | Adding Aliens

preview_player
Показать описание
In this Python tutorial I code Space Invaders using the PyGame module. I'm going to add aliens to the code and make them move by themselves.

Рекомендации по теме
Комментарии
Автор

In case anyone is looking to control the movement speed.
Inside the Alien class make a variable called movement_speed = 5
Inside the update function change the first two lines from
self.rect.x += self.move_direction
self.move_counter += 1
to
self.rect.x += self.move_direction * self.movement_speed
self.move_counter += self.movement_speed

riley
Автор

Hello Rus, I've been watching lots of your tutorials. Can I ask how to you code asteroids that spawn into the right and goes to left randomly?

briandomingo
Автор

hello, how do i increase the speed of the allien movement

josev
Автор

i was wondering how can you load 2 alien img.
So when you make a first fleet using img 1 and a second fleet using img2 ?
thank you

MaureenScheltens
Автор

Hello how to transform scale alien plz

suongranet
Автор

Hi. I am trying to tweak your code in order to make a vertical racing game.
Every let'say one second I would like a car to appear and coming down.
If I use your _def create_aliens()_ I've got only one car coming down; if I put the def inside the main loop I will have infinite overlapping cars.
Any idea to achieve this repetition?

dcdondon
Автор

hello, how do i lower the speed of the allien movement

paiin
join shbcf.ru