# freed1234/gamecreateproject architecture

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

- Interactive diagram: https://gitdiagram.com/freed1234/gamecreateproject
- Repository: https://github.com/freed1234/gamecreateproject

## Overview

This is a Unity 2D action game. Its documented loop combines chunk-based exploration and obstacle-aware enemy pursuit with automatic attacks; defeating enemies grants experience, which leads to level-ups and a job-selection flow. The README also describes distinct unpromoted and archer combat, projectile behavior, and audio. No source excerpts were provided, so relationships below are limited to capabilities and links explicitly stated in the README; implementation details beyond filenames remain unverified.

Main entry points: [`Assets/Scripts/MovingProjectile.cs`](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/MovingProjectile.cs) (Moving Projectile), [`Assets/Scripts/EnemyMovement.cs`](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemyMovement.cs) (Enemy Movement), [`Assets/Scripts/JobAttackController.cs`](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/JobAttackController.cs) (Job Attack Controller), [`Assets/Scripts/MapChunkManager.cs`](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/MapChunkManager.cs) (Chunk Loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["World and Navigation"]
  node_chunk_world["Chunk Loading<br/>[MapChunkManager.cs]"]
  node_obstacle_layout["Obstacle Layout"]
  node_enemy_spawn["Enemy Spawning<br/>[EnemySpawner.cs]"]
  node_enemy_move["Enemy Movement<br/>[EnemyMovement.cs]"]
  node_flow_field["Enemy Flow Field<br/>[EnemyFlowField.cs]"]
  node_flow_grid["Flow Grid<br/>[FlowGrid.cs]"]
  node_player_move["Player Movement<br/>[PlayerMovement.cs]"]
end

subgraph group_combat["Combat"]
  node_player_health["Player Health<br/>[PlayerHealth.cs]"]
  node_enemy_health["Enemy Health<br/>[EnemyHealth.cs]"]
  node_auto_attack["Attack Selection<br/>[AutoAttack.cs]"]
  node_gun_attack["Gun Attack<br/>[AutoGunAttack.cs]"]
  node_projectile_attack["Projectile Attack"]
  node_job_attacks["Job Attack Controller"]
  node_piercing_skill["Piercing Skill"]
  node_projectiles["Moving Projectile"]
end

subgraph group_progression["Progression"]
  node_experience["Experience Progress"]
  node_player_progression["Player Progression"]
  node_job_ui["Level and Job UI<br/>[LevelAndJobUI.cs]"]
end

subgraph group_presentation["Presentation"]
  node_camera["Camera Follow<br/>[CameraFollow.cs]"]
  node_audio["Game Audio<br/>[GameAudio.cs]"]
end

node_player(("Player"))

node_player -->|"moves"| node_player_move
node_player_move -->|"triggers chunk loading"| node_chunk_world
node_chunk_world -->|"places obstacles"| node_obstacle_layout
node_enemy_move -->|"uses shared paths"| node_flow_field
node_flow_field -->|"uses grid"| node_flow_grid
node_enemy_move -->|"pursues"| node_player
node_player -->|"initiates automatic attacks"| node_auto_attack
node_auto_attack -->|"selects attack mode"| node_job_attacks
node_job_attacks -->|"uses archer basic attack"| node_gun_attack
node_job_attacks -->|"uses projectile attack"| node_projectile_attack
node_player -->|"activates with Z"| node_piercing_skill
node_projectile_attack -->|"fires projectile"| node_projectiles
node_piercing_skill -->|"fires piercing projectile"| node_projectiles
node_projectiles -->|"blocked by obstacles"| node_obstacle_layout
node_enemy_health -->|"grants kill experience"| node_experience
node_experience -->|"advances levels"| node_player_progression
node_player_progression -->|"opens job choice at level two"| node_job_ui
node_job_ui -->|"pauses during selection"| node_player
node_camera -->|"defines removal boundary"| node_projectiles
node_player -->|"takes damage"| node_player_health
node_enemy_move -->|"attacks player"| node_player_health
node_player -->|"damages enemies"| node_enemy_health

click node_chunk_world "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/MapChunkManager.cs"
click node_obstacle_layout "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/ChunkObstacleLayout.cs"
click node_enemy_spawn "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemySpawner.cs"
click node_enemy_move "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemyMovement.cs"
click node_flow_field "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemyFlowField.cs"
click node_flow_grid "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/FlowGrid.cs"
click node_player_move "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/PlayerMovement.cs"
click node_player_health "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/PlayerHealth.cs"
click node_enemy_health "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemyHealth.cs"
click node_auto_attack "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/AutoAttack.cs"
click node_gun_attack "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/AutoGunAttack.cs"
click node_projectile_attack "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/AutoProjectileAttack.cs"
click node_job_attacks "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/JobAttackController.cs"
click node_piercing_skill "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/PiercingProjectileSkill.cs"
click node_projectiles "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/MovingProjectile.cs"
click node_experience "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/ExperienceProgress.cs"
click node_player_progression "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/PlayerProgression.cs"
click node_job_ui "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/LevelAndJobUI.cs"
click node_camera "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/CameraFollow.cs"
click node_audio "https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/GameAudio.cs"

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_chunk_world,node_obstacle_layout,node_enemy_spawn,node_enemy_move,node_flow_field,node_flow_grid,node_player_move toneBlue
class node_player_health,node_enemy_health,node_auto_attack,node_gun_attack,node_projectile_attack,node_job_attacks,node_piercing_skill,node_projectiles toneAmber
class node_experience,node_player_progression,node_job_ui toneMint
class node_camera,node_audio toneRose
class node_player toneIndigo
```

## Components

### World and Navigation

- [Chunk Loading](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/MapChunkManager.cs): `Assets/Scripts/MapChunkManager.cs`
- [Obstacle Layout](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/ChunkObstacleLayout.cs): `Assets/Scripts/ChunkObstacleLayout.cs`
- [Enemy Spawning](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemySpawner.cs): `Assets/Scripts/EnemySpawner.cs`
- [Enemy Movement](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemyMovement.cs): `Assets/Scripts/EnemyMovement.cs`
- [Enemy Flow Field](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemyFlowField.cs): `Assets/Scripts/EnemyFlowField.cs`
- [Flow Grid](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/FlowGrid.cs): `Assets/Scripts/FlowGrid.cs`
- [Player Movement](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/PlayerMovement.cs): `Assets/Scripts/PlayerMovement.cs`

### Combat

- [Player Health](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/PlayerHealth.cs): `Assets/Scripts/PlayerHealth.cs`
- [Enemy Health](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/EnemyHealth.cs): `Assets/Scripts/EnemyHealth.cs`
- [Attack Selection](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/AutoAttack.cs): `Assets/Scripts/AutoAttack.cs`
- [Gun Attack](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/AutoGunAttack.cs): `Assets/Scripts/AutoGunAttack.cs`
- [Projectile Attack](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/AutoProjectileAttack.cs): `Assets/Scripts/AutoProjectileAttack.cs`
- [Job Attack Controller](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/JobAttackController.cs): `Assets/Scripts/JobAttackController.cs`
- [Piercing Skill](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/PiercingProjectileSkill.cs): `Assets/Scripts/PiercingProjectileSkill.cs`
- [Moving Projectile](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/MovingProjectile.cs): `Assets/Scripts/MovingProjectile.cs`

### Progression

- [Experience Progress](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/ExperienceProgress.cs): `Assets/Scripts/ExperienceProgress.cs`
- [Player Progression](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/PlayerProgression.cs): `Assets/Scripts/PlayerProgression.cs`
- [Level and Job UI](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/LevelAndJobUI.cs): `Assets/Scripts/LevelAndJobUI.cs`

### Presentation

- [Camera Follow](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/CameraFollow.cs): `Assets/Scripts/CameraFollow.cs`
- [Game Audio](https://github.com/freed1234/gamecreateproject/blob/main/Assets/Scripts/GameAudio.cs): `Assets/Scripts/GameAudio.cs`

### Other components

- **Player**

## Connections

- Player → Player Movement: moves (evidence: `README.md`)
- Player Movement → Chunk Loading: triggers chunk loading (evidence: `README.md`)
- Chunk Loading → Obstacle Layout: places obstacles (evidence: `README.md`)
- Enemy Movement → Enemy Flow Field: uses shared paths (evidence: `README.md`)
- Enemy Flow Field → Flow Grid: uses grid (evidence: `README.md`)
- Enemy Movement → Player: pursues (evidence: `README.md`)
- Player → Attack Selection: initiates automatic attacks (evidence: `README.md`)
- Attack Selection → Job Attack Controller: selects attack mode (evidence: `README.md`)
- Job Attack Controller → Gun Attack: uses archer basic attack (evidence: `README.md`)
- Job Attack Controller → Projectile Attack: uses projectile attack (evidence: `README.md`)
- Player → Piercing Skill: activates with Z (evidence: `README.md`)
- Projectile Attack → Moving Projectile: fires projectile (evidence: `README.md`)
- Piercing Skill → Moving Projectile: fires piercing projectile (evidence: `README.md`)
- Moving Projectile → Obstacle Layout: blocked by obstacles (evidence: `README.md`)
- Enemy Health → Experience Progress: grants kill experience (evidence: `README.md`)
- Experience Progress → Player Progression: advances levels (evidence: `README.md`)
- Player Progression → Level and Job UI: opens job choice at level two (evidence: `README.md`)
- Level and Job UI → Player: pauses during selection (evidence: `README.md`)
- Camera Follow → Moving Projectile: defines removal boundary (evidence: `README.md`)
- Player → Player Health: takes damage (evidence: `README.md`)
- Enemy Movement → Player Health: attacks player (evidence: `README.md`)
- Player → Enemy Health: damages enemies (evidence: `README.md`)
