Demote zone construction blueprint state

This commit is contained in:
Meta Vens 2026-06-14 19:37:24 +01:00
commit bb38af3f6a
8 changed files with 44 additions and 67 deletions

Binary file not shown.

View file

@ -58,7 +58,7 @@ or mutate game state locally.
The old `SavedGame`/`SavedZone` DTOs and `Galaxy` loader constructor have also
been deleted; the new document family is live Verse run/zone state, not a
bespoke save-file format.
The dead `SavedStory` JSON DTO is gone. `RuntimeZoneBlueprint` and
The dead `SavedStory` JSON DTO is gone. `ZoneConstructionBlueprint` and
`RuntimeEntityBlueprint` remain in-memory construction/loadout projections for
Unity runtime code, with `RuntimeEntityBlueprintProjector` capturing and
instantiating those projections. They no longer carry save-file or serializer
@ -120,8 +120,8 @@ documents are `aetheria.corporation.v2` records because runtime generation
needs actual allegiance weights, not only display counts. Runtime checkpoints
now persist session faction relationships into typed run state, and runtime
sessions publish typed state-host liveness. Zone checkpoints persist generated
orbit/body rows into `AetheriaZoneState`, so `RuntimeZoneBlueprint` is no
longer the only surface carrying celestial graph facts. Entity checkpoints
orbit/body rows into `AetheriaZoneState`, so `ZoneConstructionBlueprint` is a
one-shot construction input rather than the retained surface carrying celestial graph facts. Entity checkpoints
persist hull simulation grids into `AetheriaEntitySnapshot`, so
`RuntimeEntityBlueprint` is no longer the only surface carrying those live
values. Broader runtime object graphs, typed behavior factory construction, and

View file

