Commit graph Aetheria/Assets/Scripts/ServerShared/ZoneData.cs
Author SHA1 Message Date
92d6153c2e Trojan swarms: a belt on a copy of its host's rail whose rocks ride the rail's period
Rulings trojans-first, trojans-ride-host-period-with-stations. AsteroidBeltData
key 11 RidesRail; AsteroidBelt.Extent is the one belt extent rule (replaces
Zone's inline farthest-rock loop and the Math.Max at the well node); a swarm's
Periods are its rail's period. The generator draws swarms from a stream of its
own (TrojanStream), so no other draw in the zone moves. Tuning defaults are the
spec's proposals; the code default TrojanProbability 0 draws none. Existing
annulus tests skip swarm rails. Builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 16:28:42 +02:00
Meta Vens
3a5b3b0bab Gravity grid-lowering: the drawn height is one Gravity Field pass over the zone's wells; gravity brushes and brush inputs deleted
Zone.WellReference owns each body's reference zero (GetHeight uses it). Gravity.cginc mirrors GravityField.Potential;
Brushes/Gravity Field draws depth = -h on layer 9 from a StructuredBuffer that GravityLowering.Lower fills from the
zone each frame; GravityLowering.CreateField makes the one quad. GravityFieldParityVerify renders it and compares every
texel with -Zone.GetHeight (max error 0.0059 u), the gradient with GetForce (0.03 degrees) and the wiring.

Deleted: the Gravity Well children of Planet, Gas Giant, Sun and PlanetOutpost prefabs, Wormhole 1's three gravity
children, their overrides in Main Menu and TestScene, five wormhole/wave materials and two brush shaders,
Planet.GravityWellDepth/Radius, BodyData keys 6-7, PlanetSettings.GravityDepth/GravityRadius (and the Settings.asset
keys). Surface Displacement culls layer 9 only. Headless build and tests not yet run at this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:11:25 +02:00
Meta Vens
021c4cbcbf Gravity: one potential per zone owns acceleration and height
GravityField is the law of one well (logarithmic tail, softened core).
Zone.GetForce and GetHeight sum it over the bodies; GetNormal derives from
the force for ship tilt; Flow and Ship read GetForce. Well strength, core
radius and Roche limit are PlanetSettings curves of mass, height
exaggeration K one global. Deletes GravityAcceleration, GravityReferenceRate,
GravityStrength, the PowerPulse well, GetNormal's finite differences and
BodyData.GravityDepthExponent. Settings.asset carries the calibrated curves.
Tests: PotentialOwnerTests, the moon's moon placement, retired keys over every
BodyData type, a body-derived giant sweep. Not yet built or run (verify job
follows); this commit may not build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 04:36:28 +02:00
Meta Vens
7d3fb29ed2 Gravity subtract: delete the zone bowl and the gas-giant and sun ripples
GetHeight sums body wells only. Removes RadialWaves, GasGiant wave fields,
GasGiantData keys 14-17, PlanetSettings Zone*/Wave* fields, the minimap
gravity range, the Boundary brush and Gravity Waves objects from the scene
and both prefabs. The five bowl fixtures become one WellFixture well at the
origin with unchanged expected numbers. Not yet built or tested: this commit
has not been through the Yggdrasil job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:34:20 +02:00
Meta Vens
c8d40eaf74 Boss gate: the exit gate fails closed; it opens only for a boss that spawned and then died
ZonePack.BossSpawned records the spawn, since a dead boss leaves no entity. RunGoal.ExitOpen requires it, so an exit zone
without a boss stays sealed, and ZoneGenerator logs that configuration by field and code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 06:41:33 +02:00
Meta Vens
d76756fd68 Mining Cut 3: field kinds, chunk visibility, the chunk query, and TargetRef
- FieldKindData, a catalog document (Q11): a kind's reflectivity per schematic
  cell and its generation weight. AetheriaStores routes it to the catalog.
- AsteroidBeltData.Kind, key 10 (Q16 B). FieldKinds.Assign is the one pick (a
  weighted choice by a stable hash of the belt's key); FieldKinds.Ensure gives
  a kindless belt its kind and saves it. ZoneGenerator calls it at generation
  and Zone calls it on first load, so an old belt is assigned once by the same
  rule and keeps its kind after later catalog edits.
- Zone.ChunkVisibility: Reflector's rule for a chunk -- kind cross-section x
  area in schematic cells x the light on it. Stored nowhere; a worn chunk dims,
  a broken one or a kindless belt's is dark.
- Zone.ChunksNear: the one chunk query, skipping belts whose annulus cannot
  reach. AsteroidBelt gains InnerRadius for that skip.
- TargetRef: an entity, a chunk, or none, with value equality and no ==.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:56:24 +02:00
Meta Vens
3b9f0f1d09 Cut 2: the dead mining path goes, and chunks get one owner
MiningTool (its Execute range-checked against nothing, since no writer ever
set AsteroidBelt/Asteroid) and Zone.MineAsteroid (mints nothing; the
SimpleCommodity drop was commented out) are deleted, per Q1=A: "Bring back
the drill, indeed." Union tag 26 is retired, not reused. ResourceScanner's
dead survey Execute and its scan-target fields go too; its authored Range/
MinimumDensity/ScanDuration stay pending Q2. PlanetSettings.MiningDifficulty
had one reader, now gone.

Chunk wear (damage, broken-until) moves off AsteroidBelt's three per-belt
dictionaries and onto Zone as the one owner (Q3=A): Zone.Wear is the only
writer, ChunkExists/ChunkRadius are the readers, and respawn is a lazy
comparison against zone time, never a per-tick loop. ChunkId is
(CultRecordKey Field, int Index) -- "Field", not "Belt", because chunks are
meant to generalize past asteroid belts to other debris fields later.

Persisted in ZonePack's new key 6 (List<ChunkWearPack>, nullable so an older
record with no key 6 loads with no wear instead of throwing), pruned of
healed, non-broken entries at pack.

The break threshold stays strictly greater-than, matching today's behaviour:
damage exactly equal to hitpoints does not yet break the chunk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 11:30:44 +02:00
Meta Vens
a2b54889b4 Move the ServerShared data model onto CultLib's CultCache
Cut 8b. Aetheria.Shared builds headless against GameCult.Caching and
GameCult.Caching.MessagePack at the pinned CultLib; the pin guard also
checks the Caching project exists.

Documents: [CultDocument("aetheria.<type>", "1")] with [MessagePackObject]
and integer [Key]s on the Q7 concrete types (the eight ItemData leaves,
Faction, FactionProductData, PersonalityAttribute, NameFile, OrbitData, the
four BodyData leaves, SavedZone, SavedGame, PlayerSettings, InputLayout).
SavedGame and PlayerSettings are [CultGlobal]; Name members are [CultName].
ItemData, CraftedItemData, EquippableItemData, BodyData and AgentTask lose
[MessagePackObject]; BodyData and AgentTask lose their [Union]s. InputLayout
moves into ServerShared so AetheriaStores can route it.

References: Guid and DatabaseLink<T> members become CultRecordRef<T>;
Guid-keyed maps become ref-keyed with [CultReference(..., many: true)];
ZonePack holds refs to orbit and body records. Runtime maps (Zone orbits,
bodies and belts, cargo ItemsOfType, agent targets) key by CultRecordKey.
Identity is the record key: ID comparisons become reference or key
comparisons. StatModifierData.RequireBehavior is a simple type name.

AetheriaStores.Open composes the catalog (read-only unless writable), run
and player stores, one home per type. CultRecordRefs carries IsSet, a
null-safe Get(ref), RefOf (key from TryGetHandle) and Upsert.
ItemManager.GetData is the one item resolution path. MathResolver is
declared by [assembly: CultCacheFormatterResolver].

Inspector attributes: text, range and asset path map onto CultLib's
CultInspector attributes (asset path only on string members); every
replaced Aetheria attribute keeps [Inspectable] for the runtime panel.

Builds: Aetheria.Shared. Does not build: AetherDb and the Unity project,
which follow.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 19:00:42 +02:00
Meta Vens
6140a06a0a Swap Unity.Mathematics usings for CultMath
Every Unity.Mathematics using, alias and qualified name under Assets\Scripts
and tools now names CultMath. The nine `using static ...noise;` lines are
gone: snoise lives on CultMath's math. UnityExtensions loses float4.ToColor
and Color.ToFloat4, which duplicate the bridge's ToColor and ToCultMath; the
float3 colour pair stays because the bridge has none.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:39:12 +02:00
Meta Vens
3dcfaf9783 Delete commented-out code blocks
Git keeps the history. SimpleCommodityData records its retired
MessagePack keys so they are not reused against old data.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 22:14:58 +02:00
Meta Vens
f568a7d14f Cut RethinkDB
Remove the vendored RethinkDb driver and its Linq provider, the Rethink
backing store, the already-stubbed RethinkConnection, the Rethink test
window, and the Rethink-only Remotion.Linq and Logging.Abstractions DLLs.
The database editor now works only on GameData/AetherDB.msgpack, with a
Save button replacing the dead Connect UI and broken JSON export.
RethinkTable becomes DatabaseCategory, which only groups editor entries.

Economy.Server still references Rethink; it was already unbuildable and
is handled separately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 21:48:45 +02:00
Meta Vens
7006a6b0dd Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
Meta Vens
bf03f27709 Demote zone construction data names 2026-06-14 21:30:31 +01:00
Meta Vens
7b605f049c Demote entity blueprints to construction 2026-06-14 20:40:13 +01:00
Meta Vens
7d176f4dc3 Move orbit geometry onto runtime owner 2026-06-14 19:43:48 +01:00
Meta Vens
bb38af3f6a Demote zone construction blueprint state 2026-06-14 19:37:24 +01:00
Meta Vens
12e73e983c Demote zone data from runtime projection 2026-06-13 21:41:34 +01:00
Meta Vens
f7154e2ccc Demote runtime catalog entry base 2026-06-13 20:19:00 +01:00
Meta Vens
ade6845e1d Demote runtime save packs to blueprints 2026-06-13 18:06:59 +01:00
Meta Vens
e7d33e5e43 Demote legacy runtime cache names 2026-06-13 17:22:03 +01:00
Meta Vens
fcd5df7449 Demote runtime DTO MessagePack metadata 2026-06-13 11:03:30 +01:00
Meta Vens
1c592b10e9 Demote runtime snapshots from MessagePack save shapes 2026-06-13 08:18:30 +01:00
Meta Vens
fc6eca6a93 Remove dead save JSON residue 2026-06-13 08:15:17 +01:00
Meta Vens
b0d2aa1156 Purge Newtonsoft state annotations 2026-06-13 04:56:50 +01:00
Meta Vens
639e701d63 Purge Rethink backing stores 2026-06-13 04:30:24 +01:00
Reinier Vens
6b0860b178 Bugfixes & Reactive Refactor
Added credits display to trade screen
Fixed bug in inventory screen where a failed drag from a cargo bay would make the item disappear until a refresh is triggered
Changed behavior of Escape key to exit menu if a menu is open
Fixed zone map gravity isolines to correctly track maximum gravity depth
Refactored orbit and planet data to replace reactive variables with regular ones
2025-07-18 00:21:33 +01:00
Reinier Vens
ecd52b20c8 UI Improvements
Target box now has bars for visibility and HP
Hit indicator appears when target is damaged by player's weapons
WIP narrative integration
2021-04-27 16:44:44 +01:00
Reinier Vens
a51c402fc5 Reflected Visibility
Ships are now more visible in lit areas (depending on cross section stat in Reflector behavior)
Refactored all behaviors to remove context & entity references (can get them from equipped item reference if needed)
Fixed crash when enemy dies of heatstroke while targeted
Exponential decay for visibility now uses correct time-independent formula
Refactored item inspection in properties panel (now consistent between equipped items vs. inventory and store items, shows effect of heat on stats)
Reordered item properties and added spacing between groups
2021-04-12 04:20:52 +01:00
Reinier Vens
11a9365f91 Trailer Stuff & More
Changed title font to Montserrat
Added trailer-specific camera transitions
Added key to hide UI
Fixed input listening while console is open
Added animated zone reveal effect in galaxy map
Added Ping action for sensors
Added debug console commands (e.g. give command to get any item in legendary+ quality)
Temporarily disabled wwise
Fixed infinite loop in weapon penetration code
Guided missiles now predict target position
Fixed hitscan weapons
Fixed invisible enemies bug
Fixed various loadout generator issues (can now generate turrets!)
Fixed wormhole crash when enemy is targeted
Saving/loading current zone time when exiting game (planets keep their positions)
Created slime simulation in test scene - WIP
2021-03-27 10:03:24 +00:00
Reinier Vens
73651bf16a Game Loop Galaxy Integration
Added sector map in Galaxy tab of in-game menu
Added player flag to Ship (replaces AGM.PlayerEntities)
Refactored sector map to depend on AGM
Moved sector generation to main menu
Main menu now supports resuming previous playthrough
Database and player settings now statically available via AGM
AGM saves current game state in PlayerSettings on exit
Sector generation is now asynchronous
Added progress callbacks to sector gen + progress dialog in menu
Confirmation Dialog / properties panel can now display dynamic text entry
Added zone title to Zone map
Eliminated ZoneData class (properties moved to ZonePack)
Sector, Zone and Entity serialization now fully functional
Entity settings now separate from player settings
Cleaned up old unused networking message classes
Name files now integrated with database cache
Added ability to save/load additive DB cache files in database panel
Cleaned up Wwise sound setup - removed redundant items & fixed spelling errors
Deleted Wwise cache + added to .gitignore
2021-03-15 11:40:46 +00:00
Reinier Vens
e6181c11dc Main Menu
Added Main Menu scene
Tweaked world map to incorporate secondary colors in zone icons + glowing links
Entity Serialization is now generic
Zone Serialization now includes entities
Fixed bug where wormhole traversal would unbind from player entity
Game Manager no longer spawns entities (loadout file format changed)
Wrote extension to randomly select weighted items from collections (for generating enemies)
2021-03-13 03:23:58 +00:00
Reinier Vens
cb4cb243e4 Freeform Zone Generation
Modified zone generator to create multiple fixed points with areas of influence tangent to each other and the zone boundary
Added weapon range icons
Modified gravity potential shader to fade out at maximum depth
2021-03-08 22:58:37 +00:00
Reinier Vens
9e88fcda95 Bigger Sectors & Various Bugfixes
Minimap works again
Stardust density is now proportional to gravity depth
Generated zones are double the size and better distributed
Orbital hierarchy actually working now (!)
Station start position actually orbits something now
Max gravity strength remapped to infinity (zone boundary is properly impassable now)
2020-12-23 22:38:30 +00:00
Reinier Vens
c4be204cd0 First Flight
Added MPL license headers
SectorRenderer renders entities in sector, manages particle systems for ship thrusters
Thrusters apply torque based on orientation and position relative to ship center of mass
GameManager controls the player ship's thrusters
Player can dock with station if they are near
2020-12-22 03:13:43 +00:00
Reinier Vens
1f90d3639a Asteroids & Refactoring
We have proper belts that hug the Grid, reactive properties for planet instance data, and more!
2020-12-01 00:16:11 +00:00
Reinier Vens
a981a46170 Asteroid Belts
Sector renderer is now also rendering asteroid belts. All gravity calculations have been moved out of monobehaviors.
2020-11-29 22:50:12 +00:00
Reinier Vens
d12d7c5c45 Initial ARPG Port
ARPG scene assets from old project are now correctly visualizing sectors generated by ZoneGenerator and updated by GameContext
2020-11-27 22:47:33 +00:00
hyperion51
a99b4e82f3 Colony Tab Interface
Properties panel supports read/write properties
Colony tab is now populated with colony data when a colony is selected
2020-06-01 03:11:04 +01:00
hyperion51
399b933a38 Mining
New Mining Controller Behavior and Mining Tool Behavior, tweaked a bunch of asteroid related stuff
2020-05-28 04:50:40 +01:00
hyperion51
7b33c21cd7 Orbit Calculation Hotfix
Turns out I've been calculating orbit positions all wrong this whole time, causing everything to orbit in the wrong direction and messing with my orbital placement; now the towing finally results in the station being placed correctly
2020-05-27 03:43:30 +01:00
hyperion51
98371fc453 Corporation Creation Screen
Added UI for creating a corporation; selecting a parent and choosing a name
2020-05-18 01:06:30 +01:00
hyperion51
c24c155673 Context Menus & Progress Bars
We now have a context menu UI for in-game actions, right click on an item to activate
Database view has a progress bar (finally!)
Data structures for Megacorps and loadouts
Towing task complete? needs testing
2020-05-10 00:16:33 +01:00
hyperion51
4f29bf24d0 Refactored Ghost Entities
Game Context was creating an empty OrbitalEntity for every planet; this was an ugly hack so I refactored it, as well as refactoring some object references to GUIDs as they should be
2020-05-04 00:07:36 +01:00
hyperion51
7c30a72c71 Asteroid Belt Upgrade
Asteroids now use custom particle system with collider so they can be clicked, plus they now orbit at varying speeds!
Fixed flags enum inspector; resources were being assigned to wrong body type: gas giants had planet resources, suns had gas giant resources, asteroids had nothing
2020-05-02 01:30:33 +01:00
hyperion51
d8ff1e2289 Stat Effects and Tech Tree Improvements
Tech tree layout is now correct thanks to MSAGL
Blueprint stat effects can now target item stats
Durability is now a PerformanceStat
2020-04-16 03:08:18 +01:00
hyperion51
fd92c80876 Blueprints & Resources
Added the ability to associate simple commodities with resource maps
Added resource placement to zone generator
Added crafting blueprints and stat addressing system
Refactored Thrusters and Shields into Behaviors
Fixed server losing database connection
Updated icons
2020-04-09 07:48:45 +01:00
hyperion51
b0556d3900 Asteroids
Added asteroids to zone generation
2020-03-30 17:54:54 +01:00
hyperion51
776e08a1d1 Local Zone Generation
Added the ability to generate zones locally in order to facilitate rapidly iterating generation parameters. Then of course I tweaked the shit out of the zone generation!
2020-03-30 03:11:57 +01:00
hyperion51
f756c5fe6a Generating and Displaying Zones 2020-03-29 04:19:24 +01:00
hyperion51
f8a6582154 Server Initialization and Serverside Galaxy/Zone Delivery
Made the master server connect to the database and now it's listening for and responding correctly to GalaxyRequestMessages and ZoneRequestMessages, generating the zone contents if they do not yet exist.
2020-03-27 01:53:03 +00:00