# randomtuba/algebraic-progression architecture

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

- Interactive diagram: https://gitdiagram.com/randomtuba/algebraic-progression
- Repository: https://github.com/randomtuba/algebraic-progression

## Overview

This is an incremental game centered on growing currencies and advancing through mathematical prestige layers. The main runtime in game.js updates production and challenge-related state; players buy generators and upgrades, meet challenge or prestige requirements, and unlock later systems. The tree and Textbook identify major branches including Complex, Integration, Lost Integration, Sinusoidal, and Hypercomplex progression. The sampled game loop directly references only a subset of those systems, so other branches are shown without guessed call relationships.

Main entry points: [`game.js`](https://github.com/randomtuba/algebraic-progression/blob/glitch/game.js) (Game Runtime), [`utils/break_eternity.js`](https://github.com/randomtuba/algebraic-progression/blob/glitch/utils/break_eternity.js) (Large Number Math), [`integration/number-sets.js`](https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/number-sets.js) (Number Sets), [`lost-integration/fractal-arm.js`](https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/fractal-arm.js) (Fractal Arm)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Game Core"]
  node_runtime["Game Runtime<br/>[game.js]"]
  node_save["Save State<br/>[save.js]"]
  node_decimal["Large Number Math<br/>[break_eternity.js]"]
end

subgraph group_early["Early Progression"]
  node_normal["Buildings<br/>[buyables.js]"]
  node_normalupgrades["Normal Upgrades<br/>[upgrades.js]"]
  node_simulation["Simulation<br/>[simulation.js]"]
  node_quadratic["Quadratic Layer<br/>[prestige.js]"]
  node_quadupgrades["Quadratic Upgrades<br/>[quad-upgs.js]"]
  node_complex["Complex Layer<br/>[prestige.js]"]
  node_complexupgrades["Complex Upgrades<br/>[comp-upgs.js]"]
  node_complexchallenges["Complex Challenges<br/>[comp-challenges.js]"]
end

subgraph group_integration["Integration Progression"]
  node_polynomials["Polynomials<br/>[polynomials.js]"]
  node_integration["Integration Layer<br/>[integ-prestige.js]"]
  node_integupgrades["Integration Upgrades<br/>[integ-upgrades.js]"]
  node_integchallenges["Integration Challenges"]
  node_numbersets["Number Sets<br/>[number-sets.js]"]
  node_temporal["Temporal Plane<br/>[temporal-plane.js]"]
end

subgraph group_advanced["Advanced Progression"]
  node_sinusoidal["Sinusoidal Layer<br/>[sin-prestige.js]"]
  node_sinupgrades["Sinusoidal Upgrades<br/>[sin-upgrades.js]"]
  node_lost["Lost Integration"]
  node_fractal["Fractal Arm<br/>[fractal-arm.js]"]
  node_mandelbrot["Mandelbrot Prestige"]
  node_xpower["X Powers<br/>[x-powers.js]"]
  node_hypercomplex["Hypercomplex Layer<br/>[hypercomp-flune.js]"]
  node_hyperupgrades["Hypercomplex Upgrades"]
end

subgraph group_support["Player Support"]
  node_achievements["Achievements<br/>[achievements.js]"]
  node_news["News<br/>[news.js]"]
  node_textbook["Textbook<br/>[textbook.js]"]
end

node_player(("Player"))

node_player -->|"plays"| node_runtime
node_runtime -->|"updates"| node_numbersets
node_runtime -->|"checks milestones"| node_fractal
node_runtime -->|"checks powers"| node_xpower
node_runtime -.->|"calculates with"| node_decimal

click node_runtime "https://github.com/randomtuba/algebraic-progression/blob/glitch/game.js"
click node_save "https://github.com/randomtuba/algebraic-progression/blob/glitch/save.js"
click node_achievements "https://github.com/randomtuba/algebraic-progression/blob/glitch/achievements.js"
click node_news "https://github.com/randomtuba/algebraic-progression/blob/glitch/news.js"
click node_textbook "https://github.com/randomtuba/algebraic-progression/blob/glitch/textbook.js"
click node_normal "https://github.com/randomtuba/algebraic-progression/blob/glitch/normal/buyables.js"
click node_normalupgrades "https://github.com/randomtuba/algebraic-progression/blob/glitch/normal/upgrades.js"
click node_simulation "https://github.com/randomtuba/algebraic-progression/blob/glitch/normal/simulation.js"
click node_quadratic "https://github.com/randomtuba/algebraic-progression/blob/glitch/quadratic/prestige.js"
click node_quadupgrades "https://github.com/randomtuba/algebraic-progression/blob/glitch/quadratic/quad-upgs.js"
click node_complex "https://github.com/randomtuba/algebraic-progression/blob/glitch/complex/prestige.js"
click node_complexupgrades "https://github.com/randomtuba/algebraic-progression/blob/glitch/complex/comp-upgs.js"
click node_complexchallenges "https://github.com/randomtuba/algebraic-progression/blob/glitch/complex/comp-challenges.js"
click node_polynomials "https://github.com/randomtuba/algebraic-progression/blob/glitch/polynomials/polynomials.js"
click node_integration "https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/integ-prestige.js"
click node_integupgrades "https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/integ-upgrades.js"
click node_integchallenges "https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/integ-challenges.js"
click node_numbersets "https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/number-sets.js"
click node_temporal "https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/temporal-plane.js"
click node_sinusoidal "https://github.com/randomtuba/algebraic-progression/blob/glitch/sinusoidal/sin-prestige.js"
click node_sinupgrades "https://github.com/randomtuba/algebraic-progression/blob/glitch/sinusoidal/sin-upgrades.js"
click node_lost "https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/complex-prestige.js"
click node_fractal "https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/fractal-arm.js"
click node_mandelbrot "https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/mandelbrot-prestige.js"
click node_xpower "https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/x-powers.js"
click node_hypercomplex "https://github.com/randomtuba/algebraic-progression/blob/glitch/hypercomplex/hypercomp-flune.js"
click node_hyperupgrades "https://github.com/randomtuba/algebraic-progression/blob/glitch/hypercomplex/hypercomp-upgrades.js"
click node_decimal "https://github.com/randomtuba/algebraic-progression/blob/glitch/utils/break_eternity.js"

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_runtime,node_save,node_decimal toneBlue
class node_normal,node_normalupgrades,node_simulation,node_quadratic,node_quadupgrades,node_complex,node_complexupgrades,node_complexchallenges toneAmber
class node_polynomials,node_integration,node_integupgrades,node_integchallenges,node_numbersets,node_temporal toneMint
class node_sinusoidal,node_sinupgrades,node_lost,node_fractal,node_mandelbrot,node_xpower,node_hypercomplex,node_hyperupgrades toneRose
class node_achievements,node_news,node_textbook,node_player toneIndigo
```

## Components

### Game Core

- [Game Runtime](https://github.com/randomtuba/algebraic-progression/blob/glitch/game.js): `game.js`
- [Save State](https://github.com/randomtuba/algebraic-progression/blob/glitch/save.js): `save.js`
- [Large Number Math](https://github.com/randomtuba/algebraic-progression/blob/glitch/utils/break_eternity.js): `utils/break_eternity.js`

### Early Progression

- [Buildings](https://github.com/randomtuba/algebraic-progression/blob/glitch/normal/buyables.js): `normal/buyables.js`
- [Normal Upgrades](https://github.com/randomtuba/algebraic-progression/blob/glitch/normal/upgrades.js): `normal/upgrades.js`
- [Simulation](https://github.com/randomtuba/algebraic-progression/blob/glitch/normal/simulation.js): `normal/simulation.js`
- [Quadratic Layer](https://github.com/randomtuba/algebraic-progression/blob/glitch/quadratic/prestige.js): `quadratic/prestige.js`
- [Quadratic Upgrades](https://github.com/randomtuba/algebraic-progression/blob/glitch/quadratic/quad-upgs.js): `quadratic/quad-upgs.js`
- [Complex Layer](https://github.com/randomtuba/algebraic-progression/blob/glitch/complex/prestige.js): `complex/prestige.js`
- [Complex Upgrades](https://github.com/randomtuba/algebraic-progression/blob/glitch/complex/comp-upgs.js): `complex/comp-upgs.js`
- [Complex Challenges](https://github.com/randomtuba/algebraic-progression/blob/glitch/complex/comp-challenges.js): `complex/comp-challenges.js`

### Integration Progression

- [Polynomials](https://github.com/randomtuba/algebraic-progression/blob/glitch/polynomials/polynomials.js): `polynomials/polynomials.js`
- [Integration Layer](https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/integ-prestige.js): `integration/integ-prestige.js`
- [Integration Upgrades](https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/integ-upgrades.js): `integration/integ-upgrades.js`
- [Integration Challenges](https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/integ-challenges.js): `integration/integ-challenges.js`
- [Number Sets](https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/number-sets.js): `integration/number-sets.js`
- [Temporal Plane](https://github.com/randomtuba/algebraic-progression/blob/glitch/integration/temporal-plane.js): `integration/temporal-plane.js`

### Advanced Progression

- [Sinusoidal Layer](https://github.com/randomtuba/algebraic-progression/blob/glitch/sinusoidal/sin-prestige.js): `sinusoidal/sin-prestige.js`
- [Sinusoidal Upgrades](https://github.com/randomtuba/algebraic-progression/blob/glitch/sinusoidal/sin-upgrades.js): `sinusoidal/sin-upgrades.js`
- [Lost Integration](https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/complex-prestige.js): `lost-integration/complex-prestige.js`
- [Fractal Arm](https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/fractal-arm.js): `lost-integration/fractal-arm.js`
- [Mandelbrot Prestige](https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/mandelbrot-prestige.js): `lost-integration/mandelbrot-prestige.js`
- [X Powers](https://github.com/randomtuba/algebraic-progression/blob/glitch/lost-integration/x-powers.js): `lost-integration/x-powers.js`
- [Hypercomplex Layer](https://github.com/randomtuba/algebraic-progression/blob/glitch/hypercomplex/hypercomp-flune.js): `hypercomplex/hypercomp-flune.js`
- [Hypercomplex Upgrades](https://github.com/randomtuba/algebraic-progression/blob/glitch/hypercomplex/hypercomp-upgrades.js): `hypercomplex/hypercomp-upgrades.js`

### Player Support

- [Achievements](https://github.com/randomtuba/algebraic-progression/blob/glitch/achievements.js): `achievements.js`
- [News](https://github.com/randomtuba/algebraic-progression/blob/glitch/news.js): `news.js`
- [Textbook](https://github.com/randomtuba/algebraic-progression/blob/glitch/textbook.js): `textbook.js`

### Other components

- **Player**

## Connections

- Player → Game Runtime: plays (evidence: `game.js`)
- Game Runtime → Number Sets: updates (evidence: `game.js`)
- Game Runtime → Fractal Arm: checks milestones (evidence: `game.js`)
- Game Runtime → X Powers: checks powers (evidence: `game.js`)
- Game Runtime → Large Number Math: calculates with
