# jkpan/vfighter architecture

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

- Interactive diagram: https://gitdiagram.com/jkpan/vfighter
- Repository: https://github.com/jkpan/vfighter

## Overview

The source tree and sampled C# files describe a Godot space-combat game, not the TexturePacker importer described by the README. The diagram follows the available game code; several flow and gameplay modules are unsampled, so their internal wiring is not inferred.

Main entry points: [`src/abstract/GameItem.cs`](https://github.com/jkpan/vfighter/blob/main/src/abstract/GameItem.cs) (GameItem), [`src/gadget/ExpObj.cs`](https://github.com/jkpan/vfighter/blob/main/src/gadget/ExpObj.cs) (ExpObj), [`src/Main.cs`](https://github.com/jkpan/vfighter/blob/main/src/Main.cs) (Main), [`src/player/v2/MinigunEquip.cs`](https://github.com/jkpan/vfighter/blob/main/src/player/v2/MinigunEquip.cs) (MinigunEquip)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Game flow"]
  node_main["Main<br/>[Main.cs]"]
  node_title["TitleScene<br/>[TitleScene.cs]"]
  node_game["GameScene<br/>[GameScene.cs]"]
  node_scene["Scene<br/>[Scene.cs]"]
end

subgraph group_combat["Combat units"]
  node_fighter["VFighter<br/>[VFighter.cs]"]
  node_equip["Equipment<br/>[Equip.cs]"]
  node_minigun["MinigunEquip<br/>[MinigunEquip.cs]"]
  node_bullet["Bullet<br/>[Bullet.cs]"]
  node_weapon["Weapon<br/>[Weapon.cs]"]
  node_gameitem["GameItem<br/>[GameItem.cs]"]
  node_enemyitem["EnemyItem<br/>[EnemyItem.cs]"]
  node_playeritem["PlayerItem<br/>[PlayerItem.cs]"]
  node_tail["Tail<br/>[Tail.cs]"]
  node_parabolic["Parabolic<br/>[Parabolic.cs]"]
end

subgraph group_world["World and effects"]
  node_planet["Planet<br/>[Planet.cs]"]
  node_gadget["Gadget<br/>[Gadget.cs]"]
  node_explosion["ExpObj<br/>[ExpObj.cs]"]
  node_sphere["Sphere<br/>[Sphere.cs]"]
  node_bezier["BezierPlasma<br/>[BezierPlasma.cs]"]
  node_quadwarp["QuadWarp<br/>[QuadWarp.cs]"]
end

subgraph group_shared["Shared runtime"]
  node_res["Res<br/>[Res.cs]"]
  node_math["VMath<br/>[VMath.cs]"]
  node_sound["SoundManager<br/>[SoundManager.cs]"]
end

node_user(("Player"))

node_user -->|"controls"| node_fighter
node_main -->|"creates"| node_game
node_main -->|"can create"| node_title
node_fighter -->|"creates equipment"| node_equip
node_minigun -->|"fires"| node_bullet
node_minigun -->|"creates flash"| node_explosion
node_tail -->|"searches targets"| node_scene
node_bezier -->|"adds effects"| node_scene
node_bezier -->|"creates"| node_quadwarp
node_parabolic -->|"creates"| node_sphere
node_gameitem -->|"loads resources"| node_res
node_explosion -->|"loads frames"| node_res
node_explosion -->|"uses utilities"| node_math
node_weapon -->|"inherits"| node_gameitem
node_enemyitem -->|"inherits"| node_gameitem
node_playeritem -->|"inherits"| node_gameitem

click node_main "https://github.com/jkpan/vfighter/blob/main/src/Main.cs"
click node_title "https://github.com/jkpan/vfighter/blob/main/src/flow/TitleScene.cs"
click node_game "https://github.com/jkpan/vfighter/blob/main/src/flow/GameScene.cs"
click node_scene "https://github.com/jkpan/vfighter/blob/main/src/flow/Scene.cs"
click node_fighter "https://github.com/jkpan/vfighter/blob/main/src/player/VFighter.cs"
click node_equip "https://github.com/jkpan/vfighter/blob/main/src/player/Equip.cs"
click node_minigun "https://github.com/jkpan/vfighter/blob/main/src/player/v2/MinigunEquip.cs"
click node_bullet "https://github.com/jkpan/vfighter/blob/main/src/player/v2/Bullet.cs"
click node_weapon "https://github.com/jkpan/vfighter/blob/main/src/weapon/Weapon.cs"
click node_gameitem "https://github.com/jkpan/vfighter/blob/main/src/abstract/GameItem.cs"
click node_enemyitem "https://github.com/jkpan/vfighter/blob/main/src/abstract/EnemyItem.cs"
click node_playeritem "https://github.com/jkpan/vfighter/blob/main/src/abstract/PlayerItem.cs"
click node_tail "https://github.com/jkpan/vfighter/blob/main/src/player/Tail.cs"
click node_parabolic "https://github.com/jkpan/vfighter/blob/main/src/weapon/Parabolic.cs"
click node_planet "https://github.com/jkpan/vfighter/blob/main/src/gadget/Planet.cs"
click node_gadget "https://github.com/jkpan/vfighter/blob/main/src/gadget/Gadget.cs"
click node_explosion "https://github.com/jkpan/vfighter/blob/main/src/gadget/ExpObj.cs"
click node_sphere "https://github.com/jkpan/vfighter/blob/main/src/gadget/Sphere.cs"
click node_bezier "https://github.com/jkpan/vfighter/blob/main/src/player/v3/BezierPlasma.cs"
click node_quadwarp "https://github.com/jkpan/vfighter/blob/main/src/player/v3/QuadWarp.cs"
click node_res "https://github.com/jkpan/vfighter/blob/main/src/Res.cs"
click node_math "https://github.com/jkpan/vfighter/blob/main/src/VMath.cs"
click node_sound "https://github.com/jkpan/vfighter/blob/main/src/SoundManager.cs"

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_main,node_title,node_game,node_scene toneBlue
class node_fighter,node_equip,node_minigun,node_bullet,node_weapon,node_gameitem,node_enemyitem,node_playeritem,node_tail,node_parabolic toneAmber
class node_planet,node_gadget,node_explosion,node_sphere,node_bezier,node_quadwarp toneMint
class node_res,node_math,node_sound toneRose
class node_user toneIndigo
```

## Components

### Game flow

- [Main](https://github.com/jkpan/vfighter/blob/main/src/Main.cs): `src/Main.cs`
- [TitleScene](https://github.com/jkpan/vfighter/blob/main/src/flow/TitleScene.cs): `src/flow/TitleScene.cs`
- [GameScene](https://github.com/jkpan/vfighter/blob/main/src/flow/GameScene.cs): `src/flow/GameScene.cs`
- [Scene](https://github.com/jkpan/vfighter/blob/main/src/flow/Scene.cs): `src/flow/Scene.cs`

### Combat units

- [VFighter](https://github.com/jkpan/vfighter/blob/main/src/player/VFighter.cs): `src/player/VFighter.cs`
- [Equipment](https://github.com/jkpan/vfighter/blob/main/src/player/Equip.cs): `src/player/Equip.cs`
- [MinigunEquip](https://github.com/jkpan/vfighter/blob/main/src/player/v2/MinigunEquip.cs): `src/player/v2/MinigunEquip.cs`
- [Bullet](https://github.com/jkpan/vfighter/blob/main/src/player/v2/Bullet.cs): `src/player/v2/Bullet.cs`
- [Weapon](https://github.com/jkpan/vfighter/blob/main/src/weapon/Weapon.cs): `src/weapon/Weapon.cs`
- [GameItem](https://github.com/jkpan/vfighter/blob/main/src/abstract/GameItem.cs): `src/abstract/GameItem.cs`
- [EnemyItem](https://github.com/jkpan/vfighter/blob/main/src/abstract/EnemyItem.cs): `src/abstract/EnemyItem.cs`
- [PlayerItem](https://github.com/jkpan/vfighter/blob/main/src/abstract/PlayerItem.cs): `src/abstract/PlayerItem.cs`
- [Tail](https://github.com/jkpan/vfighter/blob/main/src/player/Tail.cs): `src/player/Tail.cs`
- [Parabolic](https://github.com/jkpan/vfighter/blob/main/src/weapon/Parabolic.cs): `src/weapon/Parabolic.cs`

### World and effects

- [Planet](https://github.com/jkpan/vfighter/blob/main/src/gadget/Planet.cs): `src/gadget/Planet.cs`
- [Gadget](https://github.com/jkpan/vfighter/blob/main/src/gadget/Gadget.cs): `src/gadget/Gadget.cs`
- [ExpObj](https://github.com/jkpan/vfighter/blob/main/src/gadget/ExpObj.cs): `src/gadget/ExpObj.cs`
- [Sphere](https://github.com/jkpan/vfighter/blob/main/src/gadget/Sphere.cs): `src/gadget/Sphere.cs`
- [BezierPlasma](https://github.com/jkpan/vfighter/blob/main/src/player/v3/BezierPlasma.cs): `src/player/v3/BezierPlasma.cs`
- [QuadWarp](https://github.com/jkpan/vfighter/blob/main/src/player/v3/QuadWarp.cs): `src/player/v3/QuadWarp.cs`

### Shared runtime

- [Res](https://github.com/jkpan/vfighter/blob/main/src/Res.cs): `src/Res.cs`
- [VMath](https://github.com/jkpan/vfighter/blob/main/src/VMath.cs): `src/VMath.cs`
- [SoundManager](https://github.com/jkpan/vfighter/blob/main/src/SoundManager.cs): `src/SoundManager.cs`

### Other components

- **Player**

## Connections

- Player → VFighter: controls
- Main → GameScene: creates
- Main → TitleScene: can create
- VFighter → Equipment: creates equipment
- MinigunEquip → Bullet: fires
- MinigunEquip → ExpObj: creates flash
- Tail → Scene: searches targets
- BezierPlasma → Scene: adds effects
- BezierPlasma → QuadWarp: creates
- Parabolic → Sphere: creates
- GameItem → Res: loads resources
- ExpObj → Res: loads frames
- ExpObj → VMath: uses utilities
- Weapon → GameItem: inherits
- EnemyItem → GameItem: inherits
- PlayerItem → GameItem: inherits
