# fgouin2014/dukenukem3d-dnksb architecture

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

- Interactive diagram: https://gitdiagram.com/fgouin2014/dukenukem3d-dnksb
- Repository: https://github.com/fgouin2014/dukenukem3d-dnksb

## Overview

This repository combines a Duke Nukem soundboard app with a substantial asset-preparation toolkit. The user-facing flow is opening the Android app and browsing or viewing animation assets; the sampled app excerpt confirms that it loads animation metadata and supports settings-based overrides. Separate Python workflows assemble sprite sheets and collections from extracted tiles. There is no README, and the excerpts do not establish how audio playback is wired or how generated assets are delivered to the app, so those connections are omitted.

Main entry points: [`DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt`](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt) (Soundboard UI), [`engine_brutes_rebuild.py`](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/engine_brutes_rebuild.py) (Brute animations), [`auto_build.py`](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/auto_build.py) (Mapped animations), [`build_penthouse_assets.py`](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_penthouse_assets.py) (Penthouse assets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_android["Android soundboard"]
  node_app["Soundboard UI<br/>[MainActivity.kt]"]
  node_animation_meta["Animation metadata<br/>[MainActivity.kt]"]
  node_config_overrides["Settings overrides<br/>[MainActivity.kt]"]
end

subgraph group_generation["Asset generation"]
  node_sprite_sheets["Sprite sheets"]
  node_mapped_sheets["Mapped animations<br/>[auto_build.py]"]
  node_monster_sheets["Monster animations"]
  node_brute_sheets["Brute animations"]
  node_duke3d_brutes["Duke3D monster sheets"]
  node_penthouse_assets["Penthouse assets"]
end

subgraph group_collection["Asset collections"]
  node_master_collection["Master collection"]
  node_audio_organizer["Audio organization<br/>[organize_audio.py]"]
  node_audio_assets["Audio assets"]
  node_sprite_sources["Extracted sprite tiles"]
  node_sound_mapping["Sound mapping"]
end

subgraph group_inspection["Asset inspection"]
  node_metadata_audit["Animation audit"]
  node_metadata_fix["Metadata repair"]
  node_definition_audit["Game definition audit<br/>[mega_audit.py]"]
end

node_user(("Soundboard user"))

node_user -->|"browses"| node_app
node_app -->|"loads metadata"| node_animation_meta
node_app -->|"checks overrides"| node_config_overrides
node_sprite_sources -->|"provides frames"| node_sprite_sheets
node_sprite_sources -->|"provides tiles"| node_mapped_sheets
node_sprite_sources -->|"provides tiles"| node_monster_sheets
node_sprite_sources -->|"provides tiles"| node_brute_sheets
node_sprite_sources -->|"provides tiles"| node_duke3d_brutes
node_mapped_sheets -->|"writes mapping"| node_sound_mapping
node_audio_assets -->|"organizes files"| node_audio_organizer
node_sprite_sources -->|"provides tiles"| node_penthouse_assets
node_penthouse_assets -->|"converts audio"| node_audio_assets
node_master_collection -->|"copies audio"| node_audio_assets
node_brute_sheets -.->|"checks metadata"| node_metadata_audit
node_metadata_fix -.->|"repairs metadata"| node_brute_sheets
node_definition_audit -.->|"documents definitions"| node_master_collection

click node_app "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt"
click node_animation_meta "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt"
click node_sprite_sheets "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/make_spritesheet.py"
click node_mapped_sheets "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/auto_build.py"
click node_monster_sheets "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_monster_assets.py"
click node_brute_sheets "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/engine_brutes_rebuild.py"
click node_duke3d_brutes "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_all_duke3d_monsters.py"
click node_penthouse_assets "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_penthouse_assets.py"
click node_master_collection "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_master_phase3.py"
click node_audio_organizer "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/organize_audio.py"
click node_config_overrides "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt"
click node_metadata_audit "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/audit_engine_brutes.py"
click node_metadata_fix "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/fix_engine_brutes.py"
click node_definition_audit "https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/mega_audit.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_app,node_animation_meta,node_config_overrides,node_user toneBlue
class node_sprite_sheets,node_mapped_sheets,node_monster_sheets,node_brute_sheets,node_duke3d_brutes,node_penthouse_assets toneAmber
class node_master_collection,node_audio_organizer,node_audio_assets,node_sprite_sources,node_sound_mapping toneMint
class node_metadata_audit,node_metadata_fix,node_definition_audit toneRose
```

## Components

### Android soundboard

- [Soundboard UI](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt): `DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt`
- [Animation metadata](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt): `DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt`
- [Settings overrides](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt): `DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt`

### Asset generation

- [Sprite sheets](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/make_spritesheet.py): `make_spritesheet.py`
- [Mapped animations](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/auto_build.py): `auto_build.py`
- [Monster animations](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_monster_assets.py): `build_monster_assets.py`
- [Brute animations](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/engine_brutes_rebuild.py): `engine_brutes_rebuild.py`
- [Duke3D monster sheets](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_all_duke3d_monsters.py): `build_all_duke3d_monsters.py`
- [Penthouse assets](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_penthouse_assets.py): `build_penthouse_assets.py`

### Asset collections

- [Master collection](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/build_master_phase3.py): `build_master_phase3.py`
- [Audio organization](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/organize_audio.py): `organize_audio.py`
- **Audio assets**
- **Extracted sprite tiles**
- **Sound mapping**

### Asset inspection

- [Animation audit](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/audit_engine_brutes.py): `audit_engine_brutes.py`
- [Metadata repair](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/fix_engine_brutes.py): `fix_engine_brutes.py`
- [Game definition audit](https://github.com/fgouin2014/dukenukem3d-dnksb/blob/main/mega_audit.py): `mega_audit.py`

### Other components

- **Soundboard user**

## Connections

- Soundboard user → Soundboard UI: browses
- Soundboard UI → Animation metadata: loads metadata (evidence: `DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt`)
- Soundboard UI → Settings overrides: checks overrides (evidence: `DukeSoundboard/app/src/main/java/com/lastchance/dukesoundboard/MainActivity.kt`)
- Extracted sprite tiles → Sprite sheets: provides frames (evidence: `make_spritesheet.py`)
- Extracted sprite tiles → Mapped animations: provides tiles (evidence: `auto_build.py`)
- Extracted sprite tiles → Monster animations: provides tiles (evidence: `build_monster_assets.py`)
- Extracted sprite tiles → Brute animations: provides tiles (evidence: `engine_brutes_rebuild.py`)
- Extracted sprite tiles → Duke3D monster sheets: provides tiles (evidence: `build_all_duke3d_monsters.py`)
- Mapped animations → Sound mapping: writes mapping (evidence: `auto_build.py`)
- Audio assets → Audio organization: organizes files (evidence: `organize_audio.py`)
- Extracted sprite tiles → Penthouse assets: provides tiles (evidence: `build_penthouse_assets.py`)
- Penthouse assets → Audio assets: converts audio (evidence: `build_penthouse_assets.py`)
- Master collection → Audio assets: copies audio (evidence: `build_master_phase3.py`)
- Brute animations → Animation audit: checks metadata
- Metadata repair → Brute animations: repairs metadata
- Game definition audit → Master collection: documents definitions
