# quangthienlyoi-ux/meonehero-engine architecture

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

- Interactive diagram: https://gitdiagram.com/quangthienlyoi-ux/meonehero-engine
- Repository: https://github.com/quangthienlyoi-ux/meonehero-engine

## Overview

MNHR-Engine is an alpha low-code 2D game-making engine. The main workflow is authoring a game in the browser-based editor, then generating a playable browser runtime; the README describes 2D game creation, with RPG and 2.5D as future aims. The sampled source is a single, large engine.js file, so editor, runtime, and asset responsibilities are shown as logical areas within that file rather than separate modules. Several capabilities are documented or suggested by excerpts, but unsampled implementation details and the HTML-to-engine wiring are not asserted.

Main entry points: [`engine.js`](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js) (Engine Editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Game Authoring"]
  node_editor["Engine Editor<br/>[engine.js]"]
  node_input["Editor Input<br/>[engine.js]"]
  node_ui_authoring["UI Authoring<br/>[engine.js]"]
  node_hitbox_editor["Hitbox Editor<br/>[engine.js]"]
end

subgraph group_runtime["Game Runtime"]
  node_game_runtime["Generated Runtime<br/>[engine.js]"]
  node_runtime_input["Runtime Input<br/>[engine.js]"]
  node_runtime_ui["Runtime UI<br/>[engine.js]"]
  node_audio["Audio Loading<br/>[engine.js]"]
end

subgraph group_assets["Project Assets"]
  node_project_assets["Project Assets<br/>[engine.js]"]
  node_font_library["Font Library<br/>[engine.js]"]
  node_zip_import["ZIP Import<br/>[engine.js]"]
end

node_creator(("Game Creator"))
node_browser["Browser"]

node_creator -.->|"authors games"| node_editor
node_input -->|"updates state"| node_editor
node_editor -->|"edits hitboxes"| node_hitbox_editor
node_editor -->|"configures UI"| node_ui_authoring
node_editor -->|"generates runtime"| node_game_runtime
node_game_runtime -->|"handles input"| node_runtime_input
node_game_runtime -->|"draws controls"| node_runtime_ui
node_game_runtime -->|"loads audio"| node_audio
node_editor -.->|"manages assets"| node_project_assets
node_editor -->|"imports fonts"| node_font_library
node_font_library -->|"refreshes text"| node_editor
node_zip_import -.->|"reads archive"| node_project_assets
node_browser -.->|"runs game"| node_game_runtime

click node_editor "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_input "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_ui_authoring "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_hitbox_editor "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_game_runtime "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_runtime_input "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_runtime_ui "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_audio "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_project_assets "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_font_library "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js"
click node_zip_import "https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.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_editor,node_input,node_ui_authoring,node_hitbox_editor,node_browser toneBlue
class node_game_runtime,node_runtime_input,node_runtime_ui,node_audio toneAmber
class node_project_assets,node_font_library,node_zip_import toneMint
class node_creator toneIndigo
```

## Components

### Game Authoring

- [Engine Editor](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`
- [Editor Input](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`
- [UI Authoring](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`
- [Hitbox Editor](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`

### Game Runtime

- [Generated Runtime](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`
- [Runtime Input](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`
- [Runtime UI](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`
- [Audio Loading](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`

### Project Assets

- [Project Assets](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`
- [Font Library](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`
- [ZIP Import](https://github.com/quangthienlyoi-ux/meonehero-engine/blob/main/engine.js): `engine.js`

### Other components

- **Game Creator**
- **Browser**

## Connections

- Game Creator → Engine Editor: authors games (evidence: `README.md`)
- Editor Input → Engine Editor: updates state (evidence: `engine.js`)
- Engine Editor → Hitbox Editor: edits hitboxes (evidence: `engine.js`)
- Engine Editor → UI Authoring: configures UI (evidence: `engine.js`)
- Engine Editor → Generated Runtime: generates runtime (evidence: `engine.js`)
- Generated Runtime → Runtime Input: handles input (evidence: `engine.js`)
- Generated Runtime → Runtime UI: draws controls (evidence: `engine.js`)
- Generated Runtime → Audio Loading: loads audio (evidence: `engine.js`)
- Engine Editor → Project Assets: manages assets (evidence: `engine.js`)
- Engine Editor → Font Library: imports fonts (evidence: `engine.js`)
- Font Library → Engine Editor: refreshes text (evidence: `engine.js`)
- ZIP Import → Project Assets: reads archive (evidence: `engine.js`)
- Browser → Generated Runtime: runs game
