# roddyd94/directx-portfolio-1 architecture

> Architecture diagram of the GitHub repository roddyd94/directx-portfolio-1, 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/roddyd94/directx-portfolio-1
- Repository: https://github.com/roddyd94/directx-portfolio-1

## Overview

This is a C++/DirectX 11 Snow Bros arcade-game remake. The main runtime loop initializes engine services, creates a world, then repeatedly ticks input and game objects, checks collisions, and renders. The documented gameplay spans stage transitions, solo/local two-player play, player and enemy state machines, snowball interactions, items, and score/UI; engine capabilities also include tilemaps, animation, indexed-color rendering, and binary content loading. Edges are limited to relationships explicit in the sampled engine/animation source or README; unsampled game subsystems are represented without speculative call links.

Main entry points: [`Arcade_pky/Client/Core/GameEngine.cpp`](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/GameEngine.cpp) (Game loop), [`Arcade_pky/Client/Core/RenderManager.cpp`](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/RenderManager.cpp) (Render manager), [`Arcade_pky/Client/Snowbros/SnowbrosLevel.cpp`](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosLevel.cpp) (Stages and transitions), [`Arcade_pky/Client/Snowbros/SnowbrosPlayer.cpp`](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosPlayer.cpp) (Players and states)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Engine Runtime"]
  node_engine["Game loop<br/>[GameEngine.cpp]"]
  node_world["World and actors<br/>[World.cpp]"]
  node_collision["Collision system"]
  node_platform["Platform movement"]
  node_actor["Actor components<br/>[Actor.h]"]
  node_device["DirectX device<br/>[DeviceManager.cpp]"]
end

subgraph group_game["Snow Bros Gameplay"]
  node_player["Players and states<br/>[SnowbrosPlayer.cpp]"]
  node_playerctl["Player control"]
  node_enemy["Enemy AI"]
  node_boss["Boss AI"]
  node_projectiles["Snow projectiles"]
  node_items["Items and score<br/>[Item.cpp]"]
  node_stage["Stages and transitions<br/>[SnowbrosLevel.cpp]"]
  node_parser["Stage data parser"]
end

subgraph group_graphics["Rendering and Content"]
  node_tilemap["Tilemap levels<br/>[TilemapLevel.cpp]"]
  node_render["Render manager<br/>[RenderManager.cpp]"]
  node_animation["2D animation"]
  node_indexed["Indexed sprites"]
  node_resources["Resource managers<br/>[ResourceManager.h]"]
end

subgraph group_interaction["Input and Interface"]
  node_ui["Game HUD<br/>[SnowbrosUI.cpp]"]
  node_input["Input actions<br/>[InputSystem.h]"]
  node_editor["Editor UI<br/>[EditorEngine.cpp]"]
end

node_external(("Player"))

node_engine -->|"creates and ticks"| node_world
node_engine -->|"ticks"| node_input
node_engine -->|"ticks and renders"| node_render
node_engine -.->|"runs world collision"| node_collision
node_engine -->|"initializes and presents"| node_device
node_player -.->|"uses control"| node_playerctl
node_external -.->|"provides controls"| node_input
node_input -->|"drives"| node_playerctl
node_player -.->|"triggers snowball play"| node_enemy
node_enemy -->|"interacts with"| node_projectiles
node_enemy -->|"awards score"| node_items
node_stage -.->|"spawns enemies"| node_enemy
node_stage -.->|"manages stages"| node_player
node_stage -.->|"loads stage data"| node_parser
node_stage -.->|"uses tilemaps"| node_tilemap
node_platform -.->|"checks movement collisions"| node_collision
node_tilemap -.->|"renders tiles"| node_render
node_render -.->|"submits graphics"| node_device
node_render -.->|"renders animation"| node_animation
node_animation -->|"loads textures"| node_resources
node_indexed -.->|"supplies sprite draws"| node_render
node_ui -.->|"draws game UI"| node_render
node_editor -->|"delegates runtime"| node_engine
node_editor -->|"initializes UI backend"| node_device
node_boss -.->|"opposes players"| node_player
node_items -.->|"updates score display"| node_ui

