How heminados/space_invaders works
This is a Turtle/Pygame Space Invaders game. The player starts from a title screen, enters a name, and the game loop manages movement, enemy waves, shooting, collisions, bonuses, scoring, and level progression. On victory or defeat, the game saves a high score and displays a results screen with a restart option. The graph reflects the sampled runtime code and README (which is empty); unsampled portions of the game loop may contain additional details.
Main entry points: game.py Game Loop · main.py Launch and Music · entity.py Entity Base · screens.py Start Screen
Components 14
Entry and Screens
- Launch and Music
main.py - Start Screen
ui/screens.py
Gameplay Control
- Game Loop
game/game.py - Level Manager
game/level_manager.py - Collision Check
game/collision.py
Game Entities
- Entity Base
entities/entity.py - Player Ship
entities/player.py - Enemy
entities/enemy.py - Bullet
entities/bullet.py - Bonus
entities/bonus.py
Scoring and Results
- Scoreboard
ui/scoreboard.py - High Scores
game/game.py - Result Screens
ui/screens.py
Other components
- Player
Connections 18
- Player → Start Screen: starts game
- Launch and Music → Start Screen: creates
main.py - Launch and Music → Game Loop: launches
main.py - Start Screen → Launch and Music: calls start callback
ui/screens.py - Game Loop → Level Manager: gets waves
game/game.py - Level Manager → Enemy: creates enemies
game/level_manager.py - Game Loop → Player Ship: creates
game/game.py - Game Loop → Bullet: creates shots
game/game.py - Game Loop → Bonus: spawns bonuses
game/game.py - Game Loop → Collision Check: checks hits
game/game.py - Player Ship → Entity Base: extends
entities/player.py - Enemy → Entity Base: extends
entities/enemy.py - Bullet → Entity Base: extends
entities/bullet.py - Bonus → Entity Base: extends
entities/bonus.py - Game Loop → Scoreboard: updates
game/game.py - Game Loop → High Scores: loads and saves
game/game.py - Game Loop → Result Screens: shows outcome
game/game.py - Result Screens → Launch and Music: restart callback
main.py