Skip to content

Add accretion survival loop, derived constants, and cinematic polish#1

Merged
ysSemanticSystems merged 8 commits into
mainfrom
feat/survival-loop
Jun 21, 2026
Merged

Add accretion survival loop, derived constants, and cinematic polish#1
ysSemanticSystems merged 8 commits into
mainfrom
feat/survival-loop

Conversation

@ysSemanticSystems

Copy link
Copy Markdown
Owner

Summary

Turns the tech demo into a playable game built on the Eddington limit as a real risk/reward economy: mass grows in compressed time, a disk-integrity meter drains when super-Eddington and disruption blows the disk apart, and growth reclassifies the hole toward milestone goals. Adds the supporting physics (mass growth, Salpeter time, Kerr spin efficiency, ISCO QPO frequency), derives sigma_sb/sigma_T from fundamentals instead of tabulating them, and adds cinematic camera + physics-driven graphics.

Exit criteria

  • make check passes locally (generators byte-stable, invariants C1–C6, tests, clippy, build).
  • Physics changes include primary-source citations and astropy-oracle / analytic tests (tests/dynamics.rs, derived-constant cases in tests/golden.rs).
  • No physics leaked into godot-ext, shaders, or GDScript (rule 10) — new functions live in accretion-core; bindings/GDScript only delegate and present.
  • CHANGELOG.md updated under [Unreleased].

Notes:

  • Godot is not on the agent's PATH, so the in-editor render pass was not run here (the make check headless step self-skips). Please verify scenes/Main.tscn in Godot 4.7.
  • constants.rs now holds only fundamentals; rules 11 and 02 updated for the fundamental-vs-derived provenance split.

How to test

```bash
./scripts/setup-hooks.sh # if fresh clone
make check

Godot 4.7 → run scenes/Main.tscn

```

AI assistance

This PR was assisted by an AI agent (yes). This is the single point of AI disclosure — not per-commit trailers.

Made with Cursor

Turn the tech demo into a playable game built on the Eddington limit as a
real risk/reward economy.

Dynamics (accretion-core, each cited + golden/identity tested):
- advance_mass integrates dM/dt = (1 - eta) Mdot (Frank/King/Raine 2002).
- salpeter_time_s, the Eddington e-folding time (Salpeter 1964).
- integrity_rate = 1 - lambda, radiation-modified support (Eddington 1926).
- isco_specific_energy / efficiency_from_spin from the Kerr ISCO binding
  energy (Bardeen-Press-Teukolsky 1972; Thorne 1974).
- orbital_frequency_hz, the prograde ISCO QPO scale (BPT 1972).

Constants: constants.rs now holds only fundamentals (added M_E, ALPHA);
sigma_sb = 2 pi^5 k_B^4 / (15 c^2 h^3) and sigma_T = (8 pi/3)(alpha hbar/m_e c)^2
are derived in derived.rs and pinned against the astropy oracle. Rules 11
and 02 updated for the fundamental-vs-derived provenance split.

Game loop (GDScript, presentation only): mass evolves in compressed time,
a disk-integrity meter drains super-Eddington and disruption blows the disk
apart, growth reclassifies the hole with milestone banners and a next-goal
bar, and presets form a difficulty ramp.

Graphics/camera: radial blackbody gradient and bounded HDR bloom tone-mapped
from the inner-edge temperature, spin-driven inner-edge/horizon tightening,
fixed the unassigned disc_texture so the disk renders, and damped orbit/zoom
with idle auto-orbit and an intro dolly.

Reworded over-used "honest" marketing phrasing to rigorous/first-principles
in user-facing docs (the honesty rule and prime directive are unchanged).
Give the survival loop replay value: win by reaching M87*, lose after three
super-Eddington disruptions, live score with persisted high score, end-of-run
overlay, and R/Enter restart. Challenge presets 1/2/3 set different starting
conditions; the HUD shows the lambda=1 feed ceiling.

Physics: mdot_at_eddington, ISCO specific angular momentum (BPT 1972), and
advance_spin from accreted ISCO angular momentum (King & Raine 2002), with
identity tests. Presentation: QPO hotspot flicker in the disk shader driven
from the Rust ISCO orbital frequency.
Refactor physics into eddington, kerr, disk, evolution, and colorimetry
with per-module unit tests and a cross-module integration suite. Pin
godot-ext builds to ./target/ so Godot loads the current dylib, add a
headless BlackHole API smoke test, and auto-sync efficiency from spin in
Rust so GDScript no longer calls efficiency_from_spin.
Linux runners lack /Applications/Godot.app; download the official 4.7
binary and set GODOT_BIN so make godot-smoke runs in make check.
Copy the built cdylib into res://bin/ so Godot loads a fresh artifact
outside gitignored target/. Disable hot reload for stable headless CI,
install Godot 4.7 on Linux runners, and verify the .so before smoke.
Godot skips gitignored paths when resolving res:// URLs, which prevented
Linux CI from loading libgodot_ext.so. Poll for BlackHole registration
in the smoke test and surface verbose Godot output on failure.
Fresh clones lack .godot/extension_list.cfg, so Godot never loads
accretion.gdextension until the editor scans the project once. Run a
headless editor boot when needed before the BlackHole API smoke test.
@ysSemanticSystems ysSemanticSystems merged commit 8cc50be into main Jun 21, 2026
1 check passed
@ysSemanticSystems ysSemanticSystems deleted the feat/survival-loop branch June 21, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant