# sanlor/barkley2_original architecture

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

- Interactive diagram: https://gitdiagram.com/sanlor/barkley2_original
- Repository: https://github.com/sanlor/barkley2_original

## Overview

Barkley2_Original is a GameMaker Studio 1.4 game source repository, with narrative and area event scripts alongside Python tools for converting Ogmo maps into GameMaker rooms. The sampled material supports a detailed map-conversion workflow, but does not expose the game’s runtime entry point or how its event scripts are dispatched, so those connections are not inferred. The game-content nodes identify substantial script areas; only the map-tool edges are traced to shown imports or calls.

Main entry points: [`barkley_2/murderEveryOgmo.py`](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/murderEveryOgmo.py) (Batch converter), [`barkley_2/Tools/mapconvert/mapdata.py`](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/mapdata.py) (Room data builder), [`barkley_2/Tools/mapconvert/ogmomap.py`](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/ogmomap.py) (Ogmo map parser), [`barkley_2/murderAnOgmo.py`](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/murderAnOgmo.py) (Interactive converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game content"]
  node_game_identity["Barkley2 game"]
  node_endgame_events["Endgame events"]
  node_debug_events["Debug events"]
  node_klatch["Gaming klatch<br/>[gklatch_rooms.js]"]
  node_tnn_branding["Tir na Nog sequence"]
end

subgraph group_maps["Map conversion"]
  node_map_batch["Batch converter<br/>[murderEveryOgmo.py]"]
  node_map_single["Interactive converter<br/>[murderAnOgmo.py]"]
  node_room_mapping["Room mappings<br/>[roomMapping.py]"]
  node_ogmo_project["Ogmo project reader<br/>[ogmoproj.py]"]
  node_ogmo_map["Ogmo map parser<br/>[ogmomap.py]"]
  node_map_data["Room data builder<br/>[mapdata.py]"]
  node_grid["Grid geometry<br/>[grid.py]"]
  node_matching["Bipartite matcher<br/>[bipartitematch.py]"]
  node_entity_mapping["Entity mappings<br/>[entityMapping.py]"]
  node_gm_project["GameMaker project reader<br/>[gmproj.py]"]
  node_xml_printer["Room XML printer<br/>[gmxmlprinter.py]"]
end

subgraph group_extras["Other components"]
  node_bbt_endpoint["Tactics async endpoint<br/>[async.php]"]
  node_bbt_config["Tactics config<br/>[bbtconfig.php]"]
  node_live_helper["GMLive helper<br/>[GMLiveHelper.cpp]"]
end

node_map_batch -->|"loads project"| node_gm_project
node_map_batch -->|"reads project"| node_ogmo_project
node_map_batch -->|"parses map"| node_ogmo_map
node_map_batch -->|"iterates mappings"| node_room_mapping
node_map_single -->|"reads project"| node_ogmo_project
node_map_single -->|"parses map"| node_ogmo_map
node_map_single -->|"loads project"| node_gm_project
node_ogmo_map -->|"inherits from"| node_map_data
node_ogmo_map -->|"uses grid"| node_grid
node_map_data -->|"uses solver"| node_grid
node_map_data -->|"maps entities"| node_entity_mapping
node_map_data -->|"formats XML"| node_xml_printer
node_grid -->|"matches lines"| node_matching

click node_endgame_events "https://github.com/sanlor/barkley2_original/tree/main/barkley_2/Design/endgame_scripts"
click node_debug_events "https://github.com/sanlor/barkley2_original/tree/main/barkley_2/Design/endgame_scripts_debug"
click node_klatch "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Design/gaming_klatch/gklatch_rooms.js"
click node_tnn_branding "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Scripts/Tir%20na%20Nog/event_tnn_brandingSequence01.js"
click node_map_batch "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/murderEveryOgmo.py"
click node_map_single "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/murderAnOgmo.py"
click node_room_mapping "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/roomMapping.py"
click node_ogmo_project "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/ogmoproj.py"
click node_ogmo_map "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/ogmomap.py"
click node_map_data "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/mapdata.py"
click node_grid "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/grid.py"
click node_matching "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/bipartitematch.py"
click node_entity_mapping "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/entityMapping.py"
click node_gm_project "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/gmproj.py"
click node_xml_printer "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/gmxmlprinter.py"
click node_bbt_endpoint "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/B-Ball%20Tactics/async.php"
click node_bbt_config "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/B-Ball%20Tactics/bbtconfig.php"
click node_live_helper "https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Barkley2.gmx/extensions/GMLiveHelper/GMLiveHelper.cpp"

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_identity,node_endgame_events,node_debug_events,node_klatch,node_tnn_branding toneBlue
class node_map_batch,node_map_single,node_room_mapping,node_ogmo_project,node_ogmo_map,node_map_data,node_grid,node_matching,node_entity_mapping,node_gm_project,node_xml_printer toneAmber
class node_bbt_endpoint,node_bbt_config,node_live_helper toneMint
```

## Components

### Game content

- **Barkley2 game**
- [Endgame events](https://github.com/sanlor/barkley2_original/tree/main/barkley_2/Design/endgame_scripts): `barkley_2/Design/endgame_scripts`
- [Debug events](https://github.com/sanlor/barkley2_original/tree/main/barkley_2/Design/endgame_scripts_debug): `barkley_2/Design/endgame_scripts_debug`
- [Gaming klatch](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Design/gaming_klatch/gklatch_rooms.js): `barkley_2/Design/gaming_klatch/gklatch_rooms.js`
- [Tir na Nog sequence](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Scripts/Tir%20na%20Nog/event_tnn_brandingSequence01.js): `barkley_2/Scripts/Tir na Nog/event_tnn_brandingSequence01.js`

### Map conversion

- [Batch converter](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/murderEveryOgmo.py): `barkley_2/murderEveryOgmo.py`
- [Interactive converter](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/murderAnOgmo.py): `barkley_2/murderAnOgmo.py`
- [Room mappings](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/roomMapping.py): `barkley_2/Tools/roomMapping.py`
- [Ogmo project reader](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/ogmoproj.py): `barkley_2/Tools/mapconvert/ogmoproj.py`
- [Ogmo map parser](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/ogmomap.py): `barkley_2/Tools/mapconvert/ogmomap.py`
- [Room data builder](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/mapdata.py): `barkley_2/Tools/mapconvert/mapdata.py`
- [Grid geometry](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/grid.py): `barkley_2/Tools/mapconvert/grid.py`
- [Bipartite matcher](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/bipartitematch.py): `barkley_2/Tools/mapconvert/bipartitematch.py`
- [Entity mappings](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/entityMapping.py): `barkley_2/Tools/entityMapping.py`
- [GameMaker project reader](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/gmproj.py): `barkley_2/Tools/mapconvert/gmproj.py`
- [Room XML printer](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Tools/mapconvert/gmxmlprinter.py): `barkley_2/Tools/mapconvert/gmxmlprinter.py`

### Other components

- [Tactics async endpoint](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/B-Ball%20Tactics/async.php): `barkley_2/B-Ball Tactics/async.php`
- [Tactics config](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/B-Ball%20Tactics/bbtconfig.php): `barkley_2/B-Ball Tactics/bbtconfig.php`
- [GMLive helper](https://github.com/sanlor/barkley2_original/blob/main/barkley_2/Barkley2.gmx/extensions/GMLiveHelper/GMLiveHelper.cpp): `barkley_2/Barkley2.gmx/extensions/GMLiveHelper/GMLiveHelper.cpp`

## Connections

- Batch converter → GameMaker project reader: loads project (evidence: `barkley_2/murderEveryOgmo.py`)
- Batch converter → Ogmo project reader: reads project (evidence: `barkley_2/murderEveryOgmo.py`)
- Batch converter → Ogmo map parser: parses map (evidence: `barkley_2/murderEveryOgmo.py`)
- Batch converter → Room mappings: iterates mappings (evidence: `barkley_2/murderEveryOgmo.py`)
- Interactive converter → Ogmo project reader: reads project (evidence: `barkley_2/murderAnOgmo.py`)
- Interactive converter → Ogmo map parser: parses map (evidence: `barkley_2/murderAnOgmo.py`)
- Interactive converter → GameMaker project reader: loads project (evidence: `barkley_2/murderAnOgmo.py`)
- Ogmo map parser → Room data builder: inherits from (evidence: `barkley_2/Tools/mapconvert/ogmomap.py`)
- Ogmo map parser → Grid geometry: uses grid (evidence: `barkley_2/Tools/mapconvert/ogmomap.py`)
- Room data builder → Grid geometry: uses solver (evidence: `barkley_2/Tools/mapconvert/mapdata.py`)
- Room data builder → Entity mappings: maps entities (evidence: `barkley_2/Tools/mapconvert/mapdata.py`)
- Room data builder → Room XML printer: formats XML (evidence: `barkley_2/Tools/mapconvert/mapdata.py`)
- Grid geometry → Bipartite matcher: matches lines (evidence: `barkley_2/Tools/mapconvert/grid.py`)
