# destroysera/firstgame_coincollectgame architecture

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

- Interactive diagram: https://gitdiagram.com/destroysera/firstgame_coincollectgame
- Repository: https://github.com/destroysera/firstgame_coincollectgame

## Overview

This is an Unreal Engine 5 C++ coin-collection game: the documented player loop is move and jump, collect coins, accumulate score before the timer expires, then reach clear or game-over and optionally restart. The tree also contains substantial combat, platforming, and side-scrolling gameplay variants, so they are represented as separate feature branches. The README documents the coin-game behavior; source-index references support only the shown code relationships, and unsampled variant behavior is not inferred as a call chain.

Main entry points: [`Source/MyFirstGame/Variant_Combat/Interfaces/CombatDamageable.h`](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/Interfaces/CombatDamageable.h) (Combat Interfaces), [`Source/MyFirstGame/MyFirstGameGameMode.cpp`](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyFirstGameGameMode.cpp) (Score and Timer), [`Source/MyFirstGame/Variant_SideScrolling/SideScrollingCharacter.cpp`](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/SideScrollingCharacter.cpp) (Side-Scrolling Character), [`Source/MyFirstGame/Variant_Combat/CombatCharacter.cpp`](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/CombatCharacter.cpp) (Combat Character)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Coin Game"]
  node_gameplay["Movement and Collection"]
  node_coin["Coin Actor<br/>[Coin.cpp]"]
  node_rules["Score and Timer"]
  node_hud["Score and Time HUD<br/>[MyHUD.cpp]"]
  node_input["Input Controller"]
end

subgraph group_combat["Combat Variant"]
  node_combat_character["Combat Character"]
  node_combat_controller["Combat Controller"]
  node_combat_enemy["Combat Enemy<br/>[CombatEnemy.h]"]
  node_combat_ai["Combat AI"]
  node_combat_interfaces["Combat Interfaces<br/>[CombatDamageable.h]"]
  node_combat_damagebox["Damageable Box"]
  node_combat_notify["Attack Notifies"]
end

subgraph group_platform["Platforming Variant"]
  node_platform_character["Platforming Character"]
  node_platform_controller["Platforming Controller"]
  node_platform_dash["Dash Notify"]
end

subgraph group_side["Side-Scrolling Variant"]
  node_side_character["Side-Scrolling Character"]
  node_side_controller["Side-Scrolling Controller"]
  node_side_camera["Side-Scrolling Camera"]
  node_side_interactables["Side-Scrolling Objects"]
  node_side_interface["Interactable Interface"]
  node_side_ui["Side-Scrolling UI"]
end

node_player(("Player"))

node_player -->|"moves and jumps"| node_gameplay
node_player -->|"collects"| node_coin
node_coin -->|"updates score"| node_rules
node_rules -->|"shows score and time"| node_hud
node_player -->|"uses controls"| node_input
node_player -->|"restarts"| node_rules
node_combat_character -->|"implements"| node_combat_interfaces
node_combat_enemy -->|"implements"| node_combat_interfaces
node_combat_damagebox -->|"implements"| node_combat_interfaces
node_combat_character -->|"uses controller"| node_combat_controller
node_combat_notify -->|"calls attack interface"| node_combat_interfaces
node_platform_controller -->|"spawns and possesses"| node_platform_character
node_platform_dash -->|"references character"| node_platform_character
node_side_controller -->|"spawns and possesses"| node_side_character
node_side_camera -.->|"tracks pawn"| node_side_character
node_side_interactables -->|"references character"| node_side_character
node_side_interactables -->|"references interface"| node_side_interface

