How seeeruu1/space-shooter works
A single-file Pygame space shooter: the runtime loop handles input and delegates game actions to MAIN, which manages menu/game state, entities, collisions, and outcomes. The shown code includes enemy formations, shooting, obstacles, pickups, health/shields, instructions, and win/loss screens. Entity and resource relationships are based on the excerpts; omitted portions of the loop limit confirmation of some interactions.
Main entry points: spaceshooter.py Game Controller · img Image Assets · font Font Assets · sound Sound Assets
Components 13
Game Runtime
- Pygame Loop
spaceshooter.py - Game Controller
spaceshooter.py - Menu and Screens
spaceshooter.py
Gameplay
- Player Ship
spaceshooter.py - Enemies
spaceshooter.py - Projectiles
spaceshooter.py - Obstacles
spaceshooter.py - Pickups
spaceshooter.py - Health Display
spaceshooter.py
Game Resources
- Image Assets
img - Font Assets
font - Sound Assets
sound
Other components
- Player
Connections 17
- Pygame Loop → Game Controller: creates
spaceshooter.py - Pygame Loop → Game Controller: dispatches input
spaceshooter.py - Game Controller → Enemies: spawns
spaceshooter.py - Game Controller → Obstacles: creates
spaceshooter.py - Game Controller → Projectiles: manages
spaceshooter.py - Game Controller → Pickups: manages
spaceshooter.py - Game Controller → Player Ship: checks collisions
spaceshooter.py - Game Controller → Health Display: draws health
spaceshooter.py - Game Controller → Menu and Screens: selects screens
spaceshooter.py - Pygame Loop → Game Controller: requests shooting
spaceshooter.py - Player Ship → Image Assets: loads
spaceshooter.py - Enemies → Image Assets: loads
spaceshooter.py - Obstacles → Image Assets: loads
spaceshooter.py - Pickups → Image Assets: loads
spaceshooter.py - Game Controller → Image Assets: loads
spaceshooter.py - Pygame Loop → Font Assets: loads
spaceshooter.py - Pygame Loop → Sound Assets: loads
spaceshooter.py