# giunosheetdev/project-horae architecture

> Architecture diagram of the GitHub repository giunosheetdev/project-horae, 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/giunosheetdev/project-horae
- Repository: https://github.com/giunosheetdev/project-horae

## Overview

##### Main Components

a) Core Game Engine Layer:
- It to the following key components:
- InputManager (inputmanager.py)
- UI System (ui.py)
- Animal System (animal.py)
- Configuration Management (config.py)

b) World Generation System:
- Components:
- Perlin Noise Generator (perlinNoise.py)
- World Configuration (worldGeneration/config.py)

c) Asset Management System:
- Environment Assets (Isometric Environment)
- Water Systems (Isometric Water)
- Creature Systems (critters)
- Tileset Management (isometric tileset)

d) Animal Behavior System:
- Animal.py component with connections to:
- Different animal types (wolf, boar, stag, badger)
- State management for each animal (idle, run, walk, bite, death, howl)
- Directional movement system (north-east, north-west, south-east, south-west)

##### Relationship Flows

- Main Game Loop → Input Manager
- Main Game Loop → World Generation
- Main Game Loop → Animal System
- Main Game Loop → UI System
- World Generation → Asset Management
- Animal System → Asset Management
- UI System → Asset Management

##### Technical Details

- Pygame as the underlying engine
- Perlin noise for procedural generation
- Asset loading and management systems
- State machine for animal behaviors
- Input handling system
- Configuration management

##### Additional Notes

- Notes about the isometric nature of the game
- Ecosystem simulation aspects
- Relationship between different animal behaviors and states

Remember to use standard UML or similar notation where appropriate, but feel free to customize the representation to better show the unique aspects of this ecosystem simulator.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Core Game Engine Layer
    subgraph CoreEngine["Core Game Engine"]
        Main["Main Game Orchestrator"]:::core
        InputMgr["Input Manager"]:::core
        UI["UI System"]:::ui
        Config["Configuration"]:::core
    end

    %% World Generation System
    subgraph WorldGen["World Generation System"]
        WorldGenMgr["World Generator"]:::worldgen
        PerlinNoise["Perlin Noise Generator"]:::worldgen
        WorldConfig["World Configuration"]:::worldgen
    end

    %% Asset Management System
    subgraph Assets["Asset Management"]
        EnvAssets["Environment Assets"]:::asset
        WaterAssets["Water Systems"]:::asset
        TilesetMgr["Tileset Management"]:::asset
    end

    %% Animal System
    subgraph AnimalSystem["Animal Behavior System"]
        AnimalMgr["Animal Manager"]:::animal
        
        subgraph Animals["Animal Types"]
            Wolf["Wolf"]:::animal
            Boar["Boar"]:::animal
            Stag["Stag"]:::animal
            Badger["Badger"]:::animal
        end

        subgraph States["Animal States"]
            Idle["Idle"]:::state
            Run["Run"]:::state
            Walk["Walk"]:::state
            Special["Special Actions"]:::state
        end

        subgraph Directions["Movement Directions"]
            NE["North-East"]:::direction
            NW["North-West"]:::direction
            SE["South-East"]:::direction
            SW["South-West"]:::direction
        end
    end

    %% Relationships
    Main --> InputMgr
    Main --> UI
    Main --> AnimalMgr
    Main --> WorldGenMgr
    WorldGenMgr --> PerlinNoise
    WorldGenMgr --> WorldConfig
    AnimalMgr --> Animals
    Animals --> States
    States --> Directions
    WorldGenMgr --> Assets
    AnimalMgr --> Assets
    UI --> Assets

    %% Click Events
    click Main "https://github.com/GiunoSheetDev/project-horae/blob/main/main.py"
    click InputMgr "https://github.com/GiunoSheetDev/project-horae/blob/main/inputmanager.py"
    click UI "https://github.com/GiunoSheetDev/project-horae/blob/main/ui.py"
    click Config "https://github.com/GiunoSheetDev/project-horae/blob/main/config.py"
    click WorldGenMgr "https://github.com/GiunoSheetDev/project-horae/tree/main/worldGeneration/"
    click PerlinNoise "https://github.com/GiunoSheetDev/project-horae/blob/main/worldGeneration/perlinNoise.py"
    click WorldConfig "https://github.com/GiunoSheetDev/project-horae/blob/main/worldGeneration/config.py"
    click EnvAssets "https://github.com/GiunoSheetDev/project-horae/tree/main/assets/Isometric Environment/"
    click WaterAssets "https://github.com/GiunoSheetDev/project-horae/tree/main/assets/Isometric Water/"
    click TilesetMgr "https://github.com/GiunoSheetDev/project-horae/tree/main/assets/isometric tileset/"
    click Wolf "https://github.com/GiunoSheetDev/project-horae/tree/main/assets/critters/wolf/"
    click Boar "https://github.com/GiunoSheetDev/project-horae/tree/main/assets/critters/boar/"
    click Stag "https://github.com/GiunoSheetDev/project-horae/tree/main/assets/critters/stag/"
    click Badger "https://github.com/GiunoSheetDev/project-horae/tree/main/assets/critters/badger/"
    click AnimalMgr "https://github.com/GiunoSheetDev/project-horae/blob/main/animal.py"

    %% Styles
    classDef core fill:#2374ab
    classDef ui fill:#7209b7
    classDef worldgen fill:#38b000
    classDef asset fill:#ffd60a
    classDef animal fill:#d00000
    classDef state fill:#ff7b00
    classDef direction fill:#ff7b00

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["UI System"]:::ui
        L3["World Generation"]:::worldgen
        L4["Asset Management"]:::asset
        L5["Animal System"]:::animal
        L6["States & Directions"]:::state
    end
```
