# steve0012345/space-shooter architecture

> Architecture diagram of the GitHub repository steve0012345/space-shooter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/steve0012345/space-shooter
- Repository: https://github.com/steve0012345/space-shooter

## Overview

Space-Shooter is a fullscreen Pygame arcade game. The user launches `main.py`, navigates the menu, and starts `game.py`; gameplay handles movement, shooting, alien collisions, score display, and game-over/high-score updates. The graph reflects the sampled control flow and README; image files referenced by source are absent from the supplied tree, so they are not represented.

Main entry points: [`gameMockup.py`](https://github.com/steve0012345/space-shooter/blob/main/gameMockup.py) (Menu controller), [`game.py`](https://github.com/steve0012345/space-shooter/blob/main/game.py) (Game loop), [`main.py`](https://github.com/steve0012345/space-shooter/blob/main/main.py) (Application entry), [`menu.py`](https://github.com/steve0012345/space-shooter/blob/main/menu.py) (Menu and buttons)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry_menu["Entry and menu"]
  node_main["Application entry<br/>[main.py]"]
  node_mockup["Menu controller<br/>[gameMockup.py]"]
  node_menu["Menu and buttons<br/>[menu.py]"]
end

subgraph group_gameplay["Arcade gameplay"]
  node_game["Game loop<br/>[game.py]"]
end

subgraph group_state_assets["State and media"]
  node_score[("High-score file")]
  node_menu_music["Menu music"]
  node_game_music["Game music<br/>[Corazon.mp3]"]
  node_collision_sound["Collision sound"]
end

node_player(("Player"))
node_input["Keyboard and mouse"]
node_pygame["Pygame runtime"]

node_player -->|"launches"| node_main
node_main -->|"creates and runs"| node_mockup
node_mockup -->|"creates buttons"| node_menu
node_player -->|"provides input"| node_input
node_input -->|"menu events"| node_mockup
node_input -->|"game events"| node_game
node_mockup -->|"draws and polls"| node_pygame
node_game -->|"draws and polls"| node_pygame
node_mockup -->|"draws buttons"| node_menu
node_mockup -->|"starts process"| node_game
node_game -->|"reads and updates"| node_score
node_mockup -->|"plays"| node_menu_music
node_game -->|"plays"| node_game_music
node_game -->|"plays on collision"| node_collision_sound

click node_main "https://github.com/steve0012345/space-shooter/blob/main/main.py"
click node_mockup "https://github.com/steve0012345/space-shooter/blob/main/gameMockup.py"
click node_menu "https://github.com/steve0012345/space-shooter/blob/main/menu.py"
click node_game "https://github.com/steve0012345/space-shooter/blob/main/game.py"
click node_score "https://github.com/steve0012345/space-shooter/blob/main/highest_score"
click node_menu_music "https://github.com/steve0012345/space-shooter/blob/main/Corazon_Instrumental.mp3"
click node_game_music "https://github.com/steve0012345/space-shooter/blob/main/Corazon.mp3"
click node_collision_sound "https://github.com/steve0012345/space-shooter/blob/main/mixkit-trailer-screaming-people-annihilation-351.wav"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_mockup,node_menu toneBlue
class node_game toneAmber
class node_score,node_menu_music,node_game_music,node_collision_sound toneMint
class node_player,node_input,node_pygame toneIndigo
```

## Components

### Entry and menu

- [Application entry](https://github.com/steve0012345/space-shooter/blob/main/main.py): `main.py`
- [Menu controller](https://github.com/steve0012345/space-shooter/blob/main/gameMockup.py): `gameMockup.py`
- [Menu and buttons](https://github.com/steve0012345/space-shooter/blob/main/menu.py): `menu.py`

### Arcade gameplay

- [Game loop](https://github.com/steve0012345/space-shooter/blob/main/game.py): `game.py`

### State and media

- [High-score file](https://github.com/steve0012345/space-shooter/blob/main/highest_score): `highest_score`
- [Menu music](https://github.com/steve0012345/space-shooter/blob/main/Corazon_Instrumental.mp3): `Corazon_Instrumental.mp3`
- [Game music](https://github.com/steve0012345/space-shooter/blob/main/Corazon.mp3): `Corazon.mp3`
- [Collision sound](https://github.com/steve0012345/space-shooter/blob/main/mixkit-trailer-screaming-people-annihilation-351.wav): `mixkit-trailer-screaming-people-annihilation-351.wav`

### Other components

- **Player**
- **Keyboard and mouse**
- **Pygame runtime**

## Connections

- Player → Application entry: launches
- Application entry → Menu controller: creates and runs
- Menu controller → Menu and buttons: creates buttons
- Player → Keyboard and mouse: provides input
- Keyboard and mouse → Menu controller: menu events
- Keyboard and mouse → Game loop: game events
- Menu controller → Pygame runtime: draws and polls
- Game loop → Pygame runtime: draws and polls
- Menu controller → Menu and buttons: draws buttons
- Menu controller → Game loop: starts process
- Game loop → High-score file: reads and updates
- Menu controller → Menu music: plays
- Game loop → Game music: plays
- Game loop → Collision sound: plays on collision
