[BE] TargetKind + ScanBody + survey report generation (in-memory) #942

Closed
opened 2026-08-06 16:11:59 +00:00 by spikerj · 2 comments
Owner

Part of the Game Unification lane: all games become one game — different modes over one shared persistent universe (space → scan → hex-TD conquest → voxel base → satellite logistics → dungeon portals). Clients = Angular web + Godot (iOS/Android embed Godot). Full plan: ~/.claude/plans/i-want-a-plan-breezy-eclipse.md on the 4090.

Part of EPIC #927.

New Survey{Models,Commands,Events}.cs: TargetKind enum (Entity/Planet/Star/Moon/Asteroid); ScanBodyCommand (union tag 48); ScanBodyAckEvent (79), SurveyReportEvent (80), SurveyReportListEvent (81); SurveyReport doc. TargetCommand += TargetKind + TargetBodyId; fix ship-pilot no-op in SpaceZone.ProcessTargetCommandAsync (~4701: fall back from owned-spacecraft to the player's ship). All four serializer registries (MessagePackSerializer.cs, JsonPacketSerializer.cs, GameServerJsonContext.cs, union tags) — existing switch-coverage tests enforce completeness.

ProcessScanBodyCommand: validate range (SensorRange vs distance−radius) + energy (~20); duration clamp(6s·50/ScanStrength, 2-15s) ticked in a zone dict; quality tiers by ScanStrength (<25 Basic / 25-74 Standard / ≥75 Detailed). New GameServer/Data/BodyPropertiesMapper.cs + DifficultyCalculator.cs (FNV-1a of body id, NEVER string.GetHashCode; golden-value tests) + SurveyReportGenerator.cs wiring the dead Elements.cs/ResourceDistribution.cs. Stars targetable, scans denied.

Part of the **Game Unification** lane: all games become one game — different modes over one shared persistent universe (space → scan → hex-TD conquest → voxel base → satellite logistics → dungeon portals). Clients = Angular web + Godot (iOS/Android embed Godot). Full plan: `~/.claude/plans/i-want-a-plan-breezy-eclipse.md` on the 4090. Part of EPIC #927. New `Survey{Models,Commands,Events}.cs`: `TargetKind` enum (Entity/Planet/Star/Moon/Asteroid); `ScanBodyCommand` (union tag 48); `ScanBodyAckEvent` (79), `SurveyReportEvent` (80), `SurveyReportListEvent` (81); `SurveyReport` doc. `TargetCommand` += TargetKind + TargetBodyId; fix ship-pilot no-op in `SpaceZone.ProcessTargetCommandAsync` (~4701: fall back from owned-spacecraft to the player's ship). All four serializer registries (`MessagePackSerializer.cs`, `JsonPacketSerializer.cs`, `GameServerJsonContext.cs`, union tags) — existing switch-coverage tests enforce completeness. `ProcessScanBodyCommand`: validate range (SensorRange vs distance−radius) + energy (~20); duration clamp(6s·50/ScanStrength, 2-15s) ticked in a zone dict; quality tiers by ScanStrength (<25 Basic / 25-74 Standard / ≥75 Detailed). New `GameServer/Data/BodyPropertiesMapper.cs` + `DifficultyCalculator.cs` (FNV-1a of body id, NEVER string.GetHashCode; golden-value tests) + `SurveyReportGenerator.cs` wiring the dead `Elements.cs`/`ResourceDistribution.cs`. Stars targetable, scans denied.
spikerj added the enhancementagentic labels 2026-08-06 16:11:59 +00:00
Author
Owner

Implementation up: spikersoft-backend PR #522 (stacked on #521). TargetKind + ScanBody + quality-tiered report generation wiring Elements/ResourceDistribution; 28 new tests, GameServer suite 1824/1824. Will close after merge.

Implementation up: spikersoft-backend PR #522 (stacked on #521). TargetKind + ScanBody + quality-tiered report generation wiring Elements/ResourceDistribution; 28 new tests, GameServer suite 1824/1824. Will close after merge.
Author
Owner

Resolved in spikersoft-backend PR #522 (merged to master). TargetKind celestial targeting (+ship-pilot fallback), ScanBody survey with quality tiers, difficulty from the newly-wired Elements/ResourceDistribution system. Closing.

Resolved in spikersoft-backend PR #522 (merged to master). TargetKind celestial targeting (+ship-pilot fallback), ScanBody survey with quality tiers, difficulty from the newly-wired Elements/ResourceDistribution system. Closing.
Sign in to join this conversation.