# tomasleggire/politropia architecture

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

- Interactive diagram: https://gitdiagram.com/tomasleggire/politropia
- Repository: https://github.com/tomasleggire/politropia

## Overview

This is a Godot 2D action-adventure game, with Greece and library zones, combat encounters, collectibles, and player-facing menus and HUDs. The intended player workflow is to start a game, explore connected level zones, fight enemies and bosses, collect items, and reach completion or game-over screens. The tree supports these subsystem boundaries, but the README is empty and the sampled source only covers art-processing tools; runtime routing and calls between game systems are therefore not verified, so the links below are dashed and uncited.

Main entry points: [`scenes/levels/greece`](https://github.com/tomasleggire/politropia/tree/main/scenes/levels/greece) (Greece zones), [`scenes/levels/library`](https://github.com/tomasleggire/politropia/tree/main/scenes/levels/library) (Library zones), [`scenes/world`](https://github.com/tomasleggire/politropia/tree/main/scenes/world) (World interactions), [`scenes/player/player.tscn`](https://github.com/tomasleggire/politropia/blob/main/scenes/player/player.tscn) (Player character)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_onboarding["Start and UI"]
  node_menu["Main menu<br/>[main_menu.tscn]"]
  node_intro["New game intro"]
  node_transitions["Level transitions"]
  node_hud["HUD and menus<br/>[hud.tscn]"]
  node_end_screens["End screens"]
end

subgraph group_world["World and progression"]
  node_greece["Greece zones"]
  node_library["Library zones"]
  node_garden["Garden level<br/>[garden.tscn]"]
  node_world_objects["World interactions"]
end

subgraph group_combat["Player and combat"]
  node_player["Player character<br/>[player.tscn]"]
  node_enemies["Enemies and bosses"]
end

subgraph group_support["Audio and collectibles"]
  node_collectibles["Collectible catalog"]
  node_ambience["Room ambience<br/>[room_ambience.gd]"]
  node_music["Music manager<br/>[music_manager.gd]"]
end

node_actor(("Player"))

node_actor -.->|"starts game"| node_menu
node_menu -.->|"begins intro"| node_intro
node_intro -.->|"enters world"| node_garden
node_greece -.->|"progresses to"| node_library
node_greece -.->|"offers interactions"| node_world_objects
node_library -.->|"offers interactions"| node_world_objects
node_player -.->|"fights"| node_enemies
node_world_objects -.->|"supports pickups"| node_collectibles
node_greece -.->|"uses transitions"| node_transitions
node_library -.->|"uses transitions"| node_transitions
node_player -.->|"shows status"| node_hud
node_enemies -.->|"may end run"| node_end_screens
node_greece -.->|"sets ambience"| node_ambience
node_library -.->|"sets ambience"| node_ambience
node_greece -.->|"uses music"| node_music
node_library -.->|"uses music"| node_music

click node_player "https://github.com/tomasleggire/politropia/blob/main/scenes/player/player.tscn"
click node_enemies "https://github.com/tomasleggire/politropia/tree/main/scenes/enemies"
click node_greece "https://github.com/tomasleggire/politropia/tree/main/scenes/levels/greece"
click node_library "https://github.com/tomasleggire/politropia/tree/main/scenes/levels/library"
click node_garden "https://github.com/tomasleggire/politropia/blob/main/scenes/levels/garden.tscn"
click node_world_objects "https://github.com/tomasleggire/politropia/tree/main/scenes/world"
click node_menu "https://github.com/tomasleggire/politropia/blob/main/scenes/ui/main_menu.tscn"
click node_intro "https://github.com/tomasleggire/politropia/blob/main/scenes/ui/new_game_intro.tscn"
click node_transitions "https://github.com/tomasleggire/politropia/blob/main/scenes/ui/level_transition.tscn"
click node_hud "https://github.com/tomasleggire/politropia/blob/main/scenes/ui/hud.tscn"
click node_end_screens "https://github.com/tomasleggire/politropia/blob/main/scenes/ui/game_completion.tscn"
click node_collectibles "https://github.com/tomasleggire/politropia/blob/main/scripts/collectibles/collectible_catalog.gd"
click node_ambience "https://github.com/tomasleggire/politropia/blob/main/scripts/audio/room_ambience.gd"
click node_music "https://github.com/tomasleggire/politropia/blob/main/scripts/audio/music_manager.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_menu,node_intro,node_transitions,node_hud,node_end_screens toneBlue
class node_greece,node_library,node_garden,node_world_objects toneAmber
class node_player,node_enemies toneMint
class node_collectibles,node_ambience,node_music toneRose
class node_actor toneIndigo
```

## Components

### Start and UI

- [Main menu](https://github.com/tomasleggire/politropia/blob/main/scenes/ui/main_menu.tscn): `scenes/ui/main_menu.tscn`
- [New game intro](https://github.com/tomasleggire/politropia/blob/main/scenes/ui/new_game_intro.tscn): `scenes/ui/new_game_intro.tscn`
- [Level transitions](https://github.com/tomasleggire/politropia/blob/main/scenes/ui/level_transition.tscn): `scenes/ui/level_transition.tscn`
- [HUD and menus](https://github.com/tomasleggire/politropia/blob/main/scenes/ui/hud.tscn): `scenes/ui/hud.tscn`
- [End screens](https://github.com/tomasleggire/politropia/blob/main/scenes/ui/game_completion.tscn): `scenes/ui/game_completion.tscn`

### World and progression

- [Greece zones](https://github.com/tomasleggire/politropia/tree/main/scenes/levels/greece): `scenes/levels/greece`
- [Library zones](https://github.com/tomasleggire/politropia/tree/main/scenes/levels/library): `scenes/levels/library`
- [Garden level](https://github.com/tomasleggire/politropia/blob/main/scenes/levels/garden.tscn): `scenes/levels/garden.tscn`
- [World interactions](https://github.com/tomasleggire/politropia/tree/main/scenes/world): `scenes/world`

### Player and combat

- [Player character](https://github.com/tomasleggire/politropia/blob/main/scenes/player/player.tscn): `scenes/player/player.tscn`
- [Enemies and bosses](https://github.com/tomasleggire/politropia/tree/main/scenes/enemies): `scenes/enemies`

### Audio and collectibles

- [Collectible catalog](https://github.com/tomasleggire/politropia/blob/main/scripts/collectibles/collectible_catalog.gd): `scripts/collectibles/collectible_catalog.gd`
- [Room ambience](https://github.com/tomasleggire/politropia/blob/main/scripts/audio/room_ambience.gd): `scripts/audio/room_ambience.gd`
- [Music manager](https://github.com/tomasleggire/politropia/blob/main/scripts/audio/music_manager.gd): `scripts/audio/music_manager.gd`

### Other components

- **Player**

## Connections

- Player → Main menu: starts game
- Main menu → New game intro: begins intro
- New game intro → Garden level: enters world
- Greece zones → Library zones: progresses to
- Greece zones → World interactions: offers interactions
- Library zones → World interactions: offers interactions
- Player character → Enemies and bosses: fights
- World interactions → Collectible catalog: supports pickups
- Greece zones → Level transitions: uses transitions
- Library zones → Level transitions: uses transitions
- Player character → HUD and menus: shows status
- Enemies and bosses → End screens: may end run
- Greece zones → Room ambience: sets ambience
- Library zones → Room ambience: sets ambience
- Greece zones → Music manager: uses music
- Library zones → Music manager: uses music
