# ameerarsala/ethereal-tempest architecture

> Architecture diagram of the GitHub repository ameerarsala/ethereal-tempest, 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/ameerarsala/ethereal-tempest
- Repository: https://github.com/ameerarsala/ethereal-tempest

## Overview

##### Main Components

a. Core Game Engine Layer:
- JMonkeyEngine integration (indicated by .j3md files and MatDefs)
- Core game states and FSM (src/etherealtempest/fsm)
- Main game context (GameContext.java)

b. Battle System:
- Combat engine (src/battle)
- Animation system (src/battle/animation)
- Battle environment (src/battle/environment)
- Participant management (src/battle/participant)

c. System:
- Layout management (src/maps/layout)
- Tile system (src/maps/layout/tile)
- Unit movement (src/maps/layout/tile/move)
- Flow control (src/maps/flow)

d. Character/Entity System:
- Character management (src/etherealtempest/characters)
- Unit system (src/fundamental/unit)
- Job class system (src/fundamental/jobclass)
- Skills and abilities (src/fundamental/skill, src/fundamental/ability)

e. Asset Management:
- Effects system (assets/Effects)
- Sprite management (assets/Sprites)
- Material system (assets/MatDefs)
- Shader system (assets/Shaders)

**[User Interface Layer]**
- GUI Components (src/etherealtempest/gui)
- Menus (src/general/ui/menu)
- HUD Elements

**[Game Logic Layer]**
- Game States
- Battle System
- Map System
- Character System

**[Core Systems Layer]**
- Asset Management
- Physics/Math (src/general/math)
- Input Handling (src/general/tools/input)
- Animation System

**[Engine Layer]**
- JMonkeyEngine Integration
- Rendering Pipeline
- Shader Management

##### Important Relationships

- How the map system interfaces with both the battle system and movement mechanics
- Relationship between assets and their corresponding managers
- Demonstrate how the FSM controls game state transitions

##### Technical Details

- Interfaces and abstract classes
- Major data structures and their relationships
- Where configuration files are loaded and processed
- Important managers and controllers

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef engine fill:#d4d4d4,stroke:#333
    classDef battle fill:#ff9999,stroke:#333
    classDef map fill:#99ff99,stroke:#333
    classDef character fill:#9999ff,stroke:#333
    classDef asset fill:#ffff99,stroke:#333
    classDef ui fill:#ff99ff,stroke:#333

    subgraph UI["User Interface Layer"]
        CoreUI["Core UI"]:::ui
        BattleGUI["Battle GUI"]:::ui
        MenuSystem["Menu System"]:::ui
        MapUI["Map UI"]:::ui
    end

    subgraph GameLogic["Game Logic Layer"]
        subgraph BattleSystem["Battle System"]
            CombatEngine["Combat Engine"]:::battle
            BattleAnim["Battle Animation"]:::battle
            BattleEnv["Battle Environment"]:::battle
            BattleParticipants["Battle Participants"]:::battle
        end

        subgraph MapSystem["Map System"]
            MapLayout["Map Layout"]:::map
            TileSystem["Tile System"]:::map
            MovementSystem["Movement System"]:::map
            MapFlow["Map Flow Control"]:::map
        end

        subgraph CharSystem["Character System"]
            CharManagement["Character Management"]:::character
            UnitSystem["Unit System"]:::character
            JobSystem["Job Class System"]:::character
            SkillSystem["Skills System"]:::character
            AbilitySystem["Abilities System"]:::character
        end
    end

    subgraph CoreSystem["Core Systems Layer"]
        GameContext["Game Context"]:::engine
        FSMSystem["FSM System"]:::engine
    end

    subgraph Assets["Asset Management Layer"]
        EffectsSystem["Effects System"]:::asset
        SpriteSystem["Sprite System"]:::asset
        MaterialSystem["Material System"]:::asset
        ShaderSystem["Shader System"]:::asset
    end

    %% Relationships
    GameContext --> BattleSystem
    GameContext --> MapSystem
    GameContext --> CharSystem
    FSMSystem --> GameContext

    BattleSystem --> MapSystem
    BattleSystem --> CharSystem
    MapSystem --> MovementSystem
    CharSystem --> BattleParticipants

    CoreUI --> MenuSystem
    BattleGUI --> BattleSystem
    MapUI --> MapSystem

    MaterialSystem --> ShaderSystem
    SpriteSystem --> CharSystem
    EffectsSystem --> BattleAnim

    %% Click Events
    click GameContext "https://github.com/AmeerArsala/Ethereal-Tempest/blob/venture/src/etherealtempest/GameContext.java"
    click FSMSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/etherealtempest/fsm/"
    click MaterialSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/assets/MatDefs/"
    click CombatEngine "https://github.com/AmeerArsala/Ethereal-Tempest/blob/venture/src/battle/Combat.java"
    click BattleAnim "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/battle/animation/"
    click BattleEnv "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/battle/environment/"
    click BattleParticipants "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/battle/participant/"
    click MapLayout "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/maps/layout/"
    click TileSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/maps/layout/tile/"
    click MovementSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/maps/layout/tile/move/"
    click MapFlow "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/maps/flow/"
    click CharManagement "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/etherealtempest/characters/"
    click UnitSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/fundamental/unit/"
    click JobSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/fundamental/jobclass/"
    click SkillSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/fundamental/skill/"
    click AbilitySystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/fundamental/ability/"
    click EffectsSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/assets/Effects/"
    click SpriteSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/assets/Sprites/"
    click ShaderSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/assets/Shaders/"
    click CoreUI "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/general/ui/"
    click BattleGUI "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/battle/gui/"
    click MenuSystem "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/general/ui/menu/"
    click MapUI "https://github.com/AmeerArsala/Ethereal-Tempest/tree/venture/src/maps/ui/"
```
