Building a Space Invader Game in Python 1/3: Python Crash Course - Episode 12

preview_player
Показать описание
We'll build a space invader game in Python using Pygame (part 1).
This is the first of three projects.

⏱ Timestamps
0:00 - Introduction
0:46 - Planning your project
18:06 - Refactoring: The _check_events() and _update_screen() Methods
20:34 - Exercise
39:16 - Shooting Bullets
52:55 - Summary
Рекомендации по теме
Комментарии
Автор

Wow chap 12 is a sever challenge almost look like a different languages, let’s keep up guys there we will learn I think we juste did our first step in the real coding 😅

Zayanvoyage
Автор

really great walkthrough, the book is a bit dense and black and white syntax so this helps alot, thanks!

gotem
Автор

Hello, I hope you are doing well, I trying to run the program at 17:19, but I received an error that I do not understand. The error is:

ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred

Do you know what this means, if so, can you explain it to me?
Thanks

victorlemus
Автор

I notice that from chapter 1 to 11 all was having fun. This chapter all comments are having troubles. Chapter 12 has several challenges. From installing the pygames on the start the book installation syntax is out dated search for updated syntax in youtube you will know if your successful if you can import the pygame. The code is importing the major class from pygames this disappointed me but the main class is still very long. Due to the long code we forgot to check the indentions and a simple missing _ can be major head ache. Some lines also confusing because of the refactoring on this event some moves from other class and some is added. Some code was replace like the screen zoom. I was hoping to code the actual movement of the ship, hoping for the next project to be more hardcoding rather than importing 50% of the function form class package.

TheNotes
Автор

I can't run the game at all, the moment I try running the alien_invasion.py, I get an error saying that video system not initialized. And I have no clue how to solve it. Can you please help?

imarobot
Автор

I don't understand how you come to the process at mark 13:47 - 13:51. I created at images folder with alien_invasion folder and I am receiving an error stating that the file cannot be found.

warnerm
Автор

having trouble at alieninvasion 4. When i run the code it just gives me a dark screen on pygam and crashes the application. DOnt know what I'm dong wrong

ahappybadger
Автор

Hello sir! i am reading the chapter 12 of this book and i am getting continuos error for ship.bmp file that it is not found in directory please help in this regard

philosophyindepth.
Автор

Great video this chapter is really challenging.

erwindnfire
Автор

Hi, you write the method bullet.update(), but the Sprite class also has it.
In this case, will Sprite's method take any effect or it will have no affection at all? (I don't understand about override method in this case)

persas
Автор

I keep receiving no file found in directory. Pls help

sergiorodriguez
Автор

Can you please tell me how you got the ship image

darkknight-fceq
Автор

Good day, how about test yourself 12-5 keys

neilpastilan
Автор

I’m having issues with the ship.blitme() and the run_game() lines so I’m using this video to see if I done anything wrong

kareburedgamer
Автор

My ship is visualised almost on a full screen. How to make it smaller?

Matviikh
Автор

where do you got those images of ship from

sarthakshelar
Автор

this project dosent work can any body help with traceback bullshit and image cant load

Ranjeetsingh-keez
Автор

python version 3.11.3 installing pygame in prompt write: pip install --user pygame

ZulfaH
Автор

some buddy help me i can't run my file idk why
import sys
import pygame
class aliend_invasion:
def __init__(self):
pygame.init()
self.screen=pygame.display.set_mode((1200, 800))
invasion")
def run_game(self):
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
pygame.display.flip()
if __name__ =="_main_":
ai=aliend_invasion()
ai.run_game()

sybee
Автор

I have no idea what I'm reading...

Spacelover
welcome to shbcf.ru