How attreyabhatt/space-invaders-pygame works
This repository is a small Pygame space-invaders game. The player uses keyboard input to move and fire; the game loop updates enemies and the projectile, detects hits, updates the score, and renders the scene. Audio files provide background music and gameplay effects. The implementation is concentrated in main.py; the graph separates its runtime responsibilities, not separate modules. The tree lists only audio assets, so image and font dependencies referenced in code are not represented as repository nodes.
Main entry points: main.py Game loop · background.wav Background music · laser.wav Laser effect · explosion.wav Explosion effect
Components 11
Gameplay
- Game loop
main.py - Keyboard controls
main.py - Enemy movement
main.py - Projectile collision
main.py - Score and game over
main.py
Presentation
- Scene rendering
main.py
Audio
- Background music
background.wav - Laser effect
laser.wav - Explosion effect
explosion.wav
Other components
- Player
- Pygame runtime
Connections 10
- Player → Game loop: plays through
main.py - Game loop → Keyboard controls: handles input
main.py - Game loop → Enemy movement: updates
main.py - Game loop → Projectile collision: checks hits
main.py - Game loop → Score and game over: updates and displays
main.py - Game loop → Scene rendering: draws scene
main.py - Game loop → Pygame runtime: uses
main.py - Game loop → Background music: plays
main.py - Game loop → Laser effect: plays on firing
main.py - Game loop → Explosion effect: plays on hit
main.py