Files
millimeters-of-aluminum/Development_Status.md
olof.pettersson 7c689f6023 WIP
2025-10-03 05:47:55 +02:00

3.5 KiB

Project "Stardust Drifter" Development Status (Phase 0.2: Custom Physics & Ship Interior) Overview

The project is currently focused on Phase 0.2, which involves migrating from Godot's built-in RigidBody2D physics to a custom, manually integrated OrbitalBody2D model. This is critical for supporting the multi-scale physics simulation (orbital vs. local) and preparing for networked multiplayer. The core physics model is now stable and functional. I. Fully Implemented & Stable Systems Custom Physics Core

Physics Unification: All physically simulated objects (Spaceship, Module, Thruster, StructuralPiece) now inherit from the custom OrbitalBody2D class. This ensures a consistent hierarchy and simplified force routing.

Asymmetric Gravity Model (WIP Foundation): The OrbitalMechanics singleton is refactored to check if a body is a simulation root, applying forces manually (linear_velocity, angular_velocity). This is the foundation for implementing the SCALE_FACTOR for miniature ship gravity.

Modular Force Integration: Thrusters are now OrbitalBody2D children that correctly apply force to themselves. The force is then routed up the hierarchy to the root ship node, calculating torque based on its application point. This solved the uncontrollable spinning bug.

Modular Mass Aggregation (Top-Down): The OrbitalBody2D class recursively calculates the total mass of the ship by summing the base_mass of all its component children, even those nested behind non-physics containers.

Ship Interior & Crew Movement

Character Zero-G Movement: The PilotBall character now has complex, state-based movement logic to simulate zero-G physics inside the ship:

    No Control: Applies heavy drag if not overlapping a structural piece.

    Zero-G Interior: Allows sluggish control (simulating pushing off hullplates).

    Ladder Grip: Provides snappy, direct control (simulating climbing/gripping).

Ladder/Component Interaction: The character uses the interact input (Spacebar) to switch to the LADDER_GRIP state and uses the same input release to perform a velocity-based launch into the zero-G interior.

Ship Builder Foundation (Structural)

Component Base Class (Component.gd): Created to standardize component attachment, defining properties like grid_size and AttachmentType (Interior/Exterior).

Module Attachment Grid: The Module.gd script now exposes a get_attachment_points() method that calculates valid grid locations based on the placement and type of underlying structural pieces (Hullplate, Bulkhead).

II. Work-In-Progress (WIP) and Planned Systems

System

Status

Next Steps / Required Work

Ship Builder Plugin (UI)

WIP / Priority

Integrate the new attachment logic (Module.get_attachment_points()) into the CustomGrid.gd to visualize placement points. Implement the logic for the Component Tab in the dock.

Physics Cleanup (Celestial)

WIP / Required

Unify the inheritance of all celestial bodies (Star, Planet, etc.) to inherit from OrbitalBody2D, removing reliance on deprecated RigidBody2D base nodes.

Collision Handling

Planned

Implement the _recalculate_collision_shape() function in Module.gd to merge the structural piece collision shapes into a single, cohesive shape for the root ship.

Hull Sealing Logic

Designed

Implement the pressure and hull sealing logic using the HullVolume nodes.

Scaled Gravity Implementation

Designed

Implement the SCALE_FACTOR and ScaledOrbitalBody2D inheritance to test the multi-scale simulation (low-speed local movement vs. high-speed orbital movement).