# omarmamdouhibrahemsayed-del/omar-icy-tower- architecture

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

- Interactive diagram: https://gitdiagram.com/omarmamdouhibrahemsayed-del/omar-icy-tower-
- Repository: https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-

## Overview

This is a Pygame arcade tower-climbing game with a menu-to-level-to-results workflow: players select a level, climb themed platforms while collecting coins, and earn scores and unlock progress that persist between sessions. Character selection and audio settings provide supporting branches. The excerpts show the main game coordinating these systems; unsampled portions limit detail on internal gameplay sequencing, so the graph avoids asserting those calls.

Main entry points: [`main.py`](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/main.py) (Game Loop), [`shop_ui.py`](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/shop_ui.py) (Character Shop), [`settings.py`](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/settings.py) (Game Constants), [`entities.py`](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/entities.py) (Player and Entities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game Runtime"]
  node_game_loop["Game Loop<br/>[main.py]"]
end

subgraph group_world["Tower Gameplay"]
  node_level_defs["Level Definitions<br/>[levels.py]"]
  node_backgrounds["Theme Renderer<br/>[levels.py]"]
  node_entities["Player and Entities<br/>[entities.py]"]
  node_characters["Character Catalog<br/>[characters.py]"]
end

subgraph group_progress["Progression and UI"]
  node_hud["Gameplay HUD<br/>[hud.py]"]
  node_shop["Character Shop<br/>[shop_ui.py]"]
end

subgraph group_support["Shared Services"]
  node_save_manager["Save Manager<br/>[settings.py]"]
  node_save_file[("Save Data<br/>[save_data.json]")]
  node_audio["Sound Engine<br/>[sound_engine.py]"]
  node_game_settings["Game Constants<br/>[settings.py]"]
  node_font_library["Font Library<br/>[settings.py]"]
end

node_player(("Player"))

node_player -->|"controls"| node_game_loop
node_game_loop -->|"selects levels"| node_level_defs
node_game_loop -->|"initializes renderer"| node_backgrounds
node_game_loop -->|"uses gameplay entities"| node_entities
node_game_loop -->|"loads character"| node_characters
node_game_loop -->|"initializes HUD"| node_hud
node_game_loop -->|"initializes shop"| node_shop
node_game_loop -->|"loads and records"| node_save_manager
node_game_loop -->|"plays and configures"| node_audio
node_game_loop -->|"initializes fonts"| node_font_library
node_game_loop -->|"uses constants"| node_game_settings
node_save_manager -->|"reads and writes"| node_save_file
node_entities -->|"renders sprites"| node_characters
node_entities -->|"uses physics constants"| node_game_settings
node_shop -->|"browses and renders"| node_characters
node_shop -->|"updates selection"| node_save_manager
node_shop -->|"plays UI sounds"| node_audio
node_shop -->|"uses display constants"| node_game_settings
node_hud -->|"uses display constants"| node_game_settings
node_level_defs -->|"uses layout constants"| node_game_settings

click node_game_loop "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/main.py"
click node_level_defs "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/levels.py"
click node_backgrounds "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/levels.py"
click node_entities "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/entities.py"
click node_characters "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/characters.py"
click node_hud "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/hud.py"
click node_shop "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/shop_ui.py"
click node_save_manager "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/settings.py"
click node_save_file "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/save_data.json"
click node_audio "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/sound_engine.py"
click node_game_settings "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/settings.py"
click node_font_library "https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/settings.py"

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_game_loop toneBlue
class node_level_defs,node_backgrounds,node_entities,node_characters toneAmber
class node_hud,node_shop toneMint
class node_save_manager,node_save_file,node_audio,node_game_settings,node_font_library toneRose
class node_player toneIndigo
```

## Components

### Game Runtime

- [Game Loop](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/main.py): `main.py`

### Tower Gameplay

- [Level Definitions](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/levels.py): `levels.py`
- [Theme Renderer](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/levels.py): `levels.py`
- [Player and Entities](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/entities.py): `entities.py`
- [Character Catalog](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/characters.py): `characters.py`

### Progression and UI

- [Gameplay HUD](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/hud.py): `hud.py`
- [Character Shop](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/shop_ui.py): `shop_ui.py`

### Shared Services

- [Save Manager](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/settings.py): `settings.py`
- [Save Data](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/save_data.json): `save_data.json`
- [Sound Engine](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/sound_engine.py): `sound_engine.py`
- [Game Constants](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/settings.py): `settings.py`
- [Font Library](https://github.com/omarmamdouhibrahemsayed-del/omar-icy-tower-/blob/main/settings.py): `settings.py`

### Other components

- **Player**

## Connections

- Player → Game Loop: controls (evidence: `main.py`)
- Game Loop → Level Definitions: selects levels (evidence: `main.py`)
- Game Loop → Theme Renderer: initializes renderer (evidence: `main.py`)
- Game Loop → Player and Entities: uses gameplay entities (evidence: `main.py`)
- Game Loop → Character Catalog: loads character (evidence: `main.py`)
- Game Loop → Gameplay HUD: initializes HUD (evidence: `main.py`)
- Game Loop → Character Shop: initializes shop (evidence: `main.py`)
- Game Loop → Save Manager: loads and records (evidence: `main.py`)
- Game Loop → Sound Engine: plays and configures (evidence: `main.py`)
- Game Loop → Font Library: initializes fonts (evidence: `main.py`)
- Game Loop → Game Constants: uses constants (evidence: `main.py`)
- Save Manager → Save Data: reads and writes (evidence: `settings.py`)
- Player and Entities → Character Catalog: renders sprites (evidence: `entities.py`)
- Player and Entities → Game Constants: uses physics constants (evidence: `entities.py`)
- Character Shop → Character Catalog: browses and renders (evidence: `shop_ui.py`)
- Character Shop → Save Manager: updates selection (evidence: `shop_ui.py`)
- Character Shop → Sound Engine: plays UI sounds (evidence: `shop_ui.py`)
- Character Shop → Game Constants: uses display constants (evidence: `shop_ui.py`)
- Gameplay HUD → Game Constants: uses display constants (evidence: `hud.py`)
- Level Definitions → Game Constants: uses layout constants (evidence: `levels.py`)
