Knowledge belongs to a place: what this world knows is what a pad here can aim at - #28
Conversation
- DimensionProperties gains locallyKnownPlanets, taught by discoverPlanet - persist it only when non-empty; loading replaces rather than merges - a rocket asks the world it stands in, with the global set as the floor - pin the contract: one body's finds never reach its neighbour
- a moon is built in its parent's cell, so a cell names a family - address a body by its variant, the rank the derivation already uses - realize() takes the SystemBody; the probe verb states which one it means - pin it: a moon gets its own world and never inherits the planet's
- report the bodies a look actually named, for a caller that can act - the observatory teaches its own dimension and syncs it like a beacon - only a resolved, unobscured, full-detail look may teach anything
- teach every body of the beacon's system, moons included - stop re-announcing to the global set on load; the local sets hold it - return who learned, so the caller owns the syncing
- one-way crossing: a crystal fills a body's set, never the reverse - skip an address with no world and report landed of total - no new packet: the deposit syncs the way a beacon always has
- probe the production gate through a real rocket in the standing world - probe the Deposit path and report which worlds landed, not just how many - mint the target for the negative case so nothing else can satisfy it
- a client e2e presses Deposit and asks the server what it changed - the crystal names a minted world, so a survey cannot have taught it - read a crystal without depositing it, or the probe performs the act - with research off a world nobody knows is still selectable
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bcb9e58b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (candidate.kind() == body.kind() | ||
| && candidate.orbitalDistance() == body.orbitalDistance() | ||
| && candidate.name().sameCell(body.name())) { |
There was a problem hiding this comment.
Distinguish sibling moons when resolving variants
When a generated planet has multiple moons, every sibling has the same cell, MOON kind, and parent-relative orbitalDistance(), so this predicate maps all of them to the first moon's variant. Approaching a later moon will therefore realize the first moon or, once that moon is realized, descend into its dimension instead of the body the ship reached; include the moon's distinct offset/orbital law in the identity.
Useful? React with 👍 / 👎.
| // A moon whose parent is not in its own cell cannot be built: the family is what gives it its | ||
| // star, its orbit and its sky, and by construction the parent is always here. | ||
| if (parentBody == null && target.kind() == SystemBodyKind.MOON) { | ||
| return Constants.INVALID_PLANET; |
There was a problem hiding this comment.
Require a realized parent before materializing a moon
When a ship approaches an unvisited moon before its rocky parent has been realized, parentBody is non-null so this check permits realization even though its dimension is still invalid. materialize() consequently skips setParentPlanet, registers the moon as a standalone planet, and never repairs that relationship when the parent is later realized; either defer the moon until its parent has a dimension or explicitly preserve and establish the parent relationship.
Useful? React with 👍 / 👎.
Knowing where a place is stops being a property of the game and becomes a property of the ground you are standing on. Until now a planet was either known to everybody or to nobody: a beacon planted anywhere announced it to every launch pad in the world, and a telescope survey - the one thing that actually finds places - wrote into a crystal that a tier-1 rocket could not read at all. Now each world carries what it has learned, the pack's authored list is the floor under all of them, and the two discovery systems finally touch at one deliberate point.
Two things to do, and nothing in the code will do either for you:
planetsMustBeDiscoveredis off in your pack: there is nothing here for you. Everything below is what happens when destinations must be discovered. With the flag off every world stays selectable from every pad exactly as it is today, no gate is added anywhere, and condition 2 does not apply.Flying to a moon
A moon can be landed on, and a descent aimed at one no longer puts you on its planet. A moon is generated inside its parent's cell so that a planet and its moons travel as one destination - which meant an address named a family while the code that mints worlds treated it as naming an object. The first body of a cell to be approached got the world; every later approach, moon or planet, was answered with that same world, silently.
This touches procedurally generated moons only. A
<moon>written into planetDefs is a body with its own identity and has always been landed on correctly. An existing world needs nothing done to it: a planet keeps the world it was already given, and the moons that could not be reached become reachable.Finding somewhere, and being able to fly there
A survey teaches the world it was made from. Point an observatory at a patch of sky, and what it makes out is written into the crystal AND into the knowledge of the body the machine stands on - so a launch pad on that world can afterwards be aimed at what the telescope found. Where you build the instrument now matters: the world under it learns, its neighbour does not.
Only what the instrument RESOLVED can teach anything. A system that merely registered as a point of light, one that dust obscured, and one the operator set to record positions only all leave the ground exactly as ignorant as it was. How good the instrument is, and what the operator asked it for, therefore bound where a tier-1 rocket may go - not just how detailed a crystal is.
A crystal can be put down. The observatory has a
Depositcontrol: it reads the addresses in the machine into what this world knows, so knowledge somebody carried here becomes knowledge a pad here can use. It costs no power and no data - the finding has already been paid for; this is only writing it down. The machine reports how many of how many addresses landed rather than reporting silent success.An address only reaches tier-1 once the place is a real world. A procedurally generated body has no world until a tier-2 ship actually descends to it, and an address with no world behind it has nothing for a rocket to fly to, so a deposit skips it. Survey it again after somebody has landed there and the address carries the world it now has. That is the shape of the loop: tier-2 goes first and makes the place real, tier-1 follows.
The crossing is one-way, on purpose. A crystal deposits into a world's set. A world's set never feeds a crystal, a navigation console, or a jump target. The two discovery systems stay separate; this is the single sanctioned bridge between them.
What a beacon means now
A beacon is a local announcement rather than a galactic one. Planting one teaches the bodies of its own system - moons included - and nothing outside it. What it spreads is knowledge among neighbours, which is what a beacon is for; carrying a place's address further is the crystal's job.
On a server
Knowledge is communal per world, not per player. One person building an observatory opens those destinations for everyone who launches from that world - there is no per-player research state to track, and none to lose when somebody leaves.
A discovery is broadcast as that world's properties, the way a beacon always has been. No new packet is introduced. It is a player-driven event - a survey step, a beacon, a deposit - and priced for that frequency; nothing here discovers on a tick.
Fixes
SILENT- a procedural moon could never be realized: approaching one returned its planet's dimension, and the descent landed the ship on the planet with no error anywhere.Internals worth knowing
No addon is known to build against these, so nothing here asks anyone to migrate.
DimensionPropertiesgainslocallyKnownPlanetswithdiscoverPlanet/isPlanetKnownHere/getLocallyKnownPlanets, persisted as an int array underlocallyKnownPlanetsand cleared before a read.EntityRocket.isPlanetKnownasks the world it is standing in after the global set, instead of the global set alone.UniverseRegistry.realizedDimAtandrealizeBodytake a body'svariant;realizableBodiesAtandvariantOfare new, andPlanetRealizer.realizetakes theSystemBodythat was approached rather than its address.TelescopeScan.characterise/resolveLook/resolveBatchaccept an optionalIntConsumerthat reports every body a look actually named.