Add accretion survival loop, derived constants, and cinematic polish#1
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_Tfrom fundamentals instead of tabulating them, and adds cinematic camera + physics-driven graphics.Exit criteria
make checkpasses locally (generators byte-stable, invariants C1–C6, tests, clippy, build).tests/dynamics.rs, derived-constant cases intests/golden.rs).godot-ext, shaders, or GDScript (rule 10) — new functions live inaccretion-core; bindings/GDScript only delegate and present.CHANGELOG.mdupdated under[Unreleased].Notes:
make checkheadless step self-skips). Please verifyscenes/Main.tscnin Godot 4.7.constants.rsnow 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