Aetheria/Assets/Scripts/Zone Display
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 22a54ccbaf Cut 1: belts are evaluated when asked, not simulated every tick
Zone.Update no longer threads a per-belt Task.Run over a double-buffered
Transforms/OrbitPosition pair. AsteroidBelt.Pose/Size are the one place a
chunk pose is computed, a pure function of zone time; Zone.ChunkPose and
Zone.EvaluateBelt read them at the zone's own time. MiningTool,
ResourceScanner and ZoneRenderer (belt matrices and AsteroidBeltUI) all read
through Zone instead of the deleted per-tick buffers; the renderer owns its
own float4[] buffer, filled fresh every frame.

Deleted: System.Threading/.Tasks usings, BeltUpdates, the wait loop, the
per-belt copy+Task.Run, NearestAsteroid (dead/broken reader), the private
UpdateAsteroidTransforms, and AsteroidBelt's four pose fields plus their
allocations. ~65 lines, matching the cut map's estimate.

miningprobe, densest zone of the operator's save (EAC-2265, 809 asteroids,
8 belts), rebuilt against this cut and rerun 10x each side:

before (branch point, 8bd25f6f/e729e6d6):
  Zone.Update wall 541-3654 us/tick, CPU 120-391 us/tick (7 clean runs)
  3/10 runs crashed: InvalidOperationException from Zone.GetOrbitPosition,
  the documented _updatedOrbits/Orbits data race between the main thread's
  Clear() and a belt Task.Run

after (this commit):
  Zone.Update wall 95-185 us/tick, CPU 99-152 us/tick, in line with the
  31-39 us "no belt work" baseline the map recorded -- belts are free per
  tick
  0/10 races
  ChunkPose has no buffer to go stale: ~0.12 u of parent+asteroid motion is
  visible across one 17 ms tick instead of being one tick behind

tests/Aetheria.Shared.Tests/MiningCut1Tests.cs (new, 260/260 suite green):
  ChunkPoseIsTheOrbitAtZoneTime, ChunkPoseDoesNotDependOnUpdateCadence,
  DamagedChunkShrinksAndABrokenOneHasNoSize -- each expected value is the
  closed-form orbit/size rule reimplemented in the test, never a call to
  AsteroidBelt.Pose/Size.

Negative grep (Zone.cs, "Zone Display", ServerShared/Behaviors) for
Task\.Run|System\.Threading|NewTransforms|\.Transforms\b|BeltUpdates|
NearestAsteroid|\.OrbitPosition\b|NewOrbitPosition: one hit, the commented
line in MineAsteroid that Cut 2 deletes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 01:27:16 +02:00
..
BlueNoiseProvider.cs Demo Hotfixes 2021-05-02 20:59:45 +01:00
BlueNoiseProvider.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00
CopyTransform.cs Trailer Stuff & More 2021-03-27 10:03:24 +00:00
CopyTransform.cs.meta Graphics Settings + Disabling Minimap Asteroids 2022-07-18 08:44:54 +01:00
GasGiantObject.cs Trailer Stuff & More 2021-03-27 10:03:24 +00:00
GasGiantObject.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00
GradientMapper.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
GradientMapper.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00
MapView.cs Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
MapView.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00
PlanetObject.cs Trailer Stuff & More 2021-03-27 10:03:24 +00:00
PlanetObject.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00
SunMaterial.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
SunMaterial.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00
SunObject.cs Trailer Stuff & More 2021-03-27 10:03:24 +00:00
SunObject.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00
VolumeCloudRenderer.cs Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
VolumeCloudRenderer.cs.meta Raymarching Cleanup 2022-07-13 04:15:20 +01:00
VolumeSampling.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
VolumeSampling.cs.meta Graphics Settings + Disabling Minimap Asteroids 2022-07-18 08:44:54 +01:00
WaveScroll.cs Trailer Stuff & More 2021-03-27 10:03:24 +00:00
WaveScroll.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00
ZoneRenderer.cs Cut 1: belts are evaluated when asked, not simulated every tick 2026-09-25 01:27:16 +02:00
ZoneRenderer.cs.meta Trailer Stuff & More 2021-03-27 10:03:24 +00:00