# ghyeok/dreaming_railway architecture

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

- Interactive diagram: https://gitdiagram.com/ghyeok/dreaming_railway
- Repository: https://github.com/ghyeok/dreaming_railway

## Overview

This is a Unity game centered on a subway-to-dream loop: the shown SubwayCharacter accumulates fatigue, loads DreamScene when it reaches its limit, and can load SubwayScene again when woken. The tree also shows menu, stage-selection, gameplay UI, settings, and presentation assets, plus a SubwayUIManager script; their runtime wiring is not shown. The README is empty, and source evidence is limited to SubwayCharacter.cs, so the diagram omits unverified links and does not assume how UI actions enter the loop.

Main entry points: [`SubwayCharacter.cs`](https://github.com/ghyeok/dreaming_railway/blob/main/SubwayCharacter.cs) (Fatigue and sleep), [`Assets/Resources/Prefabs/Obstacle/Player`](https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Prefabs/Obstacle/Player) (Player), [`Assets/Resources/Prefabs/UIs/Scene/UI_SubwayScene.prefab`](https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_SubwayScene.prefab) (Subway stage), [`Assets/Resources/Prefabs/UIs/Scene/UI_DreamScene.prefab`](https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_DreamScene.prefab) (Dream stage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Gameplay loop"]
  node_player["Player"]
  node_fatigue["Fatigue and sleep<br/>[SubwayCharacter.cs]"]
  node_subway["Subway stage"]
  node_dream["Dream stage"]
  node_world["Map and obstacles"]
end

subgraph group_ui["Game interface"]
  node_ui_manager["UI manager<br/>[SubwayUIManager.cs]"]
  node_main_menu["Main menu"]
  node_stage_select["Stage selection"]
  node_popups["Game popups"]
  node_game_controls["Game controls"]
end

subgraph group_presentation["Game presentation"]
  node_characters["Character animation"]
  node_backgrounds["Background art"]
  node_sound["Music and effects"]
  node_ui_art["Interface art"]
end

node_player -.->|"has state"| node_fatigue
node_fatigue -->|"loads on sleep"| node_dream
node_fatigue -->|"loads on wake"| node_subway

click node_player "https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Prefabs/Obstacle/Player"
click node_fatigue "https://github.com/ghyeok/dreaming_railway/blob/main/SubwayCharacter.cs"
click node_subway "https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_SubwayScene.prefab"
click node_dream "https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_DreamScene.prefab"
click node_world "https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Prefabs/Map"
click node_ui_manager "https://github.com/ghyeok/dreaming_railway/blob/main/SubwayUIManager.cs"
click node_main_menu "https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_MainMenuScene.prefab"
click node_stage_select "https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_StageSelectScene.prefab"
click node_popups "https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Prefabs/UIs/Popup"
click node_game_controls "https://github.com/ghyeok/dreaming_railway/blob/main/Assets/InputSystem_Actions.inputactions"
click node_characters "https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Animations"
click node_backgrounds "https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Arts/Backgrounds"
click node_sound "https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Sounds"
click node_ui_art "https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Arts/UIs"

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_player,node_fatigue,node_subway,node_dream,node_world toneBlue
class node_ui_manager,node_main_menu,node_stage_select,node_popups,node_game_controls toneAmber
class node_characters,node_backgrounds,node_sound,node_ui_art toneMint
```

## Components

### Gameplay loop

- [Player](https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Prefabs/Obstacle/Player): `Assets/Resources/Prefabs/Obstacle/Player`
- [Fatigue and sleep](https://github.com/ghyeok/dreaming_railway/blob/main/SubwayCharacter.cs): `SubwayCharacter.cs`
- [Subway stage](https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_SubwayScene.prefab): `Assets/Resources/Prefabs/UIs/Scene/UI_SubwayScene.prefab`
- [Dream stage](https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_DreamScene.prefab): `Assets/Resources/Prefabs/UIs/Scene/UI_DreamScene.prefab`
- [Map and obstacles](https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Prefabs/Map): `Assets/Resources/Prefabs/Map`

### Game interface

- [UI manager](https://github.com/ghyeok/dreaming_railway/blob/main/SubwayUIManager.cs): `SubwayUIManager.cs`
- [Main menu](https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_MainMenuScene.prefab): `Assets/Resources/Prefabs/UIs/Scene/UI_MainMenuScene.prefab`
- [Stage selection](https://github.com/ghyeok/dreaming_railway/blob/main/Assets/Resources/Prefabs/UIs/Scene/UI_StageSelectScene.prefab): `Assets/Resources/Prefabs/UIs/Scene/UI_StageSelectScene.prefab`
- [Game popups](https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Prefabs/UIs/Popup): `Assets/Resources/Prefabs/UIs/Popup`
- [Game controls](https://github.com/ghyeok/dreaming_railway/blob/main/Assets/InputSystem_Actions.inputactions): `Assets/InputSystem_Actions.inputactions`

### Game presentation

- [Character animation](https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Animations): `Assets/Resources/Animations`
- [Background art](https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Arts/Backgrounds): `Assets/Resources/Arts/Backgrounds`
- [Music and effects](https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Sounds): `Assets/Resources/Sounds`
- [Interface art](https://github.com/ghyeok/dreaming_railway/tree/main/Assets/Resources/Arts/UIs): `Assets/Resources/Arts/UIs`

## Connections

- Player → Fatigue and sleep: has state
- Fatigue and sleep → Dream stage: loads on sleep (evidence: `SubwayCharacter.cs`)
- Fatigue and sleep → Subway stage: loads on wake (evidence: `SubwayCharacter.cs`)