click node_player "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosPlayer.cpp"
click node_playerctl "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Player/PlayerController.cpp"
click node_enemy "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowballMorphableEnemyStateMachine.cpp"
click node_boss "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/BossStateMachine.cpp"
click node_projectiles "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowProjectileComponent.cpp"
click node_items "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Item.cpp"
click node_stage "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosLevel.cpp"
click node_ui "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosUI.cpp"
click node_engine "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/GameEngine.cpp"
click node_world "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/World.cpp"
click node_collision "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/Collision/CollisionManager.cpp"
click node_input "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/Input/InputSystem.h"
click node_platform "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Platformer/PlatformerKinematicComponent.cpp"
click node_tilemap "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Tilemap/TilemapLevel.cpp"
click node_render "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/RenderManager.cpp"
click node_animation "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/Animation/Animation2DManager.cpp"
click node_indexed "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/IndexedSpriteInstanceRenderer.cpp"
click node_resources "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/ResourceManager.h"
click node_parser "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosDataParser.cpp"
click node_actor "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/Actor.h"
click node_device "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/DeviceManager.cpp"
click node_editor "https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Editor/EditorEngine.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_engine,node_world,node_collision,node_platform,node_actor,node_device toneBlue
class node_player,node_playerctl,node_enemy,node_boss,node_projectiles,node_items,node_stage,node_parser toneAmber
class node_tilemap,node_render,node_animation,node_indexed,node_resources toneMint
class node_ui,node_input,node_editor toneRose
class node_external toneIndigo
```

## Components

### Engine Runtime

- [Game loop](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/GameEngine.cpp): `Arcade_pky/Client/Core/GameEngine.cpp`
- [World and actors](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/World.cpp): `Arcade_pky/Client/Core/World.cpp`
- [Collision system](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/Collision/CollisionManager.cpp): `Arcade_pky/Client/Core/Collision/CollisionManager.cpp`
- [Platform movement](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Platformer/PlatformerKinematicComponent.cpp): `Arcade_pky/Client/Platformer/PlatformerKinematicComponent.cpp`
- [Actor components](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/Actor.h): `Arcade_pky/Client/Core/Actor.h`
- [DirectX device](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/DeviceManager.cpp): `Arcade_pky/Client/Core/DeviceManager.cpp`

### Snow Bros Gameplay

- [Players and states](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosPlayer.cpp): `Arcade_pky/Client/Snowbros/SnowbrosPlayer.cpp`
- [Player control](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Player/PlayerController.cpp): `Arcade_pky/Client/Player/PlayerController.cpp`
- [Enemy AI](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowballMorphableEnemyStateMachine.cpp): `Arcade_pky/Client/Snowbros/SnowballMorphableEnemyStateMachine.cpp`
- [Boss AI](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/BossStateMachine.cpp): `Arcade_pky/Client/Snowbros/BossStateMachine.cpp`
- [Snow projectiles](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowProjectileComponent.cpp): `Arcade_pky/Client/Snowbros/SnowProjectileComponent.cpp`
- [Items and score](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Item.cpp): `Arcade_pky/Client/Item.cpp`
- [Stages and transitions](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosLevel.cpp): `Arcade_pky/Client/Snowbros/SnowbrosLevel.cpp`
- [Stage data parser](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosDataParser.cpp): `Arcade_pky/Client/Snowbros/SnowbrosDataParser.cpp`

### Rendering and Content

- [Tilemap levels](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Tilemap/TilemapLevel.cpp): `Arcade_pky/Client/Tilemap/TilemapLevel.cpp`
- [Render manager](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/RenderManager.cpp): `Arcade_pky/Client/Core/RenderManager.cpp`
- [2D animation](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/Animation/Animation2DManager.cpp): `Arcade_pky/Client/Core/Animation/Animation2DManager.cpp`
- [Indexed sprites](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/IndexedSpriteInstanceRenderer.cpp): `Arcade_pky/Client/Snowbros/IndexedSpriteInstanceRenderer.cpp`
- [Resource managers](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/ResourceManager.h): `Arcade_pky/Client/Core/ResourceManager.h`

### Input and Interface

- [Game HUD](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Snowbros/SnowbrosUI.cpp): `Arcade_pky/Client/Snowbros/SnowbrosUI.cpp`
- [Input actions](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Core/Input/InputSystem.h): `Arcade_pky/Client/Core/Input/InputSystem.h`
- [Editor UI](https://github.com/roddyd94/directx-portfolio-1/blob/master/Arcade_pky/Client/Editor/EditorEngine.cpp): `Arcade_pky/Client/Editor/EditorEngine.cpp`

### Other components

- **Player**

## Connections

- Game loop → World and actors: creates and ticks (evidence: `Arcade_pky/Client/Core/GameEngine.cpp`)
- Game loop → Input actions: ticks (evidence: `Arcade_pky/Client/Core/GameEngine.cpp`)
- Game loop → Render manager: ticks and renders (evidence: `Arcade_pky/Client/Core/GameEngine.cpp`)
- Game loop → Collision system: runs world collision
- Game loop → DirectX device: initializes and presents (evidence: `Arcade_pky/Client/Core/GameEngine.cpp`)
- Players and states → Player control: uses control
- Player → Input actions: provides controls
- Input actions → Player control: drives (evidence: `Arcade_pky/Client/Player/PlayerController.cpp`)
- Players and states → Enemy AI: triggers snowball play
- Enemy AI → Snow projectiles: interacts with (evidence: `Arcade_pky/Client/Snowbros/SnowballMorphableEnemyStateMachine.cpp`)
- Enemy AI → Items and score: awards score (evidence: `Arcade_pky/Client/Snowbros/SnowballMorphableEnemyStateMachine.cpp`)
- Stages and transitions → Enemy AI: spawns enemies
- Stages and transitions → Players and states: manages stages
- Stages and transitions → Stage data parser: loads stage data
- Stages and transitions → Tilemap levels: uses tilemaps
- Platform movement → Collision system: checks movement collisions
- Tilemap levels → Render manager: renders tiles
- Render manager → DirectX device: submits graphics
- Render manager → 2D animation: renders animation
- 2D animation → Resource managers: loads textures (evidence: `Arcade_pky/Client/Core/Animation/Animation2DManager.cpp`)
- Indexed sprites → Render manager: supplies sprite draws
- Game HUD → Render manager: draws game UI
- Editor UI → Game loop: delegates runtime (evidence: `Arcade_pky/Client/Editor/EditorEngine.cpp`)
- Editor UI → DirectX device: initializes UI backend (evidence: `Arcade_pky/Client/Editor/EditorEngine.cpp`)
- Boss AI → Players and states: opposes players
- Items and score → Game HUD: updates score display
