# speedcuberjuliojorge-source/invasiongalactica architecture

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

- Interactive diagram: https://gitdiagram.com/speedcuberjuliojorge-source/invasiongalactica
- Repository: https://github.com/speedcuberjuliojorge-source/invasiongalactica

## Overview

This is a Java arcade game: the player starts the game, then plays a shooter with a hero ship, hostile ships, projectiles, scoring and lives. `InvasionGalactica` is the entry point for `Juego`; the game manager sets up the input context and game objects, while gameplay entities move, fire and handle collisions. The graphic base supplies shared sprite and position state, and the background handles screens and HUD text. Several gameplay classes are indexed but not excerpted, so their connections to the manager are shown as unverified rather than inferred as definite calls.

Main entry points: [`Entrada.java`](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Entrada.java) (Input context), [`Juego.java`](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Juego.java) (Game manager), [`NaveEnemiga.java`](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/NaveEnemiga.java) (Enemy base), [`Heroe.java`](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Heroe.java) (Hero ship)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_entry["Game entry"]
  node_manager["Game manager<br/>[Juego.java]"]
end

subgraph group_actors["Ships and combat"]
  node_hero["Hero ship<br/>[Heroe.java]"]
  node_destroyer["Destroyer<br/>[Destructor.java]"]
  node_prey["Bird enemy<br/>[AveDePresa.java]"]
  node_minelayer["Mine layer<br/>[LanzaMinas.java]"]
  node_panacea["Panacea ship"]
  node_enemybase["Enemy base<br/>[NaveEnemiga.java]"]
  node_rebels["Rebel ship<br/>[NaveRebelde.java]"]
  node_bullets["Projectiles<br/>[Bala.java]"]
end

subgraph group_presentation["Graphics and screens"]
  node_graphics["Graphic elements"]
  node_background["Background and HUD<br/>[Fondo.java]"]
end

subgraph group_state["Gameplay state"]
  node_context["Input context<br/>[Entrada.java]"]
end

node_player(("Player"))

node_player -->|"starts"| node_entry
node_entry -->|"launches"| node_manager
node_manager -->|"creates"| node_context
node_manager -->|"creates"| node_hero
node_manager -->|"creates"| node_background
node_manager -->|"draws sprites"| node_graphics
node_hero -.->|"reads input"| node_context
node_hero -.->|"moves and fires"| node_bullets
node_destroyer -.->|"inherits"| node_enemybase
node_prey -.->|"inherits"| node_enemybase
node_minelayer -.->|"inherits"| node_enemybase
node_panacea -.->|"inherits"| node_enemybase
node_enemybase -->|"fires and collides"| node_bullets
node_prey -->|"checks collisions"| node_context
node_minelayer -->|"checks collisions"| node_context
node_panacea -->|"moves through"| node_context
node_graphics -.->|"accepts game input"| node_context
node_background -->|"reads HUD state"| node_context
node_rebels -->|"moves and fires"| node_context

click node_entry "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/InvasionGalactica.java"
click node_manager "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Juego.java"
click node_context "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Entrada.java"
click node_hero "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Heroe.java"
click node_destroyer "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Destructor.java"
click node_prey "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/AveDePresa.java"
click node_minelayer "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/LanzaMinas.java"
click node_panacea "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/PanaceaOrbital.java"
click node_enemybase "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/NaveEnemiga.java"
click node_rebels "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/NaveRebelde.java"
click node_bullets "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Bala.java"
click node_graphics "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/ElementoGrafico.java"
click node_background "https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Fondo.java"

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_entry,node_manager toneBlue
class node_hero,node_destroyer,node_prey,node_minelayer,node_panacea,node_enemybase,node_rebels,node_bullets toneAmber
class node_graphics,node_background toneMint
class node_context toneRose
class node_player toneIndigo
```

## Components

### Game runtime

- [Game entry](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/InvasionGalactica.java): `InvasionGalactica.java`
- [Game manager](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Juego.java): `Juego.java`

### Ships and combat

- [Hero ship](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Heroe.java): `Heroe.java`
- [Destroyer](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Destructor.java): `Destructor.java`
- [Bird enemy](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/AveDePresa.java): `AveDePresa.java`
- [Mine layer](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/LanzaMinas.java): `LanzaMinas.java`
- [Panacea ship](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/PanaceaOrbital.java): `PanaceaOrbital.java`
- [Enemy base](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/NaveEnemiga.java): `NaveEnemiga.java`
- [Rebel ship](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/NaveRebelde.java): `NaveRebelde.java`
- [Projectiles](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Bala.java): `Bala.java`

### Graphics and screens

- [Graphic elements](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/ElementoGrafico.java): `ElementoGrafico.java`
- [Background and HUD](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Fondo.java): `Fondo.java`

### Gameplay state

- [Input context](https://github.com/speedcuberjuliojorge-source/invasiongalactica/blob/main/Entrada.java): `Entrada.java`

### Other components

- **Player**

## Connections

- Player → Game entry: starts
- Game entry → Game manager: launches (evidence: `InvasionGalactica.java`)
- Game manager → Input context: creates (evidence: `Juego.java`)
- Game manager → Hero ship: creates (evidence: `Juego.java`)
- Game manager → Background and HUD: creates (evidence: `Juego.java`)
- Game manager → Graphic elements: draws sprites (evidence: `Juego.java`)
- Hero ship → Input context: reads input (evidence: `Heroe.java`)
- Hero ship → Projectiles: moves and fires (evidence: `Bala.java`)
- Destroyer → Enemy base: inherits (evidence: `Destructor.java`)
- Bird enemy → Enemy base: inherits (evidence: `AveDePresa.java`)
- Mine layer → Enemy base: inherits (evidence: `LanzaMinas.java`)
- Panacea ship → Enemy base: inherits (evidence: `PanaceaOrbital.java`)
- Enemy base → Projectiles: fires and collides (evidence: `NaveEnemiga.java`)
- Bird enemy → Input context: checks collisions (evidence: `AveDePresa.java`)
- Mine layer → Input context: checks collisions (evidence: `LanzaMinas.java`)
- Panacea ship → Input context: moves through (evidence: `PanaceaOrbital.java`)
- Graphic elements → Input context: accepts game input (evidence: `ElementoGrafico.java`)
- Background and HUD → Input context: reads HUD state (evidence: `Fondo.java`)
- Rebel ship → Input context: moves and fires (evidence: `NaveRebelde.java`)
