# ericsemcdev/alongsideyou architecture

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

## Overview

Alongside You is a local cooperative 2D puzzle game: players control Al and Finn, combine light and math to solve generated equations, and progress through levels while anxiety creates pressure. The graph preserves the documented gameplay stages and major systems named in the project tree. No source excerpts were provided, so links between individual scripts are limited to relationships stated in the README; script-level call wiring is not verified.

Main entry points: [`Assets/Scripts/Puzzle/CalculationStationDisplay.cs`](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/CalculationStationDisplay.cs) (Calculation station), [`Assets/Scripts/Core/InputManager.cs`](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/InputManager.cs) (Input manager), [`Assets/Scripts/Finn/FinnMovement.cs`](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Finn/FinnMovement.cs) (Finn movement), [`Assets/Scripts/Core/GameManager.cs`](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/GameManager.cs) (Game manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game flow"]
  node_input["Input manager<br/>[InputManager.cs]"]
  node_game["Game manager<br/>[GameManager.cs]"]
  node_state["Game states"]
  node_menu["Main menu<br/>[MainMenuUi.cs]"]
  node_completion["Phase completion"]
end

subgraph group_players["Player mechanics"]
  node_al["Al movement<br/>[AlMovement.cs]"]
  node_carrier["Al block carrier<br/>[AlBlockCarrier.cs]"]
  node_finn["Finn movement<br/>[FinnMovement.cs]"]
  node_collector["Operator collector"]
  node_spark["Light spark<br/>[FagulhaDeLuz.cs]"]
end

subgraph group_puzzles["Math puzzles"]
  node_config["Puzzle config<br/>[PuzzleConfig.cs]"]
  node_generator["Puzzle generator<br/>[PuzzleGenerator.cs]"]
  node_station["Calculation station"]
  node_evaluator["Equation evaluator"]
  node_lever["Confirmation lever"]
end

subgraph group_world["World and anxiety"]
  node_anxiety["Anxiety system<br/>[AnxietySystem.cs]"]
  node_anxietyconfig["Anxiety config<br/>[AnxietyConfig.cs]"]
  node_gates["Puzzle gates<br/>[GateController.cs]"]
  node_conditions["Gate conditions<br/>[IGateCondition.cs]"]
  node_obstacles["Math obstacles"]
end

node_players(("Two players"))

node_players -->|"provide input"| node_input
node_input -->|"control"| node_al
node_input -->|"control"| node_finn
node_al -->|"carry blocks"| node_carrier
node_finn -->|"collect operators"| node_collector
node_finn -->|"reach light"| node_spark
node_config -->|"configure"| node_generator
node_generator -->|"generate equation"| node_station
node_carrier -->|"supply dice"| node_station
node_collector -->|"supply operators"| node_station
node_station -->|"evaluate expression"| node_evaluator
node_lever -->|"confirm result"| node_evaluator
node_evaluator -->|"result"| node_gates
node_gates -->|"check conditions"| node_conditions
node_conditions -->|"gate by result"| node_obstacles
node_anxietyconfig -->|"configure"| node_anxiety
node_anxiety -->|"deteriorate over time"| node_al
node_game -->|"manage states"| node_state
node_menu -->|"start game"| node_game
node_completion -->|"advance phase"| node_game

click node_input "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/InputManager.cs"
click node_game "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/GameManager.cs"
click node_state "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/GameStateMachine.cs"
click node_menu "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/MainMenuUi.cs"
click node_completion "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/PhaseCompletionManager.cs"
click node_al "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Al/AlMovement.cs"
click node_carrier "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/AlBlockCarrier.cs"
click node_anxiety "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Al/AnxietySystem.cs"
click node_anxietyconfig "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Al/AnxietyConfig.cs"
click node_finn "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Finn/FinnMovement.cs"
click node_collector "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Finn/FinnOperatorCollector.cs"
click node_spark "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/FagulhaDeLuz.cs"
click node_config "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/PuzzleConfig.cs"
click node_generator "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/PuzzleGenerator.cs"
click node_station "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/CalculationStationDisplay.cs"
click node_evaluator "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/EquationEvaluator.cs"
click node_lever "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/ConfirmationLever.cs"
click node_gates "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/GateController.cs"
click node_conditions "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/IGateCondition.cs"
click node_obstacles "https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/ResultThresholdGate.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_input,node_game,node_state,node_menu,node_completion toneBlue
class node_al,node_carrier,node_finn,node_collector,node_spark toneAmber
class node_config,node_generator,node_station,node_evaluator,node_lever toneMint
class node_anxiety,node_anxietyconfig,node_gates,node_conditions,node_obstacles toneRose
class node_players toneIndigo
```

## Components

### Game flow

- [Input manager](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/InputManager.cs): `Assets/Scripts/Core/InputManager.cs`
- [Game manager](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/GameManager.cs): `Assets/Scripts/Core/GameManager.cs`
- [Game states](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/GameStateMachine.cs): `Assets/Scripts/Core/GameStateMachine.cs`
- [Main menu](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/MainMenuUi.cs): `Assets/Scripts/Core/MainMenuUi.cs`
- [Phase completion](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Core/PhaseCompletionManager.cs): `Assets/Scripts/Core/PhaseCompletionManager.cs`

### Player mechanics

- [Al movement](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Al/AlMovement.cs): `Assets/Scripts/Al/AlMovement.cs`
- [Al block carrier](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/AlBlockCarrier.cs): `Assets/Scripts/Puzzle/AlBlockCarrier.cs`
- [Finn movement](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Finn/FinnMovement.cs): `Assets/Scripts/Finn/FinnMovement.cs`
- [Operator collector](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Finn/FinnOperatorCollector.cs): `Assets/Scripts/Finn/FinnOperatorCollector.cs`
- [Light spark](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/FagulhaDeLuz.cs): `Assets/Scripts/Puzzle/FagulhaDeLuz.cs`

### Math puzzles

- [Puzzle config](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/PuzzleConfig.cs): `Assets/Scripts/Puzzle/PuzzleConfig.cs`
- [Puzzle generator](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/PuzzleGenerator.cs): `Assets/Scripts/Puzzle/PuzzleGenerator.cs`
- [Calculation station](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/CalculationStationDisplay.cs): `Assets/Scripts/Puzzle/CalculationStationDisplay.cs`
- [Equation evaluator](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/EquationEvaluator.cs): `Assets/Scripts/Puzzle/EquationEvaluator.cs`
- [Confirmation lever](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/ConfirmationLever.cs): `Assets/Scripts/Puzzle/ConfirmationLever.cs`

### World and anxiety

- [Anxiety system](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Al/AnxietySystem.cs): `Assets/Scripts/Al/AnxietySystem.cs`
- [Anxiety config](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Al/AnxietyConfig.cs): `Assets/Scripts/Al/AnxietyConfig.cs`
- [Puzzle gates](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/GateController.cs): `Assets/Scripts/Puzzle/GateController.cs`
- [Gate conditions](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/IGateCondition.cs): `Assets/Scripts/Puzzle/IGateCondition.cs`
- [Math obstacles](https://github.com/ericsemcdev/alongsideyou/blob/main/Assets/Scripts/Puzzle/ResultThresholdGate.cs): `Assets/Scripts/Puzzle/ResultThresholdGate.cs`

### Other components

- **Two players**

## Connections

- Two players → Input manager: provide input
- Input manager → Al movement: control
- Input manager → Finn movement: control
- Al movement → Al block carrier: carry blocks
- Finn movement → Operator collector: collect operators
- Finn movement → Light spark: reach light
- Puzzle config → Puzzle generator: configure
- Puzzle generator → Calculation station: generate equation
- Al block carrier → Calculation station: supply dice
- Operator collector → Calculation station: supply operators
- Calculation station → Equation evaluator: evaluate expression
- Confirmation lever → Equation evaluator: confirm result
- Equation evaluator → Puzzle gates: result
- Puzzle gates → Gate conditions: check conditions
- Gate conditions → Math obstacles: gate by result
- Anxiety config → Anxiety system: configure
- Anxiety system → Al movement: deteriorate over time
- Game manager → Game states: manage states
- Main menu → Game manager: start game
- Phase completion → Game manager: advance phase
