# amirgireev/2d-jump-and-run-game architecture

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

- Interactive diagram: https://gitdiagram.com/amirgireev/2d-jump-and-run-game
- Repository: https://github.com/amirgireev/2d-jump-and-run-game

## Overview

This is a Unity 2D platform game, with menu entry, player movement and combat, level hazards and objectives, and completion/progression as its apparent user-to-result workflow. The tree also shows camera, audio, visual effects, and online-high-score features. The README is empty and the only sampled source is generated Burst code, so gameplay connections cannot be verified; dashed edges mark only tentative workflow relationships.

Main entry points: [`Assets/Scripts/PlayerController.cs`](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/PlayerController.cs) (Player Controller), [`Assets/Scripts/MainMenu.cs`](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/MainMenu.cs) (Main Menu), [`Assets/Scripts/Goal.cs`](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Goal.cs) (Level Goal), [`Assets/Scenes`](https://github.com/amirgireev/2d-jump-and-run-game/tree/main/Assets/Scenes) (Game Scenes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Game Entry"]
  node_menu["Main Menu<br/>[MainMenu.cs]"]
  node_controls["Controls Guide<br/>[ControlsGuide.cs]"]
  node_levels["Game Scenes"]
end

subgraph group_gameplay["Player Gameplay"]
  node_controller["Player Controller"]
  node_projectile["Projectile<br/>[Projectile.cs]"]
  node_switch["Shoot Switch<br/>[ShootSwitch.cs]"]
  node_enemy["Enemy<br/>[Enemy.cs]"]
  node_destructible["Destructible<br/>[Destructible.cs]"]
end

subgraph group_world["Level World"]
  node_checkpoint["Checkpoint<br/>[Checkpoint.cs]"]
  node_coin["Coin<br/>[Coin.cs]"]
  node_key["Key Pickup<br/>[KeyPickup.cs]"]
  node_door["Door<br/>[Door.cs]"]
  node_goal["Level Goal<br/>[Goal.cs]"]
  node_spike["Spike Hazard<br/>[Spike.cs]"]
  node_platform["Moving Platform<br/>[MovingPlatform.cs]"]
  node_timer["Level Timer<br/>[LevelTimer.cs]"]
end

subgraph group_presentation["Presentation"]
  node_camera["Camera Follow<br/>[CameraFollow.cs]"]
  node_parallax["Parallax Layer<br/>[ParallaxLayer.cs]"]
  node_vignette["Hit Vignette<br/>[HitVignette.cs]"]
  node_ghost["Teleport Ghost<br/>[TeleportGhost.cs]"]
  node_music["Music Player<br/>[MusicPlayer.cs]"]
end

subgraph group_services["Game Services"]
  node_highscores["Online Highscores"]
end

node_player(("Player"))

node_player -.->|"starts at"| node_menu
node_menu -.->|"enters level"| node_levels
node_player -.->|"controls"| node_controller
node_controller -.->|"fires"| node_projectile
node_controller -.->|"reaches"| node_checkpoint
node_controller -.->|"collects"| node_coin
node_controller -.->|"collects"| node_key
node_controller -.->|"unlocks"| node_door
node_controller -.->|"reaches"| node_goal
node_goal -.->|"may submit"| node_highscores
node_controller -.->|"followed by"| node_camera
node_controller -.->|"may trigger"| node_vignette

click node_menu "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/MainMenu.cs"
click node_controls "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/ControlsGuide.cs"
click node_controller "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/PlayerController.cs"
click node_projectile "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Projectile.cs"
click node_switch "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/ShootSwitch.cs"
click node_enemy "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Enemy.cs"
click node_destructible "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Destructible.cs"
click node_checkpoint "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Checkpoint.cs"
click node_coin "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Coin.cs"
click node_key "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/KeyPickup.cs"
click node_door "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Door.cs"
click node_goal "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Goal.cs"
click node_spike "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Spike.cs"
click node_platform "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/MovingPlatform.cs"
click node_timer "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/LevelTimer.cs"
click node_camera "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/CameraFollow.cs"
click node_parallax "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/ParallaxLayer.cs"
click node_vignette "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/HitVignette.cs"
click node_ghost "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/TeleportGhost.cs"
click node_music "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/MusicPlayer.cs"
click node_highscores "https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/OnlineHighscores.cs"
click node_levels "https://github.com/amirgireev/2d-jump-and-run-game/tree/main/Assets/Scenes"

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_menu,node_controls,node_levels toneBlue
class node_controller,node_projectile,node_switch,node_enemy,node_destructible toneAmber
class node_checkpoint,node_coin,node_key,node_door,node_goal,node_spike,node_platform,node_timer toneMint
class node_camera,node_parallax,node_vignette,node_ghost,node_music toneRose
class node_highscores,node_player toneIndigo
```

## Components

### Game Entry

- [Main Menu](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/MainMenu.cs): `Assets/Scripts/MainMenu.cs`
- [Controls Guide](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/ControlsGuide.cs): `Assets/Scripts/ControlsGuide.cs`
- [Game Scenes](https://github.com/amirgireev/2d-jump-and-run-game/tree/main/Assets/Scenes): `Assets/Scenes`

### Player Gameplay

- [Player Controller](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/PlayerController.cs): `Assets/Scripts/PlayerController.cs`
- [Projectile](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Projectile.cs): `Assets/Scripts/Projectile.cs`
- [Shoot Switch](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/ShootSwitch.cs): `Assets/Scripts/ShootSwitch.cs`
- [Enemy](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Enemy.cs): `Assets/Scripts/Enemy.cs`
- [Destructible](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Destructible.cs): `Assets/Scripts/Destructible.cs`

### Level World

- [Checkpoint](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Checkpoint.cs): `Assets/Scripts/Checkpoint.cs`
- [Coin](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Coin.cs): `Assets/Scripts/Coin.cs`
- [Key Pickup](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/KeyPickup.cs): `Assets/Scripts/KeyPickup.cs`
- [Door](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Door.cs): `Assets/Scripts/Door.cs`
- [Level Goal](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Goal.cs): `Assets/Scripts/Goal.cs`
- [Spike Hazard](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/Spike.cs): `Assets/Scripts/Spike.cs`
- [Moving Platform](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/MovingPlatform.cs): `Assets/Scripts/MovingPlatform.cs`
- [Level Timer](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/LevelTimer.cs): `Assets/Scripts/LevelTimer.cs`

### Presentation

- [Camera Follow](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/CameraFollow.cs): `Assets/Scripts/CameraFollow.cs`
- [Parallax Layer](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/ParallaxLayer.cs): `Assets/Scripts/ParallaxLayer.cs`
- [Hit Vignette](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/HitVignette.cs): `Assets/Scripts/HitVignette.cs`
- [Teleport Ghost](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/TeleportGhost.cs): `Assets/Scripts/TeleportGhost.cs`
- [Music Player](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/MusicPlayer.cs): `Assets/Scripts/MusicPlayer.cs`

### Game Services

- [Online Highscores](https://github.com/amirgireev/2d-jump-and-run-game/blob/main/Assets/Scripts/OnlineHighscores.cs): `Assets/Scripts/OnlineHighscores.cs`

### Other components

- **Player**

## Connections

- Player → Main Menu: starts at
- Main Menu → Game Scenes: enters level
- Player → Player Controller: controls
- Player Controller → Projectile: fires
- Player Controller → Checkpoint: reaches
- Player Controller → Coin: collects
- Player Controller → Key Pickup: collects
- Player Controller → Door: unlocks
- Player Controller → Level Goal: reaches
- Level Goal → Online Highscores: may submit
- Player Controller → Camera Follow: followed by
- Player Controller → Hit Vignette: may trigger
