# tomasfishoil/game-jam-72-firefly architecture

> Architecture diagram of the GitHub repository tomasfishoil/game-jam-72-firefly, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tomasfishoil/game-jam-72-firefly
- Repository: https://github.com/tomasfishoil/game-jam-72-firefly

## Overview

##### Main Components

a. Scene Management Layer
- Main Menu Scene
- Game Scene (Main)
- Control Menu Scene
- Credits Scene
- Game Over Scene
- Pause Menu Scene

b. Core Game Elements
- Player System (Firefly)
- UI System
- Projectile System
- Background System

c. Audio System
- Music Manager
- Sound Effects Manager

##### Component Relationships

a. Scene Flow:
- Main Menu → Game Scene
- Game Scene ↔ Pause Menu
- Game Scene → Game Over
- Main Menu ↔ Control Menu
- Main Menu ↔ Credits

b. Game Logic Flow:
- How the firefly_player.gd script interacts with light_projectile.gd
- Demonstrate UI updates through game_ui.gd
- Glow_bar.gd interaction with the player system

##### Specific Implementation Details

a. Player System (Firefly):
- Scene: firefly_player.tscn
- Script: firefly_player.gd
- Controls
- State Management

b. UI System:
- Game UI (game_ui.tscn/gd)
- Glow Bar (glow_bar.tscn/gd)
- Pause Menu (pause_menu.tscn/gd)

c. Audio Management:
- Background Music (gamemusic.mp3)
- Sound Effects
- FireflyDash.mp3
- OrbAbsorb.mp3

##### Technical Details to Highlight

- Scene tree structure
- Script attachments to nodes
- Signal connections
- Resource loading paths

Remember to indicate that this is a Godot project, which follows Godot's scene-based architecture and node system. This context is crucial for understanding how the components interact within the Godot engine's framework.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Style Definitions
    classDef scene fill:#3498db,stroke:#2980b9,color:white
    classDef script fill:#2ecc71,stroke:#27ae60,color:white
    classDef audio fill:#9b59b6,stroke:#8e44ad,color:white
    classDef ui fill:#e67e22,stroke:#d35400,color:white
    
    subgraph Scene_Management
        MainMenu[Main Menu]:::scene
        GameScene[Game Scene]:::scene
        ControlMenu[Control Menu]:::scene
        Credits[Credits Scene]:::scene
        GameOver[Game Over]:::scene
        PauseMenu[Pause Menu]:::scene
    end

    subgraph Core_Game_Elements
        Player[Firefly Player]:::scene
        PlayerScript[Player Script]:::script
        UI[Game UI]:::ui
        UIScript[UI Script]:::script
        GlowBar[Glow Bar]:::ui
        GlowScript[Glow Bar Script]:::script
        Projectile[Light Projectile]:::scene
        ProjectileScript[Projectile Script]:::script
        Background[Background]:::scene
    end

    subgraph Audio_System
        BGMusic[Background Music]:::audio
        DashSFX[Dash Effect]:::audio
        OrbSFX[Orb Effect]:::audio
    end

    %% Relationships
    MainMenu --> GameScene
    MainMenu <--> ControlMenu
    MainMenu <--> Credits
    GameScene <--> PauseMenu
    GameScene --> GameOver
    
    Player --> PlayerScript
    Player --> Projectile
    UI --> UIScript
    GlowBar --> GlowScript
    Projectile --> ProjectileScript
    
    Player -.-> DashSFX
    Projectile -.-> OrbSFX
    GameScene -.-> BGMusic

    %% Click Events
    click MainMenu "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/main_menu.tscn"
    click GameScene "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/main.tscn"
    click ControlMenu "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/control_menu.tscn"
    click Credits "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/credits.tscn"
    click GameOver "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/game_over.tscn"
    click PauseMenu "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/pause_menu.tscn"
    click Player "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/firefly_player.tscn"
    click PlayerScript "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scripts/firefly_player.gd"
    click UI "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/game_ui.tscn"
    click UIScript "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scripts/game_ui.gd"
    click GlowBar "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/glow_bar.tscn"
    click GlowScript "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scripts/glow_bar.gd"
    click Projectile "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/light_projectile.tscn"
    click ProjectileScript "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scripts/light_projectile.gd"
    click Background "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/scenes/background.tscn"
    click BGMusic "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/audio/gamemusic.mp3"
    click DashSFX "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/audio/FireflyDash.mp3"
    click OrbSFX "https://github.com/TomasFishOil/Game-Jam-72-Firefly/blob/main/audio/OrbAbsorb.mp3"

    %% Legend
    subgraph Legend
        Scene[Scene]:::scene
        ScriptFile[Script]:::script
        AudioFile[Audio]:::audio
        UIElement[UI Element]:::ui
    end
```
