# nvjob/infinity-square-space architecture

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

- Interactive diagram: https://gitdiagram.com/nvjob/infinity-square-space
- Repository: https://github.com/nvjob/infinity-square-space

## Overview

Infinity Square/Space is a playable Unity game prototype and asset project. The documented player-facing flow starts in a planet-selection menu, whose settings are saved for the Main scene; the Main scene generates a star system. Gameplay then combines procedural environments, object destruction and pooling, NPC AI, and a player controller with weapons and skills. The README describes these capabilities but no source excerpts were provided, so links below are limited to relationships it explicitly documents; unavailable Menu and Player source paths are left null.

Main entry points: [`Assets/OSG Infinity Square Space/Main/Scripts/Class_StarSystem.cs`](https://github.com/nvjob/infinity-square-space/blob/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Class_StarSystem.cs) (Star System), [`Assets/OSG Infinity Square Space/AI/Scripts`](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/AI/Scripts) (NPC Artificial Intelligence), [`Assets/OSG Infinity Square Space/Main/Scripts`](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts) (Procedural Generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["World Generation"]
  node_star["Star System"]
  node_generation["Procedural Generation"]
  node_universe["Star Field"]
end

subgraph group_objects["World Objects"]
  node_pools["Static Object Pools"]
  node_destruction["Object Destruction"]
  node_asteroids["Asteroid Objects"]
  node_chunks["Chunk Objects"]
  node_debris["Debris Objects"]
end

subgraph group_combat["NPC and Combat"]
  node_ai["NPC Artificial Intelligence"]
end

subgraph group_gameplay["Game Flow"]
  node_menu["Planet Menu"]
  node_prefs[("Saved Settings")]
  node_controller["Game Controller"]
end

node_player(("Player"))

node_menu -->|"saves settings"| node_prefs
node_prefs -->|"configures scene"| node_star
node_menu -->|"generates star field"| node_universe
node_star -->|"generates system"| node_generation
node_player -->|"uses weapons"| node_controller
node_ai -->|"interacts with"| node_player

click node_star "https://github.com/nvjob/infinity-square-space/blob/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Class_StarSystem.cs"
click node_generation "https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts"
click node_pools "https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts"
click node_destruction "https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts"
click node_asteroids "https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Asteroid"
click node_chunks "https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Chunk%20Cube"
click node_debris "https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Debrises"
click node_ai "https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/AI/Scripts"

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_star,node_generation,node_universe toneBlue
class node_pools,node_destruction,node_asteroids,node_chunks,node_debris toneAmber
class node_ai toneMint
class node_menu,node_prefs,node_controller toneRose
class node_player toneIndigo
```

## Components

### World Generation

- [Star System](https://github.com/nvjob/infinity-square-space/blob/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Class_StarSystem.cs): `Assets/OSG Infinity Square Space/Main/Scripts/Class_StarSystem.cs`
- [Procedural Generation](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts): `Assets/OSG Infinity Square Space/Main/Scripts`
- **Star Field**

### World Objects

- [Static Object Pools](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts): `Assets/OSG Infinity Square Space/Main/Scripts`
- [Object Destruction](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts): `Assets/OSG Infinity Square Space/Main/Scripts`
- [Asteroid Objects](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Asteroid): `Assets/OSG Infinity Square Space/Main/Scripts/Asteroid`
- [Chunk Objects](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Chunk%20Cube): `Assets/OSG Infinity Square Space/Main/Scripts/Chunk Cube`
- [Debris Objects](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/Main/Scripts/Debrises): `Assets/OSG Infinity Square Space/Main/Scripts/Debrises`

### NPC and Combat

- [NPC Artificial Intelligence](https://github.com/nvjob/infinity-square-space/tree/master/Assets/OSG%20Infinity%20Square%20Space/AI/Scripts): `Assets/OSG Infinity Square Space/AI/Scripts`

### Game Flow

- **Planet Menu**
- **Saved Settings**
- **Game Controller**

### Other components

- **Player**

## Connections

- Planet Menu → Saved Settings: saves settings
- Saved Settings → Star System: configures scene
- Planet Menu → Star Field: generates star field
- Star System → Procedural Generation: generates system
- Player → Game Controller: uses weapons
- NPC Artificial Intelligence → Player: interacts with
