# heunell/maple architecture

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

- Interactive diagram: https://gitdiagram.com/heunell/maple
- Repository: https://github.com/heunell/maple

## Overview

Maple is a 2D game engine and game application, with a sample Lucid boss encounter. The runtime starts a windowed game, initializes engine services, loads a world/map, then repeatedly ticks input and world logic, checks collisions, and renders world and UI. The graph emphasizes that orchestration and the documented map, asset, shader, collision, and rendering subsystems. Many gameplay and UI implementations are unsampled; their paths come from the tree, and uncertain connections are omitted rather than inferred.

Main entry points: [`Maple/Core/GameEngine.cpp`](https://github.com/heunell/maple/blob/master/Maple/Core/GameEngine.cpp) (Game Engine), [`Maple/World/MapManager.cpp`](https://github.com/heunell/maple/blob/master/Maple/World/MapManager.cpp) (Map Manager), [`Maple/World/World.h`](https://github.com/heunell/maple/blob/master/Maple/World/World.h) (World), [`Maple/Render/RenderManager.cpp`](https://github.com/heunell/maple/blob/master/Maple/Render/RenderManager.cpp) (Render Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Engine Runtime"]
  node_game_engine["Game Engine<br/>[GameEngine.cpp]"]
end

subgraph group_world["World Gameplay"]
  node_world["World<br/>[World.h]"]
  node_level["Level<br/>[Level.h]"]
  node_map_manager["Map Manager<br/>[MapManager.cpp]"]
  node_actor["Actors<br/>[Actor.h]"]
  node_player_controller["Player Controller"]
  node_player["Player Character<br/>[Player.cpp]"]
  node_bosses["Boss Encounters<br/>[Boss.cpp]"]
  node_maps["Lucid Maps<br/>[LucidPhase1.cpp]"]
  node_skills["Skills<br/>[Skill.cpp]"]
  node_ui["Game UI<br/>[UI.cpp]"]
end

subgraph group_services["Engine Services"]
  node_input["Input System<br/>[InputSystem.h]"]
  node_assets["Asset Management<br/>[AssetManager.h]"]
  node_animation["Animation"]
  node_collision["Collision Manager"]
  node_collision_profiles["Collision Profiles"]
end

subgraph group_presentation["Rendering"]
  node_device["Graphics Device<br/>[Device.h]"]
  node_render_manager["Render Manager<br/>[RenderManager.cpp]"]
  node_scene_components["Scene Components<br/>[SceneComponent.cpp]"]
  node_render_states["Render States"]
  node_shaders["Shader Manager<br/>[ShaderManager.cpp]"]
end

node_player_actor(("Player"))

node_game_engine -->|"initializes"| node_world
node_game_engine -->|"ticks"| node_world
node_game_engine -->|"checks collisions"| node_world
node_game_engine -->|"renders"| node_world
node_game_engine -->|"ticks"| node_input
node_game_engine -->|"initializes"| node_collision_profiles
node_game_engine -->|"initializes"| node_shaders
node_game_engine -->|"initializes"| node_assets
node_game_engine -->|"initializes"| node_device
node_game_engine -->|"ticks and renders"| node_render_manager
node_world -.->|"uses"| node_map_manager
node_map_manager -->|"spawns maps"| node_level
node_map_manager -->|"enables actors"| node_actor
node_map_manager -->|"spawns"| node_maps
node_map_manager -->|"resets battles"| node_bosses
node_player_actor -.->|"controls"| node_player_controller
node_player_controller -.->|"drives"| node_player
node_player -.->|"uses"| node_skills
node_collision -->|"queries"| node_collision_profiles
node_collision -->|"checks owners"| node_actor
node_render_manager -->|"initializes"| node_render_states
node_render_manager -->|"renders"| node_scene_components
node_game_engine -->|"renders UI"| node_ui
node_assets -.->|"loads data"| node_animation
node_render_manager -.->|"uses"| node_shaders
node_scene_components -.->|"uses"| node_animation

click node_game_engine "https://github.com/heunell/maple/blob/master/Maple/Core/GameEngine.cpp"
click node_world "https://github.com/heunell/maple/blob/master/Maple/World/World.h"
click node_level "https://github.com/heunell/maple/blob/master/Maple/World/Level.h"
click node_map_manager "https://github.com/heunell/maple/blob/master/Maple/World/MapManager.cpp"
click node_actor "https://github.com/heunell/maple/blob/master/Maple/Object/Actor.h"
click node_player_controller "https://github.com/heunell/maple/blob/master/Maple/Controller/PlayerController.cpp"
click node_player "https://github.com/heunell/maple/blob/master/Maple/Game/Character/Player.cpp"
click node_bosses "https://github.com/heunell/maple/blob/master/Maple/Game/Monsters/Boss/Boss.cpp"
click node_maps "https://github.com/heunell/maple/blob/master/Maple/Game/Map/Boss/LucidPhase1.cpp"
click node_skills "https://github.com/heunell/maple/blob/master/Maple/Game/Skills/Skill.cpp"
click node_ui "https://github.com/heunell/maple/blob/master/Maple/UI/UI.cpp"
click node_input "https://github.com/heunell/maple/blob/master/Maple/Input/InputSystem.h"
click node_assets "https://github.com/heunell/maple/blob/master/Maple/Core/AssetManager.h"
click node_animation "https://github.com/heunell/maple/blob/master/Maple/Core/AnimationManager.cpp"
click node_collision "https://github.com/heunell/maple/blob/master/Maple/Collision/CollisionManager.cpp"
click node_collision_profiles "https://github.com/heunell/maple/blob/master/Maple/Collision/CollisionProfileManager.h"
click node_device "https://github.com/heunell/maple/blob/master/Maple/Core/Device.h"
click node_render_manager "https://github.com/heunell/maple/blob/master/Maple/Render/RenderManager.cpp"
click node_scene_components "https://github.com/heunell/maple/blob/master/Maple/Component/SceneComponent.cpp"
click node_render_states "https://github.com/heunell/maple/blob/master/Maple/Render/RenderStateManager.cpp"
click node_shaders "https://github.com/heunell/maple/blob/master/Maple/Shader/ShaderManager.cpp"

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_game_engine toneBlue
class node_world,node_level,node_map_manager,node_actor,node_player_controller,node_player,node_bosses,node_maps,node_skills,node_ui toneAmber
class node_input,node_assets,node_animation,node_collision,node_collision_profiles toneMint
class node_device,node_render_manager,node_scene_components,node_render_states,node_shaders toneRose
class node_player_actor toneIndigo
```

## Components

### Engine Runtime

- [Game Engine](https://github.com/heunell/maple/blob/master/Maple/Core/GameEngine.cpp): `Maple/Core/GameEngine.cpp`

### World Gameplay

- [World](https://github.com/heunell/maple/blob/master/Maple/World/World.h): `Maple/World/World.h`
- [Level](https://github.com/heunell/maple/blob/master/Maple/World/Level.h): `Maple/World/Level.h`
- [Map Manager](https://github.com/heunell/maple/blob/master/Maple/World/MapManager.cpp): `Maple/World/MapManager.cpp`
- [Actors](https://github.com/heunell/maple/blob/master/Maple/Object/Actor.h): `Maple/Object/Actor.h`
- [Player Controller](https://github.com/heunell/maple/blob/master/Maple/Controller/PlayerController.cpp): `Maple/Controller/PlayerController.cpp`
- [Player Character](https://github.com/heunell/maple/blob/master/Maple/Game/Character/Player.cpp): `Maple/Game/Character/Player.cpp`
- [Boss Encounters](https://github.com/heunell/maple/blob/master/Maple/Game/Monsters/Boss/Boss.cpp): `Maple/Game/Monsters/Boss/Boss.cpp`
- [Lucid Maps](https://github.com/heunell/maple/blob/master/Maple/Game/Map/Boss/LucidPhase1.cpp): `Maple/Game/Map/Boss/LucidPhase1.cpp`
- [Skills](https://github.com/heunell/maple/blob/master/Maple/Game/Skills/Skill.cpp): `Maple/Game/Skills/Skill.cpp`
- [Game UI](https://github.com/heunell/maple/blob/master/Maple/UI/UI.cpp): `Maple/UI/UI.cpp`

### Engine Services

- [Input System](https://github.com/heunell/maple/blob/master/Maple/Input/InputSystem.h): `Maple/Input/InputSystem.h`
- [Asset Management](https://github.com/heunell/maple/blob/master/Maple/Core/AssetManager.h): `Maple/Core/AssetManager.h`
- [Animation](https://github.com/heunell/maple/blob/master/Maple/Core/AnimationManager.cpp): `Maple/Core/AnimationManager.cpp`
- [Collision Manager](https://github.com/heunell/maple/blob/master/Maple/Collision/CollisionManager.cpp): `Maple/Collision/CollisionManager.cpp`
- [Collision Profiles](https://github.com/heunell/maple/blob/master/Maple/Collision/CollisionProfileManager.h): `Maple/Collision/CollisionProfileManager.h`

### Rendering

- [Graphics Device](https://github.com/heunell/maple/blob/master/Maple/Core/Device.h): `Maple/Core/Device.h`
- [Render Manager](https://github.com/heunell/maple/blob/master/Maple/Render/RenderManager.cpp): `Maple/Render/RenderManager.cpp`
- [Scene Components](https://github.com/heunell/maple/blob/master/Maple/Component/SceneComponent.cpp): `Maple/Component/SceneComponent.cpp`
- [Render States](https://github.com/heunell/maple/blob/master/Maple/Render/RenderStateManager.cpp): `Maple/Render/RenderStateManager.cpp`
- [Shader Manager](https://github.com/heunell/maple/blob/master/Maple/Shader/ShaderManager.cpp): `Maple/Shader/ShaderManager.cpp`

### Other components

- **Player**

## Connections

- Game Engine → World: initializes (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → World: ticks (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → World: checks collisions (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → World: renders (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → Input System: ticks (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → Collision Profiles: initializes (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → Shader Manager: initializes (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → Asset Management: initializes (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → Graphics Device: initializes (evidence: `Maple/Core/GameEngine.cpp`)
- Game Engine → Render Manager: ticks and renders (evidence: `Maple/Core/GameEngine.cpp`)
- World → Map Manager: uses (evidence: `Maple/World/MapManager.cpp`)
- Map Manager → Level: spawns maps (evidence: `Maple/World/MapManager.cpp`)
- Map Manager → Actors: enables actors (evidence: `Maple/World/MapManager.cpp`)
- Map Manager → Lucid Maps: spawns (evidence: `Maple/World/MapManager.cpp`)
- Map Manager → Boss Encounters: resets battles (evidence: `Maple/World/MapManager.cpp`)
- Player → Player Controller: controls
- Player Controller → Player Character: drives
- Player Character → Skills: uses
- Collision Manager → Collision Profiles: queries (evidence: `Maple/Collision/CollisionManager.cpp`)
- Collision Manager → Actors: checks owners (evidence: `Maple/Collision/CollisionManager.cpp`)
- Render Manager → Render States: initializes (evidence: `Maple/Render/RenderManager.cpp`)
- Render Manager → Scene Components: renders (evidence: `Maple/Render/RenderManager.cpp`)
- Game Engine → Game UI: renders UI (evidence: `Maple/Core/GameEngine.cpp`)
- Asset Management → Animation: loads data
- Render Manager → Shader Manager: uses
- Scene Components → Animation: uses
