feat(worldgen): asteroid belts — shared orbit annuli, belt mining density & ring-colour families - #688
Merged
Merged
Conversation
marceld23
force-pushed
the
feat/asteroid-belts
branch
3 times, most recently
from
August 3, 2026 15:26
0651e08 to
b2e62ae
Compare
…sity & ring-colour families (#683, #684) Asteroids no longer scatter across planet orbits: new worlds place all landable asteroids of a system on 1-2 shared belt annuli (outer belt one orbit step past the outermost planet; big systems may roll an inner belt into a wide orbit gap), gated on WorldDescription.AsteroidBelts so existing saves regenerate unchanged. Every asteroid body carries a mineable rock cluster at its flight-view position (shared SystemBodyLayout.FlightViewScale), launching from an asteroid spawns a dense 9-rock field, and the flight chart draws grouped members as one localized belt band instead of stacked orbit rings. Planetary rings additionally roll a seeded colour family (ice/tan/grey/rare violet) instead of near-constant grey. closes #683 closes #684 Co-Authored-By: Claude Fable 5 <[email protected]>
marceld23
force-pushed
the
feat/asteroid-belts
branch
from
August 3, 2026 15:36
b2e62ae to
0802ec6
Compare
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
Real asteroid belts (#683) + seeded planetary-ring colour families (#684).
Worldgen (new worlds only): all landable asteroids of a system now share 1–2 orbit annuli instead of scattering uniformly across the disc (which regularly parked them inside planet orbit lanes). The outer belt sits one orbit step beyond the outermost planet; big systems (5+ planets, 4+ asteroids) may roll a second, inner belt into a ≥620-unit gap between two planet orbits. Members occupy evenly spaced angular slots with a small wobble, so the flight-view clear-gap guarantee holds by construction. Geometry comes from new Hash01 salts (8xx series), never the body rng — and everything is gated on a new
WorldDescription.AsteroidBeltsflag (defaults false;ServerConfig's creation-time description carries true, mirroringSystemVariance;--belts offescape hatch), so existing universes regenerate byte-identically.Mining density:
SystemBodyLayout.FlightViewScale; total capped at 24). Flying into the belt now means flying through rocks worth mining.CurrentLocationIdholds the default planet TYPE ("varied"), not a body id — the space-instance anchor now falls back to the save's active location for the asteroid logic. The hostile-archetype lookup deliberately keeps the legacy raw-id behaviour so fresh-start difficulty in pirate-space starts is unchanged.Flight chart: belt members are grouped by orbit radius and drawn as ONE translucent band with a localized label (
ui.map.belt: "Asteroid belt" / "Asteroidengürtel") instead of N stacked orbit rings; legacy scattered worlds keep per-body rings.Ring colours (#684):
PlanetRings.TintFornow rolls a seeded material family per ring system — ice white (55 %), dusty tan (20 %), rocky grey (15 %), rare pale violet (10 %) — consistent across flight view, surface sky and horizon band. Retroactive-safe: sameRingSeed→ same tilt/bands, only richer tints.Tests
UniverseTests.Belts_AsteroidsShareOneOrTwoAnnuli_ClearOfPlanetOrbits(annulus clustering, ≥200-unit clearance from every planet orbit, second-belt coverage),Belts_LeavePlanetsAndMoonsExactlyWhereTheLegacyLayoutPutThem,SpaceCombatTests.EnterSpace_ParksMineableClustersAtTheSystemsAsteroidBodies,EnterSpace_AtAnAsteroidBody_SpawnsADenseLocalField.SystemBodyLayoutTests+SystemChartLayoutTestssweeps now include a belt-enabled pass; star-centring zoom budget raised 2.0→2.1 (measured ~2.01× with the outer belt, documented in the test).closes #683
closes #684
🤖 Generated with Claude Code