# crazycat911/weightless architecture

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

- Interactive diagram: https://gitdiagram.com/crazycat911/weightless
- Repository: https://github.com/crazycat911/weightless

## Overview

1. **Project type and runtime**
   - This is a **Godot 2D game** project. The presence of `project.godot`, `.tscn` scene files, and `.gd` scripts indicates the architecture is organized around Godot’s scene-tree model rather than a traditional application framework.

2. **Top-level structure**
   - The repository is split into a small set of playable/gameplay assets and supporting art/content:
     - `player.tscn`, `player.gd`
     - `Weight/Weight.tscn`
     - `Levels/level.tscn`, `Levels/End.gd`
     - `cursor.gd`, `PlayerArea2D.gd`
     - `Art/` for textures, fonts, UI, and backgrounds
   - This suggests a compact game loop with a few reusable scene/prefab-style components.

3. **Core gameplay scenes**
   - The main gameplay likely lives in `Levels/level.tscn`, which probably assembles the player, the weight object, environment, and background.
   - `Levels/End.gd` implies there is a distinct end-state or completion screen/scene separate from the main level.

4. **Player subsystem**
   - `player.tscn` and `player.gd` form the player-controlled entity.
   - `PlayerArea2D.gd` suggests the player has a child `Area2D`-style detection or interaction zone, likely used for collisions, pickups, or trigger-based gameplay.
   - This is the main interaction boundary between the player and the world.

5. **Input / cursor subsystem**
   - `cursor.gd` plus `Art/UI/Cursor/` point to a custom cursor or mouse-facing interaction layer.
   - That suggests the game likely uses cursor-directed actions, selection, or aiming, rather than only keyboard movement.
   - In an architecture diagram, this should be shown as an input/UI-facing component feeding player or interaction logic.

6. **Weight object / physics-oriented gameplay**
   - `Weight/Weight.tscn` is a dedicated scene for a “weight” gameplay object, implying it is a first-class entity rather than a static prop.
   - The project name, **Weightless**, and the existence of a weight scene strongly suggest the central mechanic involves weight, gravity, balancing, carrying, or moving weighted objects.
   - This object is probably interacted with by the player and may drive level progression or puzzle state.

7. **Level flow and state transitions**
   - The `Levels/` folder likely contains the main playable stage plus the transition to the ending.
   - `End.gd` indicates a scripted terminal state, which may handle score, win condition, or credits.
   - The architecture likely flows from startup → level scene → end scene, with scene changes managing game progression.

8. **Rendering and environment assets**
   - `Art/parallax_background.tscn` indicates a reusable background scene, probably layered for depth in 2D.
   - The `Art/Aaron`, `Art/Cave_Assets`, `Art/Objects`, and `Art/UI` folders show the visual environment is organized by asset type and use.
   - These are content dependencies rather than logic subsystems, but they materially affect scene composition.

9. **UI and typography**
   - `Art/UI/Doomed_Font/` and cursor assets indicate custom UI styling.
   - The UI layer appears lightweight, focused on in-game presentation rather than a complex menu system.
   - Any diagram should show UI assets as supporting the cursor and on-screen feedback, not as a separate application tier.

10. **Narrative and planning artifacts**
   - `Story.txt`, `Idea.docx`, `Plan.docx`, and `Project.pptx/pdf` are design documents rather than runtime assets.
   - They do not affect the executable architecture directly, but they indicate the game has a planned narrative/design layer alongside implementation.

11. **Likely runtime dependencies and boundaries**
   - The only explicit technical dependency is **Godot**, so the main architectural boundary is the engine’s scene system.
   - Scripts (`.gd`) attach behavior to scenes (`.tscn`), while art assets provide imported visual content.
   - The key runtime boundary is between player input/cursor handling, world interaction (especially `Area2D`-style detection), and scene transitions.

12. **How to diagram this repo accurately**
   - Show **Godot engine** as the host runtime.
   - Under it, place **main level scene**, **player scene**, **weight scene**, and **end scene** as separate runtime scenes.
   - Connect **cursor/input** to the player/interactions, **player** to **weight/environment collisions**, and **level** to **scene transition/end state**.
   - Treat `Art/` as asset dependencies feeding the scenes, especially background, UI, cursor, and object visuals.

Main entry points: [`Levels/level.tscn`](https://github.com/crazycat911/weightless/blob/master/Levels/level.tscn) (Level), [`project.godot`](https://github.com/crazycat911/weightless/blob/master/project.godot) (Project), [`player.tscn`](https://github.com/crazycat911/weightless/blob/master/player.tscn) (Player), [`Weight/Weight.tscn`](https://github.com/crazycat911/weightless/blob/master/Weight/Weight.tscn) (Weight)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_project_godot["Project<br/>godot config<br/>[project.godot]"]
  node_level_scene["Level<br/>scene<br/>[level.tscn]"]
  node_player_scene["Player<br/>scene<br/>[player.tscn]"]
  node_player_script["Player Logic<br/>script<br/>[player.gd]"]
  node_player_area_script["Player Area<br/>script<br/>[PlayerArea2D.gd]"]
  node_weight_scene["Weight<br/>scene<br/>[Weight.tscn]"]
  node_cursor_script["Cursor<br/>script<br/>[cursor.gd]"]
  node_end_script["End State<br/>script<br/>[End.gd]"]
end

subgraph group_content["Content"]
  node_background_scene["Background<br/>scene"]
  node_ui_cursor["Cursor Art<br/>ui asset"]
  node_ui_font["UI Font<br/>font asset"]
  node_objects_art["Objects Art<br/>art assets"]
  node_cave_assets["Cave Art<br/>art assets"]
  node_aaron_art["Aaron Art<br/>art assets"]
end

subgraph group_docs["Design"]
  node_story_doc["Story<br/>design doc<br/>[Story.txt]"]
  node_plan_doc["Plan<br/>design doc<br/>[Plan.docx]"]
  node_idea_doc["Idea<br/>design doc<br/>[Idea.docx]"]
end

node_project_godot -->|"starts"| node_level_scene
node_project_godot -->|"loads"| node_player_scene
node_project_godot -->|"uses"| node_cursor_script
node_level_scene -->|"instantiates"| node_player_scene
node_level_scene -->|"instantiates"| node_weight_scene
node_level_scene -->|"layers"| node_background_scene
node_level_scene -->|"transitions"| node_end_script
node_player_scene -->|"driven by"| node_player_script
node_player_scene -->|"contains"| node_player_area_script
node_cursor_script -->|"controls"| node_player_scene
node_player_area_script -->|"interacts with"| node_weight_scene
node_player_scene -->|"moves"| node_weight_scene
node_background_scene -->|"uses"| node_cave_assets
node_weight_scene -->|"renders from"| node_objects_art
node_cursor_script -->|"renders from"| node_ui_cursor
node_level_scene -->|"styles with"| node_ui_font
node_level_scene -.->|"informed by"| node_story_doc
node_project_godot -->|"bundles"| node_aaron_art
node_project_godot -.->|"informed by"| node_plan_doc
node_project_godot -.->|"informed by"| node_idea_doc

click node_project_godot "https://github.com/crazycat911/weightless/blob/master/project.godot"
click node_level_scene "https://github.com/crazycat911/weightless/blob/master/Levels/level.tscn"
click node_player_scene "https://github.com/crazycat911/weightless/blob/master/player.tscn"
click node_player_script "https://github.com/crazycat911/weightless/blob/master/player.gd"
click node_player_area_script "https://github.com/crazycat911/weightless/blob/master/PlayerArea2D.gd"
click node_weight_scene "https://github.com/crazycat911/weightless/blob/master/Weight/Weight.tscn"
click node_cursor_script "https://github.com/crazycat911/weightless/blob/master/cursor.gd"
click node_end_script "https://github.com/crazycat911/weightless/blob/master/Levels/End.gd"
click node_background_scene "https://github.com/crazycat911/weightless/blob/master/Art/parallax_background.tscn"
click node_ui_cursor "https://github.com/crazycat911/weightless/tree/master/Art/UI/Cursor"
click node_ui_font "https://github.com/crazycat911/weightless/tree/master/Art/UI/Doomed_Font"
click node_objects_art "https://github.com/crazycat911/weightless/tree/master/Art/Objects"
click node_cave_assets "https://github.com/crazycat911/weightless/tree/master/Art/Cave_Assets"
click node_aaron_art "https://github.com/crazycat911/weightless/tree/master/Art/Aaron"
click node_story_doc "https://github.com/crazycat911/weightless/blob/master/Story.txt"
click node_plan_doc "https://github.com/crazycat911/weightless/blob/master/Plan.docx"
click node_idea_doc "https://github.com/crazycat911/weightless/blob/master/Idea.docx"

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_project_godot,node_level_scene,node_player_scene,node_player_script,node_player_area_script,node_weight_scene,node_cursor_script,node_end_script toneBlue
class node_background_scene,node_ui_cursor,node_ui_font,node_objects_art,node_cave_assets,node_aaron_art toneAmber
class node_story_doc,node_plan_doc,node_idea_doc toneMint
```

## Components

### Runtime

Godot scenes and scripts that define gameplay and flow

- [Project](https://github.com/crazycat911/weightless/blob/master/project.godot): godot config · Engine project settings and startup entrypoint · `project.godot`
- [Level](https://github.com/crazycat911/weightless/blob/master/Levels/level.tscn): scene · Main playable stage that assembles core gameplay pieces · `Levels/level.tscn`
- [Player](https://github.com/crazycat911/weightless/blob/master/player.tscn): scene · Player-controlled entity scene · `player.tscn`
- [Player Logic](https://github.com/crazycat911/weightless/blob/master/player.gd): script · Behavior for the player entity · `player.gd`
- [Player Area](https://github.com/crazycat911/weightless/blob/master/PlayerArea2D.gd): script · Interaction or collision zone attached to the player · `PlayerArea2D.gd`
- [Weight](https://github.com/crazycat911/weightless/blob/master/Weight/Weight.tscn): scene · Core weight-based gameplay object · `Weight/Weight.tscn`
- [Cursor](https://github.com/crazycat911/weightless/blob/master/cursor.gd): script · Custom cursor and input-facing interaction layer · `cursor.gd`
- [End State](https://github.com/crazycat911/weightless/blob/master/Levels/End.gd): script · Terminal scene logic for win or completion flow · `Levels/End.gd`

### Content

Reusable art and visual assets used by scenes

- [Background](https://github.com/crazycat911/weightless/blob/master/Art/parallax_background.tscn): scene · Reusable parallax background layer · `Art/parallax_background.tscn`
- [Cursor Art](https://github.com/crazycat911/weightless/tree/master/Art/UI/Cursor): ui asset · Visual assets for the custom cursor · `Art/UI/Cursor`
- [UI Font](https://github.com/crazycat911/weightless/tree/master/Art/UI/Doomed_Font): font asset · Doomed font used for on-screen text and UI styling · `Art/UI/Doomed_Font`
- [Objects Art](https://github.com/crazycat911/weightless/tree/master/Art/Objects): art assets · Visual assets for world objects and props · `Art/Objects`
- [Cave Art](https://github.com/crazycat911/weightless/tree/master/Art/Cave_Assets): art assets · Environment art used to build the level scene · `Art/Cave_Assets`
- [Aaron Art](https://github.com/crazycat911/weightless/tree/master/Art/Aaron): art assets · Additional art content bundled with the project · `Art/Aaron`

### Design

Non-runtime planning and narrative documents

- [Story](https://github.com/crazycat911/weightless/blob/master/Story.txt): design doc · Narrative and planning material outside the runtime · `Story.txt`
- [Plan](https://github.com/crazycat911/weightless/blob/master/Plan.docx): design doc · Project planning and concept notes · `Plan.docx`
- [Idea](https://github.com/crazycat911/weightless/blob/master/Idea.docx): design doc · Early design notes and concept material · `Idea.docx`

## Connections

- Project → Level: starts · Project bootstraps the main level scene
- Project → Player: loads · Player scene is part of the playable runtime
- Project → Cursor: uses · Project includes custom input/cursor behavior
- Level → Player: instantiates · Main level places the player into the world
- Level → Weight: instantiates · Level includes the weight gameplay object
- Level → Background: layers · Background provides the level's visual depth
- Level → End State: transitions · Level hands off to the end-state flow
- Player → Player Logic: driven by · Player scene behavior comes from its script
- Player → Player Area: contains · Player uses a dedicated interaction zone
- Cursor → Player: controls · Cursor/input layer feeds player interaction
- Player Area → Weight: interacts with · Player trigger zone likely detects the weight object
- Player → Weight: moves · Player interaction centers on the weight mechanic
- Background → Cave Art: uses · Background scene is built from environment art
- Weight → Objects Art: renders from · Weight scene uses object art assets
- Cursor → Cursor Art: renders from · Cursor logic depends on custom cursor artwork
- Level → UI Font: styles with · Level presentation likely uses the custom UI font
- Level → Story: informed by · Narrative/design docs support the level concept
- Project → Aaron Art: bundles · Project includes additional packaged art content
- Project → Plan: informed by · Planning documents sit alongside the runtime project
- Project → Idea: informed by · Early concept notes accompany the game build