click node_gameplay "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyFirstGameCharacter.cpp"
click node_coin "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Coin.cpp"
click node_rules "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyFirstGameGameMode.cpp"
click node_hud "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyHUD.cpp"
click node_input "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyFirstGamePlayerController.cpp"
click node_combat_character "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/CombatCharacter.cpp"
click node_combat_controller "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/CombatPlayerController.cpp"
click node_combat_enemy "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/AI/CombatEnemy.h"
click node_combat_ai "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/AI/CombatAIController.cpp"
click node_combat_interfaces "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/Interfaces/CombatDamageable.h"
click node_combat_damagebox "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/Gameplay/CombatDamageableBox.cpp"
click node_combat_notify "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/Animation/AnimNotify_DoAttackTrace.cpp"
click node_platform_character "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Platforming/PlatformingCharacter.cpp"
click node_platform_controller "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Platforming/PlatformingPlayerController.cpp"
click node_platform_dash "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Platforming/Animation/AnimNotify_EndDash.cpp"
click node_side_character "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/SideScrollingCharacter.cpp"
click node_side_controller "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/SideScrollingPlayerController.cpp"
click node_side_camera "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/SideScrollingCameraManager.cpp"
click node_side_interactables "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/Gameplay/SideScrollingSoftPlatform.cpp"
click node_side_interface "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/Interfaces/SideScrollingInteractable.h"
click node_side_ui "https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/UI/SideScrollingUI.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_gameplay,node_coin,node_rules,node_hud,node_input toneBlue
class node_combat_character,node_combat_controller,node_combat_enemy,node_combat_ai,node_combat_interfaces,node_combat_damagebox,node_combat_notify toneAmber
class node_platform_character,node_platform_controller,node_platform_dash toneMint
class node_side_character,node_side_controller,node_side_camera,node_side_interactables,node_side_interface,node_side_ui toneRose
class node_player toneIndigo
```

## Components

### Coin Game

- [Movement and Collection](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyFirstGameCharacter.cpp): `Source/MyFirstGame/MyFirstGameCharacter.cpp`
- [Coin Actor](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Coin.cpp): `Source/MyFirstGame/Coin.cpp`
- [Score and Timer](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyFirstGameGameMode.cpp): `Source/MyFirstGame/MyFirstGameGameMode.cpp`
- [Score and Time HUD](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyHUD.cpp): `Source/MyFirstGame/MyHUD.cpp`
- [Input Controller](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/MyFirstGamePlayerController.cpp): `Source/MyFirstGame/MyFirstGamePlayerController.cpp`

### Combat Variant

- [Combat Character](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/CombatCharacter.cpp): `Source/MyFirstGame/Variant_Combat/CombatCharacter.cpp`
- [Combat Controller](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/CombatPlayerController.cpp): `Source/MyFirstGame/Variant_Combat/CombatPlayerController.cpp`
- [Combat Enemy](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/AI/CombatEnemy.h): `Source/MyFirstGame/Variant_Combat/AI/CombatEnemy.h`
- [Combat AI](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/AI/CombatAIController.cpp): `Source/MyFirstGame/Variant_Combat/AI/CombatAIController.cpp`
- [Combat Interfaces](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/Interfaces/CombatDamageable.h): `Source/MyFirstGame/Variant_Combat/Interfaces/CombatDamageable.h`
- [Damageable Box](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/Gameplay/CombatDamageableBox.cpp): `Source/MyFirstGame/Variant_Combat/Gameplay/CombatDamageableBox.cpp`
- [Attack Notifies](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Combat/Animation/AnimNotify_DoAttackTrace.cpp): `Source/MyFirstGame/Variant_Combat/Animation/AnimNotify_DoAttackTrace.cpp`

### Platforming Variant

- [Platforming Character](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Platforming/PlatformingCharacter.cpp): `Source/MyFirstGame/Variant_Platforming/PlatformingCharacter.cpp`
- [Platforming Controller](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Platforming/PlatformingPlayerController.cpp): `Source/MyFirstGame/Variant_Platforming/PlatformingPlayerController.cpp`
- [Dash Notify](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_Platforming/Animation/AnimNotify_EndDash.cpp): `Source/MyFirstGame/Variant_Platforming/Animation/AnimNotify_EndDash.cpp`

### Side-Scrolling Variant

- [Side-Scrolling Character](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/SideScrollingCharacter.cpp): `Source/MyFirstGame/Variant_SideScrolling/SideScrollingCharacter.cpp`
- [Side-Scrolling Controller](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/SideScrollingPlayerController.cpp): `Source/MyFirstGame/Variant_SideScrolling/SideScrollingPlayerController.cpp`
- [Side-Scrolling Camera](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/SideScrollingCameraManager.cpp): `Source/MyFirstGame/Variant_SideScrolling/SideScrollingCameraManager.cpp`
- [Side-Scrolling Objects](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/Gameplay/SideScrollingSoftPlatform.cpp): `Source/MyFirstGame/Variant_SideScrolling/Gameplay/SideScrollingSoftPlatform.cpp`
- [Interactable Interface](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/Interfaces/SideScrollingInteractable.h): `Source/MyFirstGame/Variant_SideScrolling/Interfaces/SideScrollingInteractable.h`
- [Side-Scrolling UI](https://github.com/destroysera/firstgame_coincollectgame/blob/main/Source/MyFirstGame/Variant_SideScrolling/UI/SideScrollingUI.cpp): `Source/MyFirstGame/Variant_SideScrolling/UI/SideScrollingUI.cpp`

### Other components

- **Player**

## Connections

- Player → Movement and Collection: moves and jumps
- Player → Coin Actor: collects
- Coin Actor → Score and Timer: updates score
- Score and Timer → Score and Time HUD: shows score and time
- Player → Input Controller: uses controls
- Player → Score and Timer: restarts
- Combat Character → Combat Interfaces: implements
- Combat Enemy → Combat Interfaces: implements (evidence: `Source/MyFirstGame/Variant_Combat/AI/CombatEnemy.h`)
- Damageable Box → Combat Interfaces: implements
- Combat Character → Combat Controller: uses controller (evidence: `Source/MyFirstGame/Variant_Combat/CombatCharacter.cpp`)
- Attack Notifies → Combat Interfaces: calls attack interface
- Platforming Controller → Platforming Character: spawns and possesses (evidence: `Source/MyFirstGame/Variant_Platforming/PlatformingPlayerController.cpp`)
- Dash Notify → Platforming Character: references character (evidence: `Source/MyFirstGame/Variant_Platforming/Animation/AnimNotify_EndDash.cpp`)
- Side-Scrolling Controller → Side-Scrolling Character: spawns and possesses (evidence: `Source/MyFirstGame/Variant_SideScrolling/SideScrollingPlayerController.cpp`)
- Side-Scrolling Camera → Side-Scrolling Character: tracks pawn
- Side-Scrolling Objects → Side-Scrolling Character: references character (evidence: `Source/MyFirstGame/Variant_SideScrolling/Gameplay/SideScrollingSoftPlatform.cpp`)
- Side-Scrolling Objects → Interactable Interface: references interface
