# gamesonweb/ia-edition-ai4human architecture

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

- Interactive diagram: https://gitdiagram.com/gamesonweb/ia-edition-ai4human
- Repository: https://github.com/gamesonweb/ia-edition-ai4human

## Overview

BLACKOUT is a BabylonJS 3D action-adventure game. The player starts from the menu, enters the tutorial, and progresses through nine narrative levels; level completion callbacks advance the campaign, with an outro after the final level. Gameplay branches include combat, hacking, identity and access puzzles, and AI-agent scanning. A bonus Tron racing game is also documented. Edges reflect shown imports and callbacks or README-documented capabilities; unsampled implementation details are not inferred.

Main entry points: [`src/main.js`](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/main.js) (Game runtime), [`src/minigame/tron/tronScene.js`](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/tronScene.js) (Tron race scene), [`src/UI/levelComplete.js`](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/levelComplete.js) (Level completion UI), [`src/levels/level6/index.js`](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level6/index.js) (Zone liberation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameflow["Campaign flow"]
  node_runtime["Game runtime<br/>[main.js]"]
  node_tutorial["Tutorial"]
  node_level1["Identity<br/>[index.js]"]
  node_level2["Infiltration<br/>[index.js]"]
  node_level3["Recovery<br/>[index.js]"]
  node_level4["System hack<br/>[index.js]"]
  node_level5["Enemy elimination<br/>[index.js]"]
  node_level6["Zone liberation<br/>[index.js]"]
  node_level7["ML accreditation<br/>[index.js]"]
  node_level8["Agent scanning<br/>[index.js]"]
  node_level9["Factory access<br/>[index.js]"]
end

subgraph group_gameplay["Gameplay systems"]
  node_controls["Player controls<br/>[controls.js]"]
  node_player_model["Player character<br/>[player.js]"]
  node_enemy_ai["Enemy AI<br/>[ennemiIA.js]"]
  node_robot["Infected robot<br/>[robot.js]"]
  node_collectibles["Collectibles<br/>[collectibles.js]"]
end

subgraph group_interface["Player interface"]
  node_menu["Main menu<br/>[mainMenu.js]"]
  node_intro["Intro video<br/>[introVideo.js]"]
  node_outro["Outro video<br/>[outroVideo.js]"]
  node_hacking["Hacking overlays<br/>[hackingOverlay.js]"]
  node_ml_puzzle["ML puzzle overlay<br/>[mlPuzzleOverlay.js]"]
  node_recognition["Recognition HUD"]
  node_frequency["Frequency puzzle"]
  node_level_complete["Level completion UI<br/>[levelComplete.js]"]
  node_map["Minimap<br/>[miniMap.js]"]
end

subgraph group_world["World rendering"]
  node_camera["Camera<br/>[cameraManager.js]"]
  node_sky["Sky and fog<br/>[skyManager.js]"]
  node_chunks["Chunk visibility<br/>[chunkManager.js]"]
end

subgraph group_bonus["Tron bonus game"]
  node_tron["Tron race scene<br/>[tronScene.js]"]
  node_tron_environment["Race environment<br/>[environment.js]"]
  node_ideal_path["Ideal race path<br/>[idealPath.js]"]
  node_race_hud["Race HUD<br/>[hud.js]"]
  node_assistant["AI assistant<br/>[aiAssistant.js]"]
end

node_player(("Player"))

node_player -->|"starts game"| node_menu
node_runtime -->|"sets up"| node_camera
node_runtime -->|"creates"| node_sky
node_runtime -->|"shows"| node_intro
node_runtime -->|"loads"| node_tutorial
node_runtime -->|"loads"| node_level1
node_runtime -->|"loads"| node_level2
node_runtime -->|"loads"| node_level3
node_runtime -->|"loads"| node_level4
node_runtime -->|"loads"| node_level5
node_runtime -->|"loads"| node_level6
node_runtime -->|"loads"| node_level7
node_runtime -->|"loads"| node_level8
node_runtime -->|"loads"| node_level9
node_runtime -->|"shows"| node_outro
node_level1 -->|"uses"| node_collectibles
node_level1 -->|"shows"| node_level_complete
node_level2 -->|"spawns"| node_robot
node_level2 -->|"shows"| node_level_complete
node_level4 -->|"opens"| node_hacking
node_level6 -->|"spawns"| node_enemy_ai
node_level6 -->|"shows"| node_level_complete
node_level6 -->|"opens"| node_hacking
node_level7 -->|"opens"| node_ml_puzzle
node_level7 -->|"shows"| node_level_complete
node_level8 -->|"uses"| node_recognition
node_level8 -->|"opens"| node_frequency
node_level8 -->|"shows"| node_level_complete
node_level9 -->|"shows"| node_level_complete
node_menu -.->|"offers bonus"| node_tron
node_tron -->|"sets up"| node_tron_environment
node_tron -->|"loads path"| node_ideal_path
node_tron -->|"uses"| node_race_hud
node_tron -->|"integrates"| node_assistant
node_tron -->|"configures pause UI"| node_camera

click node_menu "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/mainMenu.js"
click node_runtime "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/main.js"
click node_intro "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/introVideo.js"
click node_tutorial "https://github.com/gamesonweb/ia-edition-ai4human/tree/main/src/levels/tutorial"
click node_level1 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level1/index.js"
click node_level2 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level2/index.js"
click node_level3 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level3/index.js"
click node_level4 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level4/index.js"
click node_level5 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level5/index.js"
click node_level6 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level6/index.js"
click node_level7 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level7/index.js"
click node_level8 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level8/index.js"
click node_level9 "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level9/index.js"
click node_outro "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/outroVideo.js"
click node_controls "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/controls/controls.js"
click node_player_model "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/joueur/player.js"
click node_enemy_ai "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level5/ennemiIA.js"
click node_robot "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level2/robot.js"
click node_hacking "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/hackingOverlay.js"
click node_ml_puzzle "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/mlPuzzleOverlay.js"
click node_recognition "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/aiRecognitionHUD.js"
click node_frequency "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/frequencyOverlay.js"
click node_level_complete "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/levelComplete.js"
click node_map "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/miniMap.js"
click node_camera "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/camera/cameraManager.js"
click node_sky "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/sky/skyManager.js"
click node_chunks "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/scene/chunkManager.js"
click node_collectibles "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/scene/collectibles.js"
click node_tron "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/tronScene.js"
click node_tron_environment "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/environment.js"
click node_ideal_path "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/idealPath.js"
click node_race_hud "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/hud.js"
click node_assistant "https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/extraGame/aiAssistant.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_runtime,node_tutorial,node_level1,node_level2,node_level3,node_level4,node_level5,node_level6,node_level7,node_level8,node_level9 toneBlue
class node_controls,node_player_model,node_enemy_ai,node_robot,node_collectibles toneAmber
class node_menu,node_intro,node_outro,node_hacking,node_ml_puzzle,node_recognition,node_frequency,node_level_complete,node_map toneMint
class node_camera,node_sky,node_chunks toneRose
class node_tron,node_tron_environment,node_ideal_path,node_race_hud,node_assistant,node_player toneIndigo
```

## Components

### Campaign flow

- [Game runtime](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/main.js): `src/main.js`
- [Tutorial](https://github.com/gamesonweb/ia-edition-ai4human/tree/main/src/levels/tutorial): `src/levels/tutorial`
- [Identity](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level1/index.js): `src/levels/level1/index.js`
- [Infiltration](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level2/index.js): `src/levels/level2/index.js`
- [Recovery](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level3/index.js): `src/levels/level3/index.js`
- [System hack](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level4/index.js): `src/levels/level4/index.js`
- [Enemy elimination](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level5/index.js): `src/levels/level5/index.js`
- [Zone liberation](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level6/index.js): `src/levels/level6/index.js`
- [ML accreditation](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level7/index.js): `src/levels/level7/index.js`
- [Agent scanning](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level8/index.js): `src/levels/level8/index.js`
- [Factory access](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level9/index.js): `src/levels/level9/index.js`

### Gameplay systems

- [Player controls](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/controls/controls.js): `src/controls/controls.js`
- [Player character](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/joueur/player.js): `src/joueur/player.js`
- [Enemy AI](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level5/ennemiIA.js): `src/levels/level5/ennemiIA.js`
- [Infected robot](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/levels/level2/robot.js): `src/levels/level2/robot.js`
- [Collectibles](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/scene/collectibles.js): `src/scene/collectibles.js`

### Player interface

- [Main menu](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/mainMenu.js): `src/UI/mainMenu.js`
- [Intro video](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/introVideo.js): `src/UI/introVideo.js`
- [Outro video](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/outroVideo.js): `src/UI/outroVideo.js`
- [Hacking overlays](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/hackingOverlay.js): `src/UI/hackingOverlay.js`
- [ML puzzle overlay](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/mlPuzzleOverlay.js): `src/UI/mlPuzzleOverlay.js`
- [Recognition HUD](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/aiRecognitionHUD.js): `src/UI/aiRecognitionHUD.js`
- [Frequency puzzle](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/frequencyOverlay.js): `src/UI/frequencyOverlay.js`
- [Level completion UI](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/levelComplete.js): `src/UI/levelComplete.js`
- [Minimap](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/UI/miniMap.js): `src/UI/miniMap.js`

### World rendering

- [Camera](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/camera/cameraManager.js): `src/camera/cameraManager.js`
- [Sky and fog](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/sky/skyManager.js): `src/sky/skyManager.js`
- [Chunk visibility](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/scene/chunkManager.js): `src/scene/chunkManager.js`

### Tron bonus game

- [Tron race scene](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/tronScene.js): `src/minigame/tron/tronScene.js`
- [Race environment](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/environment.js): `src/minigame/tron/environment.js`
- [Ideal race path](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/idealPath.js): `src/minigame/tron/idealPath.js`
- [Race HUD](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/minigame/tron/hud.js): `src/minigame/tron/hud.js`
- [AI assistant](https://github.com/gamesonweb/ia-edition-ai4human/blob/main/src/extraGame/aiAssistant.js): `src/extraGame/aiAssistant.js`

### Other components

- **Player**

## Connections

- Player → Main menu: starts game
- Game runtime → Camera: sets up (evidence: `src/main.js`)
- Game runtime → Sky and fog: creates (evidence: `src/main.js`)
- Game runtime → Intro video: shows (evidence: `src/main.js`)
- Game runtime → Tutorial: loads (evidence: `src/main.js`)
- Game runtime → Identity: loads (evidence: `src/main.js`)
- Game runtime → Infiltration: loads (evidence: `src/main.js`)
- Game runtime → Recovery: loads (evidence: `src/main.js`)
- Game runtime → System hack: loads (evidence: `src/main.js`)
- Game runtime → Enemy elimination: loads (evidence: `src/main.js`)
- Game runtime → Zone liberation: loads (evidence: `src/main.js`)
- Game runtime → ML accreditation: loads (evidence: `src/main.js`)
- Game runtime → Agent scanning: loads (evidence: `src/main.js`)
- Game runtime → Factory access: loads (evidence: `src/main.js`)
- Game runtime → Outro video: shows (evidence: `src/main.js`)
- Identity → Collectibles: uses (evidence: `src/levels/level1/index.js`)
- Identity → Level completion UI: shows (evidence: `src/levels/level1/index.js`)
- Infiltration → Infected robot: spawns (evidence: `src/levels/level2/index.js`)
- Infiltration → Level completion UI: shows (evidence: `src/levels/level2/index.js`)
- System hack → Hacking overlays: opens (evidence: `src/levels/level4/index.js`)
- Zone liberation → Enemy AI: spawns (evidence: `src/levels/level6/index.js`)
- Zone liberation → Level completion UI: shows (evidence: `src/levels/level6/index.js`)
- Zone liberation → Hacking overlays: opens (evidence: `src/levels/level6/index.js`)
- ML accreditation → ML puzzle overlay: opens (evidence: `src/levels/level7/index.js`)
- ML accreditation → Level completion UI: shows (evidence: `src/levels/level7/index.js`)
- Agent scanning → Recognition HUD: uses (evidence: `src/levels/level8/index.js`)
- Agent scanning → Frequency puzzle: opens (evidence: `src/levels/level8/index.js`)
- Agent scanning → Level completion UI: shows (evidence: `src/levels/level8/index.js`)
- Factory access → Level completion UI: shows (evidence: `src/levels/level9/index.js`)
- Main menu → Tron race scene: offers bonus
- Tron race scene → Race environment: sets up (evidence: `src/minigame/tron/tronScene.js`)
- Tron race scene → Ideal race path: loads path (evidence: `src/minigame/tron/tronScene.js`)
- Tron race scene → Race HUD: uses (evidence: `src/minigame/tron/tronScene.js`)
- Tron race scene → AI assistant: integrates (evidence: `src/minigame/tron/tronScene.js`)
- Tron race scene → Camera: configures pause UI (evidence: `src/minigame/tron/tronScene.js`)
