# rauljaspal/ironblood architecture

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

- Interactive diagram: https://gitdiagram.com/rauljaspal/ironblood
- Repository: https://github.com/rauljaspal/ironblood

## Overview

IRONBLOOD is a browser-based 3D fighting game. Players choose arcade or local versus, select fighters and a stage, then play rounds whose combat resolves hits, effects, and match outcomes. The browser runtime is organized around a match orchestrator, with separate fighter, combat, input, presentation, and asset responsibilities. The repository also includes an offline animation-retargeting pipeline. Runtime connections below follow the shown excerpts and source-index references; unsampled implementation details are not inferred.

Main entry points: [`web/js/main.js`](https://github.com/rauljaspal/ironblood/blob/main/web/js/main.js) (Boot and menus), [`web/js/game.js`](https://github.com/rauljaspal/ironblood/blob/main/web/js/game.js) (Fight session), [`web/js/fighter.js`](https://github.com/rauljaspal/ironblood/blob/main/web/js/fighter.js) (Fighter state), [`web/js/config.js`](https://github.com/rauljaspal/ironblood/blob/main/web/js/config.js) (Roster and rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Game Runtime"]
  node_boot["Boot and menus<br/>[main.js]"]
  node_config["Roster and rules<br/>[config.js]"]
  node_input["Controls<br/>[input.js]"]
end

subgraph group_fight["Match Systems"]
  node_session["Fight session<br/>[game.js]"]
  node_fighter["Fighter state<br/>[fighter.js]"]
  node_combat["Combat resolution<br/>[combat.js]"]
  node_ai["CPU opponent<br/>[ai.js]"]
end

subgraph group_presentation["Presentation"]
  node_stage["Stage builder<br/>[stage.js]"]
  node_assets["3D asset loading<br/>[assets.js]"]
  node_costumes["Costume setup<br/>[costumes.js]"]
  node_fx["Visual effects<br/>[fx.js]"]
  node_audio["Sound and music<br/>[audio.js]"]
  node_ui["Game UI<br/>[ui.js]"]
end

subgraph group_pipeline["Animation Pipeline"]
  node_anim_build["Animation baking<br/>[build-anims.js]"]
  node_retarget["Rig retargeting<br/>[retarget.js]"]
  node_move_authoring["Move authoring<br/>[moves.js]"]
  node_rig_maps["Rig mappings<br/>[rigmaps.js]"]
  node_skeleton["Skeleton sampling<br/>[skeleton.js]"]
end

node_player(("Player"))

node_player -->|"starts game"| node_boot
node_boot -->|"reads roster"| node_config
node_boot -->|"builds stage"| node_stage
node_boot -->|"starts match"| node_session
node_boot -->|"uses controls"| node_input
node_boot -->|"uses interface"| node_ui
node_boot -->|"creates effects"| node_fx
node_boot -->|"uses audio"| node_audio
node_boot -->|"loads assets"| node_assets
node_stage -->|"loads textures"| node_assets
node_assets -->|"applies costumes"| node_costumes
node_session -->|"updates fighters"| node_fighter
node_session -->|"resolves combat"| node_combat
node_session -->|"runs CPU"| node_ai
node_session -->|"reads rules"| node_config
node_fighter -->|"loads models"| node_assets
node_fighter -->|"reads moves"| node_config
node_combat -->|"checks states"| node_fighter
node_combat -->|"reads frame data"| node_config
node_ai -->|"chooses actions"| node_fighter
node_ai -->|"reads rules"| node_config
node_anim_build -->|"extracts clips"| node_skeleton
node_anim_build -->|"retargets clips"| node_retarget
node_anim_build -->|"uses rig maps"| node_rig_maps
node_anim_build -->|"builds moves"| node_move_authoring
node_retarget -->|"computes transforms"| node_skeleton
node_move_authoring -->|"computes poses"| node_skeleton

click node_boot "https://github.com/rauljaspal/ironblood/blob/main/web/js/main.js"
click node_config "https://github.com/rauljaspal/ironblood/blob/main/web/js/config.js"
click node_input "https://github.com/rauljaspal/ironblood/blob/main/web/js/input.js"
click node_session "https://github.com/rauljaspal/ironblood/blob/main/web/js/game.js"
click node_fighter "https://github.com/rauljaspal/ironblood/blob/main/web/js/fighter.js"
click node_combat "https://github.com/rauljaspal/ironblood/blob/main/web/js/combat.js"
click node_ai "https://github.com/rauljaspal/ironblood/blob/main/web/js/ai.js"
click node_stage "https://github.com/rauljaspal/ironblood/blob/main/web/js/stage.js"
click node_assets "https://github.com/rauljaspal/ironblood/blob/main/web/js/assets.js"
click node_costumes "https://github.com/rauljaspal/ironblood/blob/main/web/js/costumes.js"
click node_fx "https://github.com/rauljaspal/ironblood/blob/main/web/js/fx.js"
click node_audio "https://github.com/rauljaspal/ironblood/blob/main/web/js/audio.js"
click node_ui "https://github.com/rauljaspal/ironblood/blob/main/web/js/ui.js"
click node_anim_build "https://github.com/rauljaspal/ironblood/blob/main/tools/build-anims.js"
click node_retarget "https://github.com/rauljaspal/ironblood/blob/main/tools/lib/retarget.js"
click node_move_authoring "https://github.com/rauljaspal/ironblood/blob/main/tools/lib/moves.js"
click node_rig_maps "https://github.com/rauljaspal/ironblood/blob/main/tools/lib/rigmaps.js"
click node_skeleton "https://github.com/rauljaspal/ironblood/blob/main/tools/lib/skeleton.js"

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_boot,node_config,node_input toneBlue
class node_session,node_fighter,node_combat,node_ai toneAmber
class node_stage,node_assets,node_costumes,node_fx,node_audio,node_ui toneMint
class node_anim_build,node_retarget,node_move_authoring,node_rig_maps,node_skeleton toneRose
class node_player toneIndigo
```

## Components

### Game Runtime

- [Boot and menus](https://github.com/rauljaspal/ironblood/blob/main/web/js/main.js): `web/js/main.js`
- [Roster and rules](https://github.com/rauljaspal/ironblood/blob/main/web/js/config.js): `web/js/config.js`
- [Controls](https://github.com/rauljaspal/ironblood/blob/main/web/js/input.js): `web/js/input.js`

### Match Systems

- [Fight session](https://github.com/rauljaspal/ironblood/blob/main/web/js/game.js): `web/js/game.js`
- [Fighter state](https://github.com/rauljaspal/ironblood/blob/main/web/js/fighter.js): `web/js/fighter.js`
- [Combat resolution](https://github.com/rauljaspal/ironblood/blob/main/web/js/combat.js): `web/js/combat.js`
- [CPU opponent](https://github.com/rauljaspal/ironblood/blob/main/web/js/ai.js): `web/js/ai.js`

### Presentation

- [Stage builder](https://github.com/rauljaspal/ironblood/blob/main/web/js/stage.js): `web/js/stage.js`
- [3D asset loading](https://github.com/rauljaspal/ironblood/blob/main/web/js/assets.js): `web/js/assets.js`
- [Costume setup](https://github.com/rauljaspal/ironblood/blob/main/web/js/costumes.js): `web/js/costumes.js`
- [Visual effects](https://github.com/rauljaspal/ironblood/blob/main/web/js/fx.js): `web/js/fx.js`
- [Sound and music](https://github.com/rauljaspal/ironblood/blob/main/web/js/audio.js): `web/js/audio.js`
- [Game UI](https://github.com/rauljaspal/ironblood/blob/main/web/js/ui.js): `web/js/ui.js`

### Animation Pipeline

- [Animation baking](https://github.com/rauljaspal/ironblood/blob/main/tools/build-anims.js): `tools/build-anims.js`
- [Rig retargeting](https://github.com/rauljaspal/ironblood/blob/main/tools/lib/retarget.js): `tools/lib/retarget.js`
- [Move authoring](https://github.com/rauljaspal/ironblood/blob/main/tools/lib/moves.js): `tools/lib/moves.js`
- [Rig mappings](https://github.com/rauljaspal/ironblood/blob/main/tools/lib/rigmaps.js): `tools/lib/rigmaps.js`
- [Skeleton sampling](https://github.com/rauljaspal/ironblood/blob/main/tools/lib/skeleton.js): `tools/lib/skeleton.js`

### Other components

- **Player**

## Connections

- Player → Boot and menus: starts game (evidence: `README.md`)
- Boot and menus → Roster and rules: reads roster (evidence: `web/js/main.js`)
- Boot and menus → Stage builder: builds stage (evidence: `web/js/main.js`)
- Boot and menus → Fight session: starts match (evidence: `web/js/main.js`)
- Boot and menus → Controls: uses controls (evidence: `web/js/main.js`)
- Boot and menus → Game UI: uses interface (evidence: `web/js/main.js`)
- Boot and menus → Visual effects: creates effects (evidence: `web/js/main.js`)
- Boot and menus → Sound and music: uses audio (evidence: `web/js/main.js`)
- Boot and menus → 3D asset loading: loads assets (evidence: `web/js/main.js`)
- Stage builder → 3D asset loading: loads textures (evidence: `web/js/stage.js`)
- 3D asset loading → Costume setup: applies costumes (evidence: `web/js/assets.js`)
- Fight session → Fighter state: updates fighters (evidence: `web/js/game.js`)
- Fight session → Combat resolution: resolves combat (evidence: `web/js/game.js`)
- Fight session → CPU opponent: runs CPU (evidence: `web/js/game.js`)
- Fight session → Roster and rules: reads rules (evidence: `web/js/game.js`)
- Fighter state → 3D asset loading: loads models (evidence: `web/js/fighter.js`)
- Fighter state → Roster and rules: reads moves (evidence: `web/js/fighter.js`)
- Combat resolution → Fighter state: checks states (evidence: `web/js/combat.js`)
- Combat resolution → Roster and rules: reads frame data (evidence: `web/js/combat.js`)
- CPU opponent → Fighter state: chooses actions (evidence: `web/js/ai.js`)
- CPU opponent → Roster and rules: reads rules (evidence: `web/js/ai.js`)
- Animation baking → Skeleton sampling: extracts clips (evidence: `tools/build-anims.js`)
- Animation baking → Rig retargeting: retargets clips (evidence: `tools/build-anims.js`)
- Animation baking → Rig mappings: uses rig maps (evidence: `tools/build-anims.js`)
- Animation baking → Move authoring: builds moves (evidence: `tools/build-anims.js`)
- Rig retargeting → Skeleton sampling: computes transforms (evidence: `tools/lib/retarget.js`)
- Move authoring → Skeleton sampling: computes poses (evidence: `tools/lib/moves.js`)
