# sp0litak/falling-floor architecture

> Architecture diagram of the GitHub repository sp0litak/falling-floor, 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/sp0litak/falling-floor
- Repository: https://github.com/sp0litak/falling-floor

## Overview

Falling Floor is a Unity prototype centered on surviving a collapsing-floor level. Its apparent user path is to start from the menu, move through the level, and respond as platforms disappear or the player falls. The tree also shows interaction, doors, screen effects, and platform-color data, but gameplay source was not sampled, so their runtime wiring is uncertain. Separately, the repository includes generated-style URP command-buffer wrappers; sampled methods delegate to Unity’s command buffer. The graph reflects documented capabilities and tree paths without asserting unsampled call relationships.

Main entry points: [`Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButton.cs`](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButton.cs) (Play Button), [`Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButtonTrigger.cs`](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButtonTrigger.cs) (Button Trigger), [`Assets/_Game/_Scripts/Gameplay/Player/Movement.cs`](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Player/Movement.cs) (Player), [`Assets/_Game/_Scripts/Gameplay/Interact/Interactor.cs`](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Interact/Interactor.cs) (Interactor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Game Flow"]
  node_button["Play Button<br/>[PlayButton.cs]"]
  node_buttontrigger["Button Trigger"]
  node_menu["Menu Bootstrap<br/>[MenuBootstrap.cs]"]
  node_gameboot["Game Bootstrap<br/>[GameBootstrap.cs]"]
  node_bus["Event Bus<br/>[EventBus.cs]"]
end

subgraph group_play["Gameplay"]
  node_player["Player<br/>[Movement.cs]"]
  node_platforms["Platforms<br/>[PlatformsInfo.cs]"]
  node_fall["Fall Trigger"]
  node_interactor["Interactor<br/>[Interactor.cs]"]
  node_interactable["Interactable Contract<br/>[IInteractable.cs]"]
  node_doors["Auto Doors<br/>[AutoDoor.cs]"]
  node_platform_color["Platform Color Logic<br/>[PlatformColor.cs]"]
  node_screen["Screen Color"]
end

subgraph group_render["Rendering API"]
  node_raster["Raster Commands"]
  node_compute["Compute Commands"]
  node_unsafe["Unsafe Commands"]
  node_raster_iface["Raster Interface"]
  node_compute_iface["Compute Interface"]
  node_unsafe_iface["Unsafe Interface"]
  node_base_iface["Base Interface"]
end

subgraph group_content["Game Content"]
  node_game["Game Scene<br/>[Game.unity]"]
  node_menu_scene["Menu Scene<br/>[Menu.unity]"]
  node_platform_data["Platform Colors"]
end

node_unity(("Unity Runtime"))

node_player -->|"moves in"| node_unity
node_unity -->|"runs gameplay"| node_platforms
node_unity -->|"runs trigger"| node_fall
node_unity -->|"runs menu"| node_menu
node_unity -->|"runs game"| node_gameboot
node_button -.->|"starts level"| node_game
node_buttontrigger -.->|"activates"| node_button
node_platform_color -.->|"reads colors"| node_platform_data
node_interactor -.->|"uses contract"| node_interactable
node_raster -->|"delegates commands"| node_unity
node_compute -->|"delegates commands"| node_unity
node_unsafe -->|"delegates commands"| node_unity

click node_player "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Player/Movement.cs"
click node_platforms "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Platform/PlatformsInfo.cs"
click node_fall "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/FallTrigger/PlayerFallTrigger.cs"
click node_interactor "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Interact/Interactor.cs"
click node_interactable "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Interact/IInteractable.cs"
click node_doors "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Doors/AutoDoor.cs"
click node_button "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButton.cs"
click node_buttontrigger "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButtonTrigger.cs"
click node_menu "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Core/Bootstrap/MenuBootstrap.cs"
click node_gameboot "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Core/Bootstrap/GameBootstrap.cs"
click node_bus "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Core/EventBus/EventBus.cs"
click node_game "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scenes/Game.unity"
click node_menu_scene "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scenes/Menu.unity"
click node_platform_data "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/SO/PlatformColors.asset"
click node_platform_color "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Platform/PlatformColor.cs"
click node_screen "https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Screen/RandomScreenColor.cs"
click node_raster "https://github.com/sp0litak/falling-floor/blob/main/RasterCommandBuffer.cs"
click node_compute "https://github.com/sp0litak/falling-floor/blob/main/ComputeCommandBuffer.cs"
click node_unsafe "https://github.com/sp0litak/falling-floor/blob/main/UnsafeCommandBuffer.cs"
click node_raster_iface "https://github.com/sp0litak/falling-floor/blob/main/IRasterCommandBuffer.cs"
click node_compute_iface "https://github.com/sp0litak/falling-floor/blob/main/IComputeCommandBuffer.cs"
click node_unsafe_iface "https://github.com/sp0litak/falling-floor/blob/main/IUnsafeCommandBuffer.cs"
click node_base_iface "https://github.com/sp0litak/falling-floor/blob/main/IBaseCommandBuffer.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_button,node_buttontrigger,node_menu,node_gameboot,node_bus toneBlue
class node_player,node_platforms,node_fall,node_interactor,node_interactable,node_doors,node_platform_color,node_screen toneAmber
class node_raster,node_compute,node_unsafe,node_raster_iface,node_compute_iface,node_unsafe_iface,node_base_iface toneMint
class node_game,node_menu_scene,node_platform_data toneRose
class node_unity toneIndigo
```

## Components

### Game Flow

- [Play Button](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButton.cs): `Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButton.cs`
- [Button Trigger](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButtonTrigger.cs): `Assets/_Game/_Scripts/Gameplay/PlayButton/PlayButtonTrigger.cs`
- [Menu Bootstrap](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Core/Bootstrap/MenuBootstrap.cs): `Assets/_Game/_Scripts/Core/Bootstrap/MenuBootstrap.cs`
- [Game Bootstrap](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Core/Bootstrap/GameBootstrap.cs): `Assets/_Game/_Scripts/Core/Bootstrap/GameBootstrap.cs`
- [Event Bus](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Core/EventBus/EventBus.cs): `Assets/_Game/_Scripts/Core/EventBus/EventBus.cs`

### Gameplay

- [Player](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Player/Movement.cs): `Assets/_Game/_Scripts/Gameplay/Player/Movement.cs`
- [Platforms](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Platform/PlatformsInfo.cs): `Assets/_Game/_Scripts/Gameplay/Platform/PlatformsInfo.cs`
- [Fall Trigger](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/FallTrigger/PlayerFallTrigger.cs): `Assets/_Game/_Scripts/Gameplay/FallTrigger/PlayerFallTrigger.cs`
- [Interactor](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Interact/Interactor.cs): `Assets/_Game/_Scripts/Gameplay/Interact/Interactor.cs`
- [Interactable Contract](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Interact/IInteractable.cs): `Assets/_Game/_Scripts/Gameplay/Interact/IInteractable.cs`
- [Auto Doors](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Doors/AutoDoor.cs): `Assets/_Game/_Scripts/Gameplay/Doors/AutoDoor.cs`
- [Platform Color Logic](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Platform/PlatformColor.cs): `Assets/_Game/_Scripts/Gameplay/Platform/PlatformColor.cs`
- [Screen Color](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scripts/Gameplay/Screen/RandomScreenColor.cs): `Assets/_Game/_Scripts/Gameplay/Screen/RandomScreenColor.cs`

### Rendering API

- [Raster Commands](https://github.com/sp0litak/falling-floor/blob/main/RasterCommandBuffer.cs): `RasterCommandBuffer.cs`
- [Compute Commands](https://github.com/sp0litak/falling-floor/blob/main/ComputeCommandBuffer.cs): `ComputeCommandBuffer.cs`
- [Unsafe Commands](https://github.com/sp0litak/falling-floor/blob/main/UnsafeCommandBuffer.cs): `UnsafeCommandBuffer.cs`
- [Raster Interface](https://github.com/sp0litak/falling-floor/blob/main/IRasterCommandBuffer.cs): `IRasterCommandBuffer.cs`
- [Compute Interface](https://github.com/sp0litak/falling-floor/blob/main/IComputeCommandBuffer.cs): `IComputeCommandBuffer.cs`
- [Unsafe Interface](https://github.com/sp0litak/falling-floor/blob/main/IUnsafeCommandBuffer.cs): `IUnsafeCommandBuffer.cs`
- [Base Interface](https://github.com/sp0litak/falling-floor/blob/main/IBaseCommandBuffer.cs): `IBaseCommandBuffer.cs`

### Game Content

- [Game Scene](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scenes/Game.unity): `Assets/_Game/_Scenes/Game.unity`
- [Menu Scene](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/_Scenes/Menu.unity): `Assets/_Game/_Scenes/Menu.unity`
- [Platform Colors](https://github.com/sp0litak/falling-floor/blob/main/Assets/_Game/SO/PlatformColors.asset): `Assets/_Game/SO/PlatformColors.asset`

### Other components

- **Unity Runtime**

## Connections

- Player → Unity Runtime: moves in
- Unity Runtime → Platforms: runs gameplay
- Unity Runtime → Fall Trigger: runs trigger
- Unity Runtime → Menu Bootstrap: runs menu
- Unity Runtime → Game Bootstrap: runs game
- Play Button → Game Scene: starts level
- Button Trigger → Play Button: activates
- Platform Color Logic → Platform Colors: reads colors
- Interactor → Interactable Contract: uses contract
- Raster Commands → Unity Runtime: delegates commands
- Compute Commands → Unity Runtime: delegates commands
- Unsafe Commands → Unity Runtime: delegates commands
