# doqin/dx9gf architecture

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

- Interactive diagram: https://gitdiagram.com/doqin/dx9gf
- Repository: https://github.com/doqin/dx9gf

## Overview

This is a DirectX 9 game framework: a game runs through the application and scene abstractions, with input, rendering, audio, and optional game-object facilities supporting runtime behavior. The tree also bundles Taskflow, tmxlite, and nlohmann/json headers. The README describes the framework and demo at a high level but not their detailed runtime wiring; several core implementations were not sampled, so only directly supported relationships are shown.

Main entry points: [`includes/taskflow/algorithm/pipeline.hpp`](https://github.com/doqin/dx9gf/blob/master/includes/taskflow/algorithm/pipeline.hpp) (Task pipelines), [`includes/taskflow/taskflow.hpp`](https://github.com/doqin/dx9gf/blob/master/includes/taskflow/taskflow.hpp) (Taskflow API), [`core/DX9GFApplication.cpp`](https://github.com/doqin/dx9gf/blob/master/core/DX9GFApplication.cpp) (Application), [`core/DX9GFSceneManager.cpp`](https://github.com/doqin/dx9gf/blob/master/core/DX9GFSceneManager.cpp) (Scene manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Framework runtime"]
  node_application["Application"]
  node_game["Game interface<br/>[DX9GFIGame.h]"]
  node_scenes["Scene manager"]
  node_scene["Scene interface<br/>[DX9GFIScene.h]"]
  node_audio["Audio manager"]
end

subgraph group_graphics["Graphics and input"]
  node_input["Input manager"]
  node_graphics_device["Graphics device"]
  node_sprites["Sprites and fonts<br/>[DX9GFSprites.cpp]"]
  node_camera["Camera<br/>[DX9GFCamera.cpp]"]
  node_texture["Texture<br/>[DX9GFTexture.cpp]"]
end

subgraph group_extras["Game extras"]
  node_colliders["Collider manager"]
  node_collider_types["Collider types<br/>[DX9GFICollider.cpp]"]
  node_transforms["Transform manager"]
  node_objects["Game objects"]
  node_commands["Command system"]
  node_maps["Maps and layers<br/>[DX9GFMap.cpp]"]
  node_particles["Particle system"]
  node_save["Save manager"]
end

subgraph group_dependencies["Bundled libraries"]
  node_taskflow["Taskflow API<br/>[taskflow.hpp]"]
  node_executor["Task executor<br/>[executor.hpp]"]
  node_pipeline["Task pipelines<br/>[pipeline.hpp]"]
  node_data_pipeline["Data pipelines<br/>[data_pipeline.hpp]"]
  node_tmxlite["TMX map types<br/>[Map.hpp]"]
  node_json["JSON library<br/>[json.hpp]"]
end

node_developer(("Game developer"))

node_developer -->|"implements game with"| node_application
node_application -->|"uses interface"| node_game
node_scenes -->|"manages scenes"| node_scene
node_scenes -->|"references application"| node_application
node_input -->|"draws cursor"| node_sprites
node_input -->|"converts coordinates"| node_camera
node_colliders -->|"uses colliders"| node_collider_types
node_taskflow -->|"includes"| node_executor
node_taskflow -->|"exposes algorithms"| node_pipeline
node_pipeline -->|"builds task graph"| node_taskflow
node_data_pipeline -->|"uses pipeline types"| node_pipeline
node_pipeline -->|"runs taskflow"| node_executor

click node_application "https://github.com/doqin/dx9gf/blob/master/core/DX9GFApplication.cpp"
click node_game "https://github.com/doqin/dx9gf/blob/master/core/DX9GFIGame.h"
click node_scenes "https://github.com/doqin/dx9gf/blob/master/core/DX9GFSceneManager.cpp"
click node_scene "https://github.com/doqin/dx9gf/blob/master/core/DX9GFIScene.h"
click node_audio "https://github.com/doqin/dx9gf/blob/master/core/DX9GFAudioManager.cpp"
click node_input "https://github.com/doqin/dx9gf/blob/master/core/DX9GFInputManager.cpp"
click node_graphics_device "https://github.com/doqin/dx9gf/blob/master/core/DX9GFGraphicsDevice.cpp"
click node_sprites "https://github.com/doqin/dx9gf/blob/master/core/DX9GFSprites.cpp"
click node_camera "https://github.com/doqin/dx9gf/blob/master/core/DX9GFCamera.cpp"
click node_texture "https://github.com/doqin/dx9gf/blob/master/core/DX9GFTexture.cpp"
click node_colliders "https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFColliderManager.cpp"
click node_collider_types "https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFICollider.cpp"
click node_transforms "https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFTransformManager.cpp"
click node_objects "https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFIGameObject.cpp"
click node_commands "https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFCommandBuffer.cpp"
click node_maps "https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFMap.cpp"
click node_particles "https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFParticleSystem.cpp"
click node_save "https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFSaveManager.cpp"
click node_taskflow "https://github.com/doqin/dx9gf/blob/master/includes/taskflow/taskflow.hpp"
click node_executor "https://github.com/doqin/dx9gf/blob/master/includes/taskflow/core/executor.hpp"
click node_pipeline "https://github.com/doqin/dx9gf/blob/master/includes/taskflow/algorithm/pipeline.hpp"
click node_data_pipeline "https://github.com/doqin/dx9gf/blob/master/includes/taskflow/algorithm/data_pipeline.hpp"
click node_tmxlite "https://github.com/doqin/dx9gf/blob/master/includes/tmxlite/Map.hpp"
click node_json "https://github.com/doqin/dx9gf/blob/master/includes/nlohmann/json.hpp"

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_application,node_game,node_scenes,node_scene,node_audio toneBlue
class node_input,node_graphics_device,node_sprites,node_camera,node_texture toneAmber
class node_colliders,node_collider_types,node_transforms,node_objects,node_commands,node_maps,node_particles,node_save toneMint
class node_taskflow,node_executor,node_pipeline,node_data_pipeline,node_tmxlite,node_json toneRose
class node_developer toneIndigo
```

## Components

### Framework runtime

- [Application](https://github.com/doqin/dx9gf/blob/master/core/DX9GFApplication.cpp): `core/DX9GFApplication.cpp`
- [Game interface](https://github.com/doqin/dx9gf/blob/master/core/DX9GFIGame.h): `core/DX9GFIGame.h`
- [Scene manager](https://github.com/doqin/dx9gf/blob/master/core/DX9GFSceneManager.cpp): `core/DX9GFSceneManager.cpp`
- [Scene interface](https://github.com/doqin/dx9gf/blob/master/core/DX9GFIScene.h): `core/DX9GFIScene.h`
- [Audio manager](https://github.com/doqin/dx9gf/blob/master/core/DX9GFAudioManager.cpp): `core/DX9GFAudioManager.cpp`

### Graphics and input

- [Input manager](https://github.com/doqin/dx9gf/blob/master/core/DX9GFInputManager.cpp): `core/DX9GFInputManager.cpp`
- [Graphics device](https://github.com/doqin/dx9gf/blob/master/core/DX9GFGraphicsDevice.cpp): `core/DX9GFGraphicsDevice.cpp`
- [Sprites and fonts](https://github.com/doqin/dx9gf/blob/master/core/DX9GFSprites.cpp): `core/DX9GFSprites.cpp`
- [Camera](https://github.com/doqin/dx9gf/blob/master/core/DX9GFCamera.cpp): `core/DX9GFCamera.cpp`
- [Texture](https://github.com/doqin/dx9gf/blob/master/core/DX9GFTexture.cpp): `core/DX9GFTexture.cpp`

### Game extras

- [Collider manager](https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFColliderManager.cpp): `core/DX9GFExtras/DX9GFColliderManager.cpp`
- [Collider types](https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFICollider.cpp): `core/DX9GFExtras/DX9GFICollider.cpp`
- [Transform manager](https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFTransformManager.cpp): `core/DX9GFExtras/DX9GFTransformManager.cpp`
- [Game objects](https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFIGameObject.cpp): `core/DX9GFExtras/DX9GFIGameObject.cpp`
- [Command system](https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFCommandBuffer.cpp): `core/DX9GFExtras/DX9GFCommandBuffer.cpp`
- [Maps and layers](https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFMap.cpp): `core/DX9GFExtras/DX9GFMap.cpp`
- [Particle system](https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFParticleSystem.cpp): `core/DX9GFExtras/DX9GFParticleSystem.cpp`
- [Save manager](https://github.com/doqin/dx9gf/blob/master/core/DX9GFExtras/DX9GFSaveManager.cpp): `core/DX9GFExtras/DX9GFSaveManager.cpp`

### Bundled libraries

- [Taskflow API](https://github.com/doqin/dx9gf/blob/master/includes/taskflow/taskflow.hpp): `includes/taskflow/taskflow.hpp`
- [Task executor](https://github.com/doqin/dx9gf/blob/master/includes/taskflow/core/executor.hpp): `includes/taskflow/core/executor.hpp`
- [Task pipelines](https://github.com/doqin/dx9gf/blob/master/includes/taskflow/algorithm/pipeline.hpp): `includes/taskflow/algorithm/pipeline.hpp`
- [Data pipelines](https://github.com/doqin/dx9gf/blob/master/includes/taskflow/algorithm/data_pipeline.hpp): `includes/taskflow/algorithm/data_pipeline.hpp`
- [TMX map types](https://github.com/doqin/dx9gf/blob/master/includes/tmxlite/Map.hpp): `includes/tmxlite/Map.hpp`
- [JSON library](https://github.com/doqin/dx9gf/blob/master/includes/nlohmann/json.hpp): `includes/nlohmann/json.hpp`

### Other components

- **Game developer**

## Connections

- Game developer → Application: implements game with
- Application → Game interface: uses interface
- Scene manager → Scene interface: manages scenes (evidence: `core/DX9GFSceneManager.cpp`)
- Scene manager → Application: references application (evidence: `core/DX9GFSceneManager.cpp`)
- Input manager → Sprites and fonts: draws cursor (evidence: `core/DX9GFInputManager.cpp`)
- Input manager → Camera: converts coordinates (evidence: `core/DX9GFInputManager.cpp`)
- Collider manager → Collider types: uses colliders
- Taskflow API → Task executor: includes (evidence: `includes/taskflow/taskflow.hpp`)
- Taskflow API → Task pipelines: exposes algorithms (evidence: `includes/taskflow/taskflow.hpp`)
- Task pipelines → Taskflow API: builds task graph (evidence: `includes/taskflow/algorithm/pipeline.hpp`)
- Data pipelines → Task pipelines: uses pipeline types (evidence: `includes/taskflow/algorithm/data_pipeline.hpp`)
- Task pipelines → Task executor: runs taskflow (evidence: `includes/taskflow/algorithm/pipeline.hpp`)
