# erick-ucsm/spaceplants-lab architecture

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

- Interactive diagram: https://gitdiagram.com/erick-ucsm/spaceplants-lab
- Repository: https://github.com/erick-ucsm/spaceplants-lab

## Overview

SpacePlants Lab is a Godot serious game about designing a space plant-growth module and keeping a crop alive. The documented player journey is to choose a seed, configure the module, maintain environmental conditions through five minigames, and harvest when plant health is above 80%. The README also documents bilingual settings and the specific variable-to-minigame mappings. No source excerpts were provided, so links below reflect documented gameplay rather than verified code-level calls; implementation paths follow the repository tree.

Main entry points: [`SpacePlantsLab/scripts/ui/simulacion.gd`](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/simulacion.gd) (Crop maintenance), [`SpacePlantsLab/scripts/ui/seleccion.gd`](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/seleccion.gd) (Seed choice), [`SpacePlantsLab/scripts/ui/resumen.gd`](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/resumen.gd) (Harvest summary), [`SpacePlantsLab/scripts/ui/tres_en_raya.gd`](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/tres_en_raya.gd) (Light · tic-tac-toe)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Crop gameplay"]
  node_seed["Seed choice<br/>[seleccion.gd]"]
  node_design["Module design<br/>[seleccion.gd]"]
  node_maintenance["Crop maintenance<br/>[simulacion.gd]"]
  node_harvest["Harvest summary<br/>[resumen.gd]"]
end

subgraph group_systems["Game systems"]
  node_crop_model["Crop model<br/>[modelo_cultivo.gd]"]
  node_game_data[("Plant data<br/>[datos.gd]")]
  node_language["Language settings<br/>[idioma.gd]"]
  node_minigame_data[("Minigame content")]
end

subgraph group_activities["Minigames"]
  node_light["Light · tic-tac-toe<br/>[tres_en_raya.gd]"]
  node_water["Water · sliding puzzle<br/>[deslizante.gd]"]
  node_humidity["Humidity · memory<br/>[memoria.gd]"]
  node_temperature["Temperature · puzzle<br/>[intercambio.gd]"]
  node_oxygen["Oxygen · whack alien<br/>[alienigenas.gd]"]
end

node_player(("Player"))

node_player -->|"chooses seed"| node_seed
node_seed -->|"continues to"| node_design
node_design -->|"maintains crop"| node_maintenance
node_maintenance -->|"plays for light"| node_light
node_maintenance -->|"plays for water"| node_water
node_maintenance -->|"plays for humidity"| node_humidity
node_maintenance -->|"plays for temperature"| node_temperature
node_maintenance -->|"plays for oxygen"| node_oxygen
node_maintenance -->|"harvests above 80%"| node_harvest

click node_seed "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/seleccion.gd"
click node_design "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/seleccion.gd"
click node_maintenance "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/simulacion.gd"
click node_harvest "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/resumen.gd"
click node_crop_model "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/modelo_cultivo.gd"
click node_game_data "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/datos.gd"
click node_language "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/idioma.gd"
click node_light "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/tres_en_raya.gd"
click node_water "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/minijuegos/deslizante.gd"
click node_humidity "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/minijuegos/memoria.gd"
click node_temperature "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/minijuegos/intercambio.gd"
click node_oxygen "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/minijuegos/alienigenas.gd"
click node_minigame_data "https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/datos_minijuegos.gd"

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_seed,node_design,node_maintenance,node_harvest toneBlue
class node_crop_model,node_game_data,node_language,node_minigame_data toneAmber
class node_light,node_water,node_humidity,node_temperature,node_oxygen toneMint
class node_player toneIndigo
```

## Components

### Crop gameplay

- [Seed choice](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/seleccion.gd): `SpacePlantsLab/scripts/ui/seleccion.gd`
- [Module design](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/seleccion.gd): `SpacePlantsLab/scripts/ui/seleccion.gd`
- [Crop maintenance](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/simulacion.gd): `SpacePlantsLab/scripts/ui/simulacion.gd`
- [Harvest summary](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/resumen.gd): `SpacePlantsLab/scripts/ui/resumen.gd`

### Game systems

- [Crop model](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/modelo_cultivo.gd): `SpacePlantsLab/scripts/modelo_cultivo.gd`
- [Plant data](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/datos.gd): `SpacePlantsLab/scripts/datos.gd`
- [Language settings](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/idioma.gd): `SpacePlantsLab/scripts/idioma.gd`
- [Minigame content](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/datos_minijuegos.gd): `SpacePlantsLab/scripts/datos_minijuegos.gd`

### Minigames

- [Light · tic-tac-toe](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/tres_en_raya.gd): `SpacePlantsLab/scripts/ui/tres_en_raya.gd`
- [Water · sliding puzzle](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/minijuegos/deslizante.gd): `SpacePlantsLab/scripts/ui/minijuegos/deslizante.gd`
- [Humidity · memory](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/minijuegos/memoria.gd): `SpacePlantsLab/scripts/ui/minijuegos/memoria.gd`
- [Temperature · puzzle](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/minijuegos/intercambio.gd): `SpacePlantsLab/scripts/ui/minijuegos/intercambio.gd`
- [Oxygen · whack alien](https://github.com/erick-ucsm/spaceplants-lab/blob/main/SpacePlantsLab/scripts/ui/minijuegos/alienigenas.gd): `SpacePlantsLab/scripts/ui/minijuegos/alienigenas.gd`

### Other components

- **Player**

## Connections

- Player → Seed choice: chooses seed (evidence: `README.md`)
- Seed choice → Module design: continues to (evidence: `README.md`)
- Module design → Crop maintenance: maintains crop (evidence: `README.md`)
- Crop maintenance → Light · tic-tac-toe: plays for light (evidence: `README.md`)
- Crop maintenance → Water · sliding puzzle: plays for water (evidence: `README.md`)
- Crop maintenance → Humidity · memory: plays for humidity (evidence: `README.md`)
- Crop maintenance → Temperature · puzzle: plays for temperature (evidence: `README.md`)
- Crop maintenance → Oxygen · whack alien: plays for oxygen (evidence: `README.md`)
- Crop maintenance → Harvest summary: harvests above 80% (evidence: `README.md`)
