# salgado-dev/tcc architecture

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

- Interactive diagram: https://gitdiagram.com/salgado-dev/tcc
- Repository: https://github.com/salgado-dev/tcc

## Overview

The repository contains two standalone Pygame Pokémon games: a compact map-and-battle prototype and a larger safari exploration game. The main player workflow is to move through the world, encounter or find Pokémon, interact with game systems, and see the game state rendered on screen. The larger game also includes islands, progression, inventory, a shop, a Pokédex, and save/load behavior. The README provides no capability details; the larger game's excerpts are partial, so some feature links are omitted where callers were not shown.

Main entry points: [`tccgpt.py`](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py) (Safari Engine), [`tcc.py`](https://github.com/salgado-dev/tcc/blob/main/tcc.py) (Player), [`savegame_tcc_v4.json`](https://github.com/salgado-dev/tcc/blob/main/savegame_tcc_v4.json) (Save File)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prototype["Map Battle Prototype"]
  node_player(("Player<br/>[tcc.py]"))
  node_map_encounters["Map Encounters<br/>[tcc.py]"]
  node_battle["Battle<br/>[tcc.py]"]
  node_prototype_render["Game Display<br/>[tcc.py]"]
end

subgraph group_safari["Safari Game"]
  node_safari_player["Player State<br/>[tccgpt.py]"]
  node_wild_pokemon["Wild Pokémon<br/>[tccgpt.py]"]
  node_safari_engine["Safari Engine<br/>[tccgpt.py]"]
  node_exploration["World Exploration<br/>[tccgpt.py]"]
  node_camera["3D Camera<br/>[tccgpt.py]"]
  node_island_selection["Island Selection<br/>[tccgpt.py]"]
  node_progression["Player Progression<br/>[tccgpt.py]"]
  node_inventory["Inventory<br/>[tccgpt.py]"]
  node_shop["Shop<br/>[tccgpt.py]"]
  node_pokedex["Pokédex<br/>[tccgpt.py]"]
  node_save_data[("Save File")]
  node_visual_effects["Visual Effects<br/>[tccgpt.py]"]
  node_safari_display["Game Display<br/>[tccgpt.py]"]
end

node_player_input(("Player"))

node_player -->|"moves through"| node_map_encounters
node_map_encounters -->|"starts encounter"| node_battle
node_player -->|"attacks or flees"| node_battle
node_battle -->|"renders state"| node_prototype_render
node_player -->|"renders position"| node_prototype_render
node_player_input -->|"uses controls"| node_safari_engine
node_safari_engine -->|"creates"| node_safari_player
node_safari_engine -->|"creates"| node_camera
node_safari_engine -->|"updates"| node_exploration
node_exploration -->|"moves"| node_safari_player
node_exploration -->|"updates"| node_camera
node_exploration -->|"updates"| node_wild_pokemon
node_safari_engine -->|"loads state"| node_save_data
node_safari_engine -.->|"saves state"| node_save_data
node_safari_engine -->|"renders menu"| node_island_selection
node_safari_engine -->|"handles purchases"| node_shop
node_safari_engine -.->|"tracks progress"| node_progression
node_safari_engine -.->|"manages items"| node_inventory
node_safari_engine -.->|"tracks discoveries"| node_pokedex
node_safari_engine -.->|"uses effects"| node_visual_effects
node_safari_engine -->|"renders game"| node_safari_display

click node_player "https://github.com/salgado-dev/tcc/blob/main/tcc.py"
click node_map_encounters "https://github.com/salgado-dev/tcc/blob/main/tcc.py"
click node_battle "https://github.com/salgado-dev/tcc/blob/main/tcc.py"
click node_prototype_render "https://github.com/salgado-dev/tcc/blob/main/tcc.py"
click node_safari_player "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_wild_pokemon "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_safari_engine "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_exploration "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_camera "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_island_selection "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_progression "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_inventory "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_shop "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_pokedex "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_save_data "https://github.com/salgado-dev/tcc/blob/main/savegame_tcc_v4.json"
click node_visual_effects "https://github.com/salgado-dev/tcc/blob/main/tccgpt.py"
click node_safari_display "https://github.com/salgado-dev/tcc/blob/main/tccgpt.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_player,node_map_encounters,node_battle,node_prototype_render toneBlue
class node_safari_player,node_wild_pokemon,node_safari_engine,node_exploration,node_camera,node_island_selection,node_progression,node_inventory,node_shop,node_pokedex,node_save_data,node_visual_effects,node_safari_display toneAmber
class node_player_input toneIndigo
```

## Components

### Map Battle Prototype

- [Player](https://github.com/salgado-dev/tcc/blob/main/tcc.py): `tcc.py`
- [Map Encounters](https://github.com/salgado-dev/tcc/blob/main/tcc.py): `tcc.py`
- [Battle](https://github.com/salgado-dev/tcc/blob/main/tcc.py): `tcc.py`
- [Game Display](https://github.com/salgado-dev/tcc/blob/main/tcc.py): `tcc.py`

### Safari Game

- [Player State](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Wild Pokémon](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Safari Engine](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [World Exploration](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [3D Camera](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Island Selection](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Player Progression](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Inventory](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Shop](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Pokédex](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Save File](https://github.com/salgado-dev/tcc/blob/main/savegame_tcc_v4.json): `savegame_tcc_v4.json`
- [Visual Effects](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`
- [Game Display](https://github.com/salgado-dev/tcc/blob/main/tccgpt.py): `tccgpt.py`

### Other components

- **Player**

## Connections

- Player → Map Encounters: moves through (evidence: `tcc.py`)
- Map Encounters → Battle: starts encounter (evidence: `tcc.py`)
- Player → Battle: attacks or flees (evidence: `tcc.py`)
- Battle → Game Display: renders state (evidence: `tcc.py`)
- Player → Game Display: renders position (evidence: `tcc.py`)
- Player → Safari Engine: uses controls (evidence: `tccgpt.py`)
- Safari Engine → Player State: creates (evidence: `tccgpt.py`)
- Safari Engine → 3D Camera: creates (evidence: `tccgpt.py`)
- Safari Engine → World Exploration: updates (evidence: `tccgpt.py`)
- World Exploration → Player State: moves (evidence: `tccgpt.py`)
- World Exploration → 3D Camera: updates (evidence: `tccgpt.py`)
- World Exploration → Wild Pokémon: updates (evidence: `tccgpt.py`)
- Safari Engine → Save File: loads state (evidence: `tccgpt.py`)
- Safari Engine → Save File: saves state
- Safari Engine → Island Selection: renders menu (evidence: `tccgpt.py`)
- Safari Engine → Shop: handles purchases (evidence: `tccgpt.py`)
- Safari Engine → Player Progression: tracks progress (evidence: `tccgpt.py`)
- Safari Engine → Inventory: manages items (evidence: `tccgpt.py`)
- Safari Engine → Pokédex: tracks discoveries (evidence: `tccgpt.py`)
- Safari Engine → Visual Effects: uses effects (evidence: `tccgpt.py`)
- Safari Engine → Game Display: renders game (evidence: `tccgpt.py`)