@ -1830,7 +1830,7 @@ public class ActionGameManager : MonoBehaviour
if (galaxyZone.Contents == null)
{
var runtimeBlueprint = ZoneGenerator.GenerateZone(
var constructionBlueprint = ZoneGenerator.GenerateZone(
ItemManager,
RuntimeCatalog,
Settings.ZoneSettings,
@ -1838,7 +1838,7 @@ public class ActionGameManager : MonoBehaviour
galaxyZone,
IsTutorial
);
galaxyZone.Contents = new Zone(ItemManager, Settings.PlanetSettings, runtimeBlueprint, galaxyZone, CurrentGalaxy);
galaxyZone.Contents = new Zone(ItemManager, Settings.PlanetSettings, constructionBlueprint, galaxyZone, CurrentGalaxy);
}
Zone = galaxyZone.Contents;
PlayMusic(MusicType.Overworld);

View file

@ -37,16 +37,18 @@ public class Zone
{
get => (float) _time;
}
public RuntimeZoneBlueprint Blueprint { get; }
public float Radius { get; }
public float Mass { get; }
public GalaxyZone GalaxyZone { get; }
public Galaxy Galaxy { get; }
public Zone(ItemManager itemManager, PlanetSettings settings, RuntimeZoneBlueprint blueprint, GalaxyZone galaxyZone, Galaxy galaxy)
public Zone(ItemManager itemManager, PlanetSettings settings, ZoneConstructionBlueprint blueprint, GalaxyZone galaxyZone, Galaxy galaxy)
{
_time = blueprint.Time;
GalaxyZone = galaxyZone;
Galaxy = galaxy;
Blueprint = blueprint;
Radius = blueprint.Radius;
Mass = blueprint.Mass;
_itemManager = itemManager;
Settings = settings;
_random = new Random(Convert.ToUInt32(abs(galaxyZone?.Name.GetHashCode() ?? 1337)));
@ -100,35 +102,6 @@ public class Zone
return agent;
}
public RuntimeZoneBlueprint CaptureBlueprint()
{
return new RuntimeZoneBlueprint
{
Radius = Blueprint.Radius,
Mass = Blueprint.Mass,
Entities = Entities.Select(RuntimeEntityBlueprintProjector.CaptureBlueprint).ToList(),
Orbits = Orbits.Values.Select(o=>o.ToData()).ToList(),
Planets = CaptureBodyData().ToList(),
Time = _time
};
}
public IEnumerable<BodyData> CaptureBodyData()
{
foreach (var orbit in Orbits.Values)
{
var planet = PlanetInstances.Values.FirstOrDefault(body => body.OrbitId == orbit.ID);
if (planet != null)
{
yield return planet.ToData();
continue;
}
var belt = AsteroidBelts.Values.FirstOrDefault(body => body.Orbit == orbit.ID);
if (belt != null) yield return belt.ToData();
}
}
public void AddOrbit(OrbitData orbit)
{
Orbits.Add(orbit.ID, new Orbit(Settings, orbit));
@ -334,7 +307,7 @@ public class Zone
public float GetHeight(float2 position)
{
var result = -PowerPulse(length(position)/(Blueprint.Radius*2), Settings.ZoneDepthExponent) * Settings.ZoneDepth;
var result = -PowerPulse(length(position)/(Radius*2), Settings.ZoneDepthExponent) * Settings.ZoneDepth;
foreach (var body in PlanetInstances.Values)
{
var p = position - body.Orbit.Position;
@ -419,7 +392,6 @@ public class Planet
{
public Orbit Orbit;
protected readonly PlanetSettings Settings;
private readonly BodyData _data;
public Guid ID { get; }
public string Name { get; }
public Guid OrbitId { get; }
@ -437,7 +409,6 @@ public class Planet
{
Settings = settings;
Orbit = orbit;
_data = data;
ID = data.ID;
Name = data.Name ?? "";
OrbitId = data.Orbit;
@ -457,7 +428,6 @@ public class Planet
GravityWellDepth = Settings.GravityDepth.Evaluate(Mass) * GravityDepthMultiplier;
}
public BodyData ToData() => _data;
}
public class GasGiant : Planet
@ -526,7 +496,6 @@ public class Sun : GasGiant
public class AsteroidBelt
{
private readonly AsteroidBeltData _data;
private readonly Asteroid[] _asteroids;
public Guid ID { get; }
public string Name { get; }
@ -548,7 +517,6 @@ public class AsteroidBelt
public AsteroidBelt(AsteroidBeltData data)
{
_data = data;
_asteroids = data.Asteroids;
ID = data.ID;
Name = data.Name ?? "";
@ -570,12 +538,10 @@ public class AsteroidBelt
public Asteroid GetAsteroid(int asteroid) => _asteroids[asteroid];
public AsteroidBeltData ToData() => _data;
}
public class Orbit
{
private readonly OrbitData _data;
public Guid ID { get; }
public Guid Parent { get; }
public float Distance { get; }
@ -588,7 +554,6 @@ public class Orbit
public Orbit(PlanetSettings settings, OrbitData data)
{
_data = data;
ID = data.ID;
Parent = data.Parent;
Distance = data.Distance;
@ -597,5 +562,4 @@ public class Orbit
Period = settings.OrbitPeriod.Evaluate(data.Distance);
}
public OrbitData ToData() => _data;
}

View file

@ -11,7 +11,7 @@ using static Unity.Mathematics.math;
using float2 = Unity.Mathematics.float2;
using float3 = Unity.Mathematics.float3;
public class RuntimeZoneBlueprint
public class ZoneConstructionBlueprint
{
public List<BodyData> Planets = new List<BodyData>();
public List<OrbitData> Orbits = new List<OrbitData>();

View file

@ -35,7 +35,7 @@ public static class ZoneGenerator
private const int MaximumPlacementSamples = 32;
public static RuntimeZoneBlueprint GenerateZone(
public static ZoneConstructionBlueprint GenerateZone(
ItemManager itemManager,
AetheriaRuntimeCatalogSnapshot runtimeCatalog,
ZoneGenerationSettings zoneSettings,
@ -43,7 +43,7 @@ public static class ZoneGenerator
GalaxyZone galaxyZone,
bool isTutorial = false)
{
var blueprint = new RuntimeZoneBlueprint();
var blueprint = new ZoneConstructionBlueprint();
var random = new Random(unchecked((uint) galaxyZone.Name.GetHashCode()) ^ hash(galaxyZone.Position));

View file

@ -185,9 +185,9 @@ public class ZoneRenderer : MonoBehaviour
{
ClearZone();
Zone = zone;
SectorBrushes.localScale = zone.Blueprint.Radius * 2 * Vector3.one;
SlimeGravityCamera.orthographicSize = zone.Blueprint.Radius;
SlimeRenderer.ZoneRadius = zone.Blueprint.Radius;
SectorBrushes.localScale = zone.Radius * 2 * Vector3.one;
SlimeGravityCamera.orthographicSize = zone.Radius;
SlimeRenderer.ZoneRadius = zone.Radius;
foreach (var orbit in zone.Orbits.Values)
{
var planet = zone.PlanetInstances.Values.FirstOrDefault(body => body.OrbitId == orbit.ID);
@ -228,7 +228,7 @@ public class ZoneRenderer : MonoBehaviour
AddWormhole(new Wormhole
{
Target = adjacentZone,
Position = dir * zone.Blueprint.Radius * Settings.WormholeDistanceRatio
Position = dir * zone.Radius * Settings.WormholeDistanceRatio
});
}
}

View file

@ -69,7 +69,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
`GameData/KeyboardLayouts/*.msgpack` authority paths are disabled or deleted.
The old `SavedGame`/`SavedZone` DTOs and `Galaxy` save-loader constructor are
deleted. The dead `SavedStory` JSON DTO is deleted.
`RuntimeZoneBlueprint`, body/orbit zone runtime data, item-instance runtime
`ZoneConstructionBlueprint`, body/orbit zone runtime data, item-instance runtime
data, `Ship`, and `EntitySettings` remain as runtime
construction/loadout/session projections, but no longer use save-file or
serializer vocabulary or declare themselves as MessagePack persistence
@ -126,7 +126,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
groups, and a stat grid. This proves the `.zone` replacement graph is durable typed state. Unity
now queues current-zone/current-entity-collection snapshots, current
action-bar bindings, and current faction relationship rows through the
runtime commit log during run checkpoints; `RuntimeZoneBlueprint` and
runtime commit log during run checkpoints; `ZoneConstructionBlueprint` and
`RuntimeEntityBlueprint` remain runtime construction/loadout projections
rather than durable file formats. Runtime blueprints no longer capture or
restore live temperature, armor, max-armor, or hull-conductivity grids; those
@ -147,9 +147,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
resources, gravity/body multipliers, asteroid belt entries, and gas/sun
visual parameters now survive through the typed pending commit lane into
`AetheriaZoneState`. Asteroid belt runtime damage, respawn timers, and
miner accumulators also persist on typed asteroid rows. `RuntimeZoneBlueprint`
feeds static generated geometry, but it is no longer the only place generated
celestial graph facts can live.
miner accumulators also persist on typed asteroid rows. `ZoneConstructionBlueprint`
feeds one-shot generated geometry into `Zone`; live zone radius/mass/orbit/body
reads come from runtime wrappers and typed checkpoint projection rather than
a retained construction payload.
- Run checkpoint entity snapshots include typed simulation stat grids for
temperature, thermal mass, armor, max armor, and hull-conductivity axes.
They also carry public runtime session state: velocity, target entity
@ -799,7 +800,7 @@ First Aetheria surfaces to publish:
incidental drain status.
- Done: extend run checkpoint commits and smoke coverage to carry typed
zone orbit/body rows into `AetheriaZoneState`, so generated celestial
graph facts no longer live only inside `RuntimeZoneBlueprint`.
graph facts no longer live only inside construction blueprints.
- Done: extend run checkpoint commits and smoke coverage to carry typed
entity simulation stat grids into `AetheriaEntitySnapshot`, so
temperature/armor/conductivity no longer live only in runtime blueprints.
@ -1025,23 +1026,23 @@ First Aetheria surfaces to publish:
therefore earned deletion rather than a new runtime metadata owner.
- Done: move runtime orbit parent/phase/distance/fixed-position reads off
`OrbitData`; `Zone`, `ActionGameManager`, and `ZoneRenderer` consume
`Orbit` runtime properties, with `Orbit.ToData()` retained only for
blueprint capture.
`Orbit` runtime properties, and the old `Orbit.ToData()` construction
capture bridge is deleted.
- Done: move live asteroid-belt simulation, scanning, and mesh setup reads
off `AsteroidBeltData`; `Zone`, `ResourceScanner`, and `AsteroidBeltUI`
consume `AsteroidBelt` runtime asteroid/resource/orbit properties, with
`AsteroidBelt.ToData()` retained for future capture/migration cuts.
consume `AsteroidBelt` runtime asteroid/resource/orbit properties, and
the old `AsteroidBelt.ToData()` construction capture bridge is deleted.
- Done: move live planet mass/orbit/gravity reads off `BodyData`; `Zone`
gravity evaluation and `ZoneRenderer` consume `Planet` runtime properties,
with `Planet.ToData()` retained as the temporary capture/config bridge.
and the old `Planet.ToData()` construction capture bridge is deleted.
- Done: move typed zone orbit snapshot projection off
`RuntimeZoneBlueprint.Orbits`; run checkpoint commits now project current
construction-blueprint orbit rows; run checkpoint commits now project current
`Zone.Orbits` runtime wrappers into typed orbit snapshot rows.
- Done: move typed zone body snapshot projection off `BodyData` and
`AsteroidBeltData`; run checkpoint commits now project `Planet` and
`AsteroidBelt` runtime wrappers, including body resources, asteroid
runtime damage/respawn/miner accumulators, and gas/sun visual fields.
- Done: move visited-sector summary counts off `RuntimeZoneBlueprint`
- Done: move visited-sector summary counts off construction-blueprint
body/entity DTOs; `SectorRenderer` now counts planets, belts, gas giants,
stars, stations, turrets, and ships from `GalaxyZone.Contents` runtime
wrappers and live entities.
@ -1062,6 +1063,10 @@ First Aetheria surfaces to publish:
`ActionGameManager` keeps typed `AetheriaRuntimeLoadoutTemplateSnapshot`
documents and projects blueprints only for pricing, instantiation, and
commit boundaries.
- Done: rename `RuntimeZoneBlueprint` to `ZoneConstructionBlueprint`, delete
retained construction-payload state from `Zone`, and delete the unused
construction-capture bridge; `Zone` now keeps radius/mass as copied runtime
facts after construction.
- Done: delete the legacy `Behaviors` lists from `ConsumableItemData` and
`EquippableItemData`; item DTOs can no longer carry behavior config state.
- Done: move runtime blueprint price aggregation and conductivity restore
@ -1306,6 +1311,9 @@ First Aetheria surfaces to publish:
`RuntimeZoneBlueprint`/`RuntimeEntityBlueprint`, and rename loadout
collections away from save-payload vocabulary. These are now explicitly
runtime construction projections, not portable state authority.
- Done: continue the zone demotion by renaming `RuntimeZoneBlueprint` to
`ZoneConstructionBlueprint`; the old intermediate name no longer appears
in live Unity source.
- Done: rename the old `EntitySerializer` runtime helper to
`RuntimeEntityBlueprintProjector`; it captures/instantiates runtime
blueprint projections and no longer presents itself as a serializer.
@ -1360,6 +1368,11 @@ First Aetheria surfaces to publish:
- Current Unity batchmode compile probes are blocked while another Unity editor
instance has `E:/Projects/Aetheria` open; typed state builds and smokes remain
the available verification until the editor lock is released.
- Direct `dotnet build .\Assembly-CSharp.csproj --no-restore` is not currently
a valid gameplay compile substitute: the generated Unity project references a
missing root-level `GameCult.Aetheria.State.Unity.csproj` instead of the live
package/state project path, so it fails before reaching the gameplay rename
checks.
- Unity batchmode compile with Editor `6000.4.2f1` returned cleanly after the
runtime catalog resolver cut; `Logs/codex-unity-compile.log` has no compiler
error hits.