# wozt/metroidvania architecture

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

- Interactive diagram: https://gitdiagram.com/wozt/metroidvania
- Repository: https://github.com/wozt/metroidvania

## Overview

Metroid Vania is an active research and content-authoring toolchain for a planned Metroid: Zero Mission / Castlevania: Aria of Sorrow crossover, not a playable reconstruction. Its user workflow is to import or decode locally owned game data, browse native rooms and world metadata, inspect rendered previews, and author private room overrides and campaign/story data in the GTK editor or shared headless backend. The graph preserves both game-specific research paths and the shared authoring path. Some subsystem links are documented capabilities; unsampled implementation details are not inferred.

Main entry points: [`scripts/editor_backend.py`](https://github.com/wozt/metroidvania/blob/main/scripts/editor_backend.py) (Shared Editor Backend), [`scripts/import_game_assets.py`](https://github.com/wozt/metroidvania/blob/main/scripts/import_game_assets.py) (Asset Import), [`editor/main.c`](https://github.com/wozt/metroidvania/blob/main/editor/main.c) (GTK Editor), [`editor/native_workspace.c`](https://github.com/wozt/metroidvania/blob/main/editor/native_workspace.c) (Native Room Editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_imports["Local Data Import"]
  node_asset_import["Asset Import"]
  node_mzm_import["MZM Room Index"]
  node_aria_import["Aria World Decode"]
end

subgraph group_research["Room Research"]
  node_mzm_render["MZM Room Render<br/>[mzm_room_render.py]"]
  node_aria_render["Aria Room Render<br/>[aos_room_render.py]"]
  node_mzm_workspace["MZM Research Workspace"]
  node_aria_workspace["Aria Research Workspace"]
  node_audit["Room Audit<br/>[room_audit.py]"]
end

subgraph group_authoring["Editor Authoring"]
  node_editor_ui["GTK Editor<br/>[main.c]"]
  node_native_workspace["Native Room Editor<br/>[native_workspace.c]"]
  node_native_map["Map Model<br/>[native_map.c]"]
  node_backend["Shared Editor Backend<br/>[editor_backend.py]"]
  node_cli_launcher["Headless Launcher"]
  node_entities["Room Entities"]
  node_annotations["Room Annotations"]
  node_object_catalog["Object Catalog<br/>[object_catalog.py]"]
end

subgraph group_campaign["World And Story"]
  node_atlas["World Atlas<br/>[world_atlas.c]"]
  node_story["Story Workspace<br/>[story_workspace.c]"]
  node_authored_rooms["Authored Rooms<br/>[authored_rooms.py]"]
end

node_owner(("ROM Owner"))

node_owner -->|"provides ROMs"| node_asset_import
node_owner -->|"provides ROM"| node_aria_import
node_asset_import -->|"supplies private assets"| node_mzm_import
node_aria_import -->|"uses asset import"| node_asset_import
node_mzm_render -->|"reads imported data"| node_asset_import
node_aria_render -->|"uses world decode"| node_aria_import
node_mzm_workspace -->|"uses room render"| node_mzm_render
node_mzm_workspace -->|"uses imported assets"| node_asset_import
node_aria_workspace -->|"uses room render"| node_aria_render
node_aria_workspace -->|"uses world metadata"| node_aria_import
node_audit -->|"audits rendered rooms"| node_mzm_render
node_audit -->|"audits rendered rooms"| node_aria_render
node_editor_ui -->|"hosts editing"| node_native_workspace
node_editor_ui -->|"hosts atlas"| node_atlas
node_editor_ui -->|"hosts story tools"| node_story
node_editor_ui -->|"launches headless"| node_cli_launcher
node_native_workspace -->|"edits map model"| node_native_map
node_native_workspace -.->|"requests room operations"| node_backend
node_backend -->|"uses entity projection"| node_entities
node_backend -->|"uses object catalog"| node_object_catalog
node_backend -->|"uses room metadata"| node_authored_rooms
node_backend -->|"runs room audits"| node_audit
node_backend -->|"uses MZM workspace"| node_mzm_workspace
node_backend -->|"uses Aria workspace"| node_aria_workspace
node_backend -->|"uses room renderer"| node_mzm_render
node_backend -->|"uses room renderer"| node_aria_render
node_native_workspace -.->|"uses annotations"| node_annotations

click node_asset_import "https://github.com/wozt/metroidvania/blob/main/scripts/import_game_assets.py"
click node_mzm_import "https://github.com/wozt/metroidvania/blob/main/scripts/import_mzm_rooms.py"
click node_aria_import "https://github.com/wozt/metroidvania/blob/main/scripts/import_aos_world.py"
click node_mzm_render "https://github.com/wozt/metroidvania/blob/main/scripts/mzm_room_render.py"
click node_aria_render "https://github.com/wozt/metroidvania/blob/main/scripts/aos_room_render.py"
click node_mzm_workspace "https://github.com/wozt/metroidvania/blob/main/scripts/mzm_native_workspace.py"
click node_aria_workspace "https://github.com/wozt/metroidvania/blob/main/scripts/aos_native_workspace.py"
click node_audit "https://github.com/wozt/metroidvania/blob/main/scripts/room_audit.py"
click node_editor_ui "https://github.com/wozt/metroidvania/blob/main/editor/main.c"
click node_native_workspace "https://github.com/wozt/metroidvania/blob/main/editor/native_workspace.c"
click node_native_map "https://github.com/wozt/metroidvania/blob/main/src/core/native_map.c"
click node_backend "https://github.com/wozt/metroidvania/blob/main/scripts/editor_backend.py"
click node_cli_launcher "https://github.com/wozt/metroidvania/blob/main/src/core/editor_cli_launcher.c"
click node_entities "https://github.com/wozt/metroidvania/blob/main/scripts/project_room_entities.py"
click node_annotations "https://github.com/wozt/metroidvania/blob/main/scripts/room_annotations.py"
click node_object_catalog "https://github.com/wozt/metroidvania/blob/main/scripts/object_catalog.py"
click node_atlas "https://github.com/wozt/metroidvania/blob/main/editor/world_atlas.c"
click node_story "https://github.com/wozt/metroidvania/blob/main/editor/story_workspace.c"
click node_authored_rooms "https://github.com/wozt/metroidvania/blob/main/scripts/authored_rooms.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_asset_import,node_mzm_import,node_aria_import toneBlue
class node_mzm_render,node_aria_render,node_mzm_workspace,node_aria_workspace,node_audit toneAmber
class node_editor_ui,node_native_workspace,node_native_map,node_backend,node_cli_launcher,node_entities,node_annotations,node_object_catalog toneMint
class node_atlas,node_story,node_authored_rooms toneRose
class node_owner toneIndigo
```

## Components

### Local Data Import

- [Asset Import](https://github.com/wozt/metroidvania/blob/main/scripts/import_game_assets.py): `scripts/import_game_assets.py`
- [MZM Room Index](https://github.com/wozt/metroidvania/blob/main/scripts/import_mzm_rooms.py): `scripts/import_mzm_rooms.py`
- [Aria World Decode](https://github.com/wozt/metroidvania/blob/main/scripts/import_aos_world.py): `scripts/import_aos_world.py`

### Room Research

- [MZM Room Render](https://github.com/wozt/metroidvania/blob/main/scripts/mzm_room_render.py): `scripts/mzm_room_render.py`
- [Aria Room Render](https://github.com/wozt/metroidvania/blob/main/scripts/aos_room_render.py): `scripts/aos_room_render.py`
- [MZM Research Workspace](https://github.com/wozt/metroidvania/blob/main/scripts/mzm_native_workspace.py): `scripts/mzm_native_workspace.py`
- [Aria Research Workspace](https://github.com/wozt/metroidvania/blob/main/scripts/aos_native_workspace.py): `scripts/aos_native_workspace.py`
- [Room Audit](https://github.com/wozt/metroidvania/blob/main/scripts/room_audit.py): `scripts/room_audit.py`

### Editor Authoring

- [GTK Editor](https://github.com/wozt/metroidvania/blob/main/editor/main.c): `editor/main.c`
- [Native Room Editor](https://github.com/wozt/metroidvania/blob/main/editor/native_workspace.c): `editor/native_workspace.c`
- [Map Model](https://github.com/wozt/metroidvania/blob/main/src/core/native_map.c): `src/core/native_map.c`
- [Shared Editor Backend](https://github.com/wozt/metroidvania/blob/main/scripts/editor_backend.py): `scripts/editor_backend.py`
- [Headless Launcher](https://github.com/wozt/metroidvania/blob/main/src/core/editor_cli_launcher.c): `src/core/editor_cli_launcher.c`
- [Room Entities](https://github.com/wozt/metroidvania/blob/main/scripts/project_room_entities.py): `scripts/project_room_entities.py`
- [Room Annotations](https://github.com/wozt/metroidvania/blob/main/scripts/room_annotations.py): `scripts/room_annotations.py`
- [Object Catalog](https://github.com/wozt/metroidvania/blob/main/scripts/object_catalog.py): `scripts/object_catalog.py`

### World And Story

- [World Atlas](https://github.com/wozt/metroidvania/blob/main/editor/world_atlas.c): `editor/world_atlas.c`
- [Story Workspace](https://github.com/wozt/metroidvania/blob/main/editor/story_workspace.c): `editor/story_workspace.c`
- [Authored Rooms](https://github.com/wozt/metroidvania/blob/main/scripts/authored_rooms.py): `scripts/authored_rooms.py`

### Other components

- **ROM Owner**

## Connections

- ROM Owner → Asset Import: provides ROMs (evidence: `README.md`)
- ROM Owner → Aria World Decode: provides ROM (evidence: `README.md`)
- Asset Import → MZM Room Index: supplies private assets (evidence: `scripts/import_mzm_rooms.py`)
- Aria World Decode → Asset Import: uses asset import (evidence: `scripts/import_aos_world.py`)
- MZM Room Render → Asset Import: reads imported data (evidence: `scripts/mzm_room_render.py`)
- Aria Room Render → Aria World Decode: uses world decode (evidence: `scripts/aos_room_render.py`)
- MZM Research Workspace → MZM Room Render: uses room render (evidence: `scripts/mzm_native_workspace.py`)
- MZM Research Workspace → Asset Import: uses imported assets (evidence: `scripts/mzm_native_workspace.py`)
- Aria Research Workspace → Aria Room Render: uses room render (evidence: `scripts/aos_native_workspace.py`)
- Aria Research Workspace → Aria World Decode: uses world metadata (evidence: `scripts/aos_native_workspace.py`)
- Room Audit → MZM Room Render: audits rendered rooms (evidence: `scripts/room_audit.py`)
- Room Audit → Aria Room Render: audits rendered rooms (evidence: `scripts/room_audit.py`)
- GTK Editor → Native Room Editor: hosts editing (evidence: `editor/main.c`)
- GTK Editor → World Atlas: hosts atlas (evidence: `editor/main.c`)
- GTK Editor → Story Workspace: hosts story tools (evidence: `editor/main.c`)
- GTK Editor → Headless Launcher: launches headless (evidence: `editor/main.c`)
- Native Room Editor → Map Model: edits map model (evidence: `editor/native_workspace.c`)
- Native Room Editor → Shared Editor Backend: requests room operations
- Shared Editor Backend → Room Entities: uses entity projection (evidence: `scripts/editor_backend.py`)
- Shared Editor Backend → Object Catalog: uses object catalog (evidence: `scripts/editor_backend.py`)
- Shared Editor Backend → Authored Rooms: uses room metadata (evidence: `scripts/editor_backend.py`)
- Shared Editor Backend → Room Audit: runs room audits (evidence: `scripts/editor_backend.py`)
- Shared Editor Backend → MZM Research Workspace: uses MZM workspace (evidence: `scripts/editor_backend.py`)
- Shared Editor Backend → Aria Research Workspace: uses Aria workspace (evidence: `scripts/editor_backend.py`)
- Shared Editor Backend → MZM Room Render: uses room renderer (evidence: `scripts/editor_backend.py`)
- Shared Editor Backend → Aria Room Render: uses room renderer (evidence: `scripts/editor_backend.py`)
- Native Room Editor → Room Annotations: uses annotations
