Project authoritative tractor beam feedback
This commit is contained in:
parent
8c8fd20c5c
commit
75069328cf
12 changed files with 97 additions and 14 deletions
|
|
@ -2909,6 +2909,18 @@ internal sealed class AetheriaDaemonYmirSmokeChecks
|
|||
RequireEqual(0, CargoQuantity(ship, "salvage"), "scooping must remain a separate capacity-checked transaction");
|
||||
Require(pickup.AgeSeconds > 0 && pickup.AgeSeconds < pickup.LifetimeSeconds,
|
||||
"daemon-owned pickup lifetime must advance independently of its SoA presentation");
|
||||
var surface = AetheriaRuntimeDaemonGameSurfaceBuilder.Build(
|
||||
new AetheriaRuntimeDaemonFrameDocument { FrameId = 1, Run = run },
|
||||
new AetheriaRuntimeDaemonHealthDocument(),
|
||||
AetheriaRuntimeDaemonCommandBoundaryDocument.Create("daemon"));
|
||||
var beam = Flatten(surface.Surface.Root).Single(node => node.Kind == "beam.presentation");
|
||||
Require(beam.Props["sourceEntityId"] == run.EntityRecordKey(0, ship.EntityIndex) &&
|
||||
beam.Props["assetRole"] == "effect.beam.tractor" &&
|
||||
beam.Props["directionMode"] == "source-forward.v1" &&
|
||||
beam.Props["activationActionId"] == "pilot.scoop" &&
|
||||
beam.Props["power"] == "0.5" && beam.Props["radius"] == "25" &&
|
||||
beam.Props["maximumDistance"] == "75",
|
||||
"Eve beam presentation must project the same daemon tractor power and fossil volume without owning force or contact");
|
||||
|
||||
double PulledVelocity(double power, int frameId)
|
||||
{
|
||||
|
|
@ -2954,6 +2966,9 @@ internal sealed class AetheriaDaemonYmirSmokeChecks
|
|||
var boltEffect = assets.Single(asset => asset.Ref.AssetKey == "prefab.effect.shot.bolt");
|
||||
RequireEqual("effect.shot.bolt", boltEffect.Ref.Metadata["presentationRole"],
|
||||
"provider manifest must bind semantic shot feedback to its graduated EveUnity effect");
|
||||
var tractorEffect = assets.Single(asset => asset.Ref.AssetKey == "prefab.effect.beam.tractor");
|
||||
RequireEqual("effect.beam.tractor", tractorEffect.Ref.Metadata["presentationRole"],
|
||||
"provider manifest must bind the stripped fossil tractor prefab to the generic beam role");
|
||||
var thermalProfiles = assets.Where(asset =>
|
||||
string.Equals(asset.Ref.Kind, AetheriaRuntimeAssetKinds.VolumeProfile, StringComparison.Ordinal)).ToArray();
|
||||
RequireEqual(5, thermalProfiles.Length,
|
||||
|
|
|
|||
|
|
@ -5,10 +5,6 @@ namespace Aetheria.State.Daemon;
|
|||
|
||||
public sealed class AetheriaYmirWorldPhysics : IAetheriaRuntimeWorldPhysics, IDisposable
|
||||
{
|
||||
public const double TractorRadius = 25;
|
||||
public const double TractorTraction = 25;
|
||||
public const double TractorDistance = 75;
|
||||
|
||||
private const string EntityPrefix = "aetheria.daemon.entity.";
|
||||
private const string PickupPrefix = "aetheria.daemon.pickup.";
|
||||
private const string PhysicalPayloadPrefix = "aetheria.physical-payload.";
|
||||
|
|
@ -425,7 +421,8 @@ public sealed class AetheriaYmirWorldPhysics : IAetheriaRuntimeWorldPhysics, IDi
|
|||
int simulationStepIndex,
|
||||
ref int commandOrdinal)
|
||||
{
|
||||
foreach (var actor in active.Where(entity => entity.TractorPower > 0.01))
|
||||
foreach (var actor in active.Where(entity =>
|
||||
entity.TractorPower > AetheriaRuntimeTractorMechanics.ActivationThreshold))
|
||||
{
|
||||
var forward = Normalize(actor.DirectionX, actor.DirectionY, 0, 1);
|
||||
foreach (var pickup in pickups)
|
||||
|
|
@ -435,10 +432,11 @@ public sealed class AetheriaYmirWorldPhysics : IAetheriaRuntimeWorldPhysics, IDi
|
|||
var along = dx * forward.X + dz * forward.Y;
|
||||
var lateral = Math.Abs(dx * forward.Y - dz * forward.X);
|
||||
var distance = Math.Sqrt(dx * dx + dz * dz);
|
||||
if (along < 0 || along > TractorDistance || lateral > TractorRadius || distance <= 0.001)
|
||||
if (along < 0 || along > AetheriaRuntimeTractorMechanics.Distance ||
|
||||
lateral > AetheriaRuntimeTractorMechanics.Radius || distance <= 0.001)
|
||||
continue;
|
||||
|
||||
var force = TractorTraction;
|
||||
var force = AetheriaRuntimeTractorMechanics.Traction;
|
||||
var pickupId = PickupPrefix + pickup.PickupIndex;
|
||||
RequireAccepted(session.ApplyForce(new YmirApplyForceCommand(
|
||||
Header(session, frameId, simulationStepIndex, "tractor", $"{actor.EntityIndex}:{pickup.PickupIndex}", ref commandOrdinal),
|
||||
|
|
|
|||
|
|
@ -2067,11 +2067,22 @@ static EveAssetCatalogDocument BuildCoreAssetCatalog(
|
|||
return new EveAssetCatalogDocument(
|
||||
"aetheria.daemon",
|
||||
AetheriaRuntimeVerseRecordKeys.EveAssetCatalog.ToString(),
|
||||
1,
|
||||
AssetCatalogVersion(source.PublishedAtUtc),
|
||||
source.PublishedAtUtc,
|
||||
assets);
|
||||
}
|
||||
|
||||
static long AssetCatalogVersion(string publishedAtUtc)
|
||||
{
|
||||
return DateTimeOffset.TryParse(
|
||||
publishedAtUtc,
|
||||
CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.RoundtripKind,
|
||||
out var publishedAt)
|
||||
? publishedAt.UtcDateTime.Ticks
|
||||
: DateTimeOffset.UtcNow.UtcDateTime.Ticks;
|
||||
}
|
||||
|
||||
static IReadOnlyList<(string Path, string Platform)> FindAssetBundles(AetheriaDaemonHostOptions options)
|
||||
{
|
||||
const string bundleName = "aetheria-world";
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
"org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.13",
|
||||
"org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1",
|
||||
"org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.1",
|
||||
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.27"
|
||||
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.30"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,16 +142,17 @@
|
|||
"hash": "d0aa50d31f3b6da96bffc194fdc3aa358f37e332"
|
||||
},
|
||||
"org.gamecult.eve.unity-scene": {
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.27",
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.30",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {
|
||||
"org.gamecult.cultlib": "1.0.13",
|
||||
"org.gamecult.eve.plugin-fields": "0.1.1",
|
||||
"org.gamecult.eve.surface": "0.2.1",
|
||||
"com.unity.mathematics": "1.3.2"
|
||||
"com.unity.mathematics": "1.3.2",
|
||||
"com.unity.modules.particlesystem": "1.0.0"
|
||||
},
|
||||
"hash": "63a41712c5a68ce835bc1820980fc4786c34eb7b"
|
||||
"hash": "f979cd425a9f8f951736c56051e8368b6d6ac2f3"
|
||||
},
|
||||
"com.unity.modules.assetbundle": {
|
||||
"version": "1.0.0",
|
||||
|
|
@ -183,6 +184,12 @@
|
|||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.particlesystem": {
|
||||
"version": "1.0.0",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.modules.physics": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
Add(entries, MapPrefab("prefab.entity.orbital", "Orbital", "Prefabs/Stations/Zenith", "orbital"));
|
||||
Add(entries, MapPrefab("prefab.effect.shot.bolt", "Bolt", "Prefabs/Lightning", "effect.shot.bolt"));
|
||||
Add(entries, MapPrefab("prefab.effect.impact.shield", "Shield impact", "Prefabs/Shield", "effect.impact.shield"));
|
||||
Add(entries, MapPrefab("prefab.effect.beam.tractor", "Tractor beam", "Prefabs/Tractor Beam", "effect.beam.tractor"));
|
||||
Add(entries, DestructionEffect());
|
||||
Add(entries, MapProjectPrefab("prefab.entity.pickup", "Pickup", "Assets/Prefabs/RPG/Pickups/Tetrahedron.prefab"));
|
||||
Add(entries, MinePrefab());
|
||||
|
|
|
|||
|
|
@ -635,6 +635,9 @@ namespace GameCult.Aetheria.State.Verse
|
|||
var combatPresentation = CombatPresentation(run, zone, playerEntityId, simulationSettings);
|
||||
if (combatPresentation != null)
|
||||
presentationChildren.Insert(0, combatPresentation);
|
||||
var tractorPresentation = TractorPresentation(run, zone, playerEntityId);
|
||||
if (tractorPresentation != null)
|
||||
presentationChildren.Insert(0, tractorPresentation);
|
||||
var aimPresentation = AimPresentation(run, zone, playerEntityId);
|
||||
if (aimPresentation != null)
|
||||
presentationChildren.Insert(0, aimPresentation);
|
||||
|
|
@ -684,6 +687,33 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return Node("aetheria.daemon.game.world.aim", "aim.presentation", props.Select(value => (value.Key, value.Value)).ToArray());
|
||||
}
|
||||
|
||||
private static AetheriaRuntimeSurfaceComponent? TractorPresentation(
|
||||
AetheriaRuntimeRunCheckpointCommit run,
|
||||
AetheriaRuntimeZoneSnapshotCommit zone,
|
||||
string playerEntityId)
|
||||
{
|
||||
var player = FindCurrentEntity(run, zone);
|
||||
if (player == null)
|
||||
return null;
|
||||
|
||||
return Node(
|
||||
"aetheria.daemon.game.world.tractor",
|
||||
"beam.presentation",
|
||||
new[]
|
||||
{
|
||||
("sourceEntityId", playerEntityId),
|
||||
("sourceEntityIndex", player.EntityIndex.ToString(CultureInfo.InvariantCulture)),
|
||||
("assetRole", "effect.beam.tractor"),
|
||||
("directionMode", "source-forward.v1"),
|
||||
("renderChannel", "world.effects"),
|
||||
("activationActionId", "pilot.scoop"),
|
||||
("power", FormatNumber(player.TractorPower)),
|
||||
("activationThreshold", FormatNumber(AetheriaRuntimeTractorMechanics.ActivationThreshold)),
|
||||
("radius", FormatNumber(AetheriaRuntimeTractorMechanics.Radius)),
|
||||
("maximumDistance", FormatNumber(AetheriaRuntimeTractorMechanics.Distance))
|
||||
});
|
||||
}
|
||||
|
||||
private static AetheriaRuntimeSurfaceComponent? CombatPresentation(
|
||||
AetheriaRuntimeRunCheckpointCommit run,
|
||||
AetheriaRuntimeZoneSnapshotCommit zone,
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@ namespace GameCult.Aetheria.State.Verse
|
|||
foreach (var entity in entities)
|
||||
{
|
||||
var delta = entity.TractorTargetPower - entity.TractorPower;
|
||||
entity.TractorPower += Math.Sign(delta) * Math.Min(Math.Abs(delta), deltaSeconds * 2.0);
|
||||
entity.TractorPower += Math.Sign(delta) * Math.Min(
|
||||
Math.Abs(delta), deltaSeconds * AetheriaRuntimeTractorMechanics.PowerRampPerSecond);
|
||||
entity.TractorPower = Clamp01(entity.TractorPower);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
namespace GameCult.Aetheria.State.Verse
|
||||
{
|
||||
public static class AetheriaRuntimeTractorMechanics
|
||||
{
|
||||
public const double PowerRampPerSecond = 2;
|
||||
public const double ActivationThreshold = 0.01;
|
||||
public const double Radius = 25;
|
||||
public const double Traction = 25;
|
||||
public const double Distance = 75;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 19cb3e516faf57344bcd30d4871ab1e9
|
||||
|
|
@ -26,7 +26,7 @@ validation proves contract shape, not wiring, exclusivity, lowering, or parity.
|
|||
| Thermal/energy | cell conduction, capacitor/reactor/radiator network, and cockpit thermal exposure | daemon | ship/equipment power, temperature, medical state, risk and death feedback | schematic/post effects | owner-exists; wired; exclusive; projected; generic timing and native asset delivery lowered: catalog hull and installed-item shapes derive cell mass/conductivity/topology; local temperature derives thermal performance, wear potential and online state; all consumers share capacitor-first/reactor-residual transactions; powered radiators pump before reactor settlement; reactor heat then enters the same cell network before conduction/radiation; cockpit-cell temperature drives the fossil nonlinear heatstroke/hypothermia accumulation, linear recovery, severe-risk crossings, and ordinary exactly-once destruction with a typed cause; Eve exposes cockpit, risk, heatstroke source-weight, phasing and death-transition facts; EveUnity generically resolves the original severe pulse plus live/reconnect-safe cause-specific death crossfade; Aetheria deterministically translates the five broken legacy profiles into clean URP profiles, advertises them by semantic role through CultMesh CDN, and binds them in the canonical client through a weight-only native sink; rotated equipment topology, parent/child radiation, schematic composition, legacy SSR/AO/roundness equivalents, canonical render-pipeline activation and rendered parity remain incomplete | multi-consumer ordering, multi-radiator visibility, rotated topology, generic schematic meters, renderer-feature parity, active URP capture and live/reconnect death-fade screenshots |
|
||||
| Weapons | ServerShared behaviors + Unity effects | daemon plus Ymir geometry/kinematics | action capability, weapon state, shot/damage receipts | effects/audio/HUD | instant and constant resource/timing lifecycles are daemon-owned; charged weapons accept one semantic request, spool without requiring a solution, hold at full charge, commit automatically when a solution appears, and perform deterministic once-per-second malfunction hazard checks after the authored safe hold interval with increasing persisted risk; generic Eve `weapon.state` exposes charge hold/risk and feedback exposes readiness, commit, refusal, and malfunction chronology; committed direct damage now enters the shared daemon armor-cell transaction | guided persistent payloads, visibility/wear, remaining impact-distribution parity, and Unity effect reconciliation |
|
||||
| Destruction/drops | hull death, 25% equipment rolls, unconditional cargo drops, 25-unit launch, 30-second pickups | daemon | destruction identity, death/drop events, typed pickups | provider-advertised destruction effect and pickups | owner-exists; wired; exclusive; projected: direct and deployable lethal damage commit one deterministic destruction transaction, clear live references, retain only a non-rendered identity tombstone, and emit exact pickups/events; the reserved client `DestroyEntity` command is rejected; Aetheria advertises its original big explosion as `effect.feedback.entity.destroyed`, lowered generically by EveUnity | equipment-destruction-before-hull parity and multiplayer reconnect chronology |
|
||||
| Tractor/scoop | analog tractor and physical timed pickups | daemon + Ymir | tractor power, pickup body and receipt | pickup world entity plus beam/interaction feedback | fossil 2/s power ramp and authored forward radius/traction/distance feed pickup bodies into the shared Ymir world; shield contact collects exactly once when capacity permits or applies the fossil 25-unit rejection kick; 30s daemon lifetime; instant cargo teleport deleted; current-zone pickups occupy ordinary rows in the shared Eve entity SoA body with stable logical identity and provider-owned assets; the generic Unity witness activates scoop while paused, advances fixed daemon steps, and observes Ymir contact remove the starter salvage | add generic tractor beam plus rejected-capacity feedback and explicit cargo-delta witness fact |
|
||||
| Tractor/scoop | analog tractor and physical timed pickups | daemon + Ymir | tractor power, pickup body and receipt | pickup world entity plus beam/interaction feedback | fossil 2/s power ramp and authored forward radius/traction/distance feed pickup bodies into the shared Ymir world; shield contact collects exactly once when capacity permits or applies the fossil 25-unit rejection kick; 30s daemon lifetime; instant cargo teleport deleted; current-zone pickups occupy ordinary rows in the shared Eve entity SoA body with stable logical identity and provider-owned assets; `beam.presentation` now attaches the stripped provider effect to the SoA ship, and the released generic client routes `pilot.scoop` through the advertised operation/payload and records nonzero daemon power plus a reconciled receipt; the generic Unity witness also advances fixed daemon steps and observes Ymir contact remove the starter salvage | improve provider beam visibility, add held/release analog input, rejected-capacity feedback, and explicit cargo-delta witness fact |
|
||||
| Dock/undock | wormhole-first interact; first eligible bay; component prerequisites | daemon + Ymir placement | dock commands/context | camera/UI transition | live generic Unity witness now proves advertised dock/undock actions, daemon bay assignment, dock-parent inclusion in the SoA view, sharing of the dock parent's equipment-derived contact picture, generic camera retargeting, controlled-subject hiding, movement suppression, and restoration on undock; the starter station and local raider form a deterministic Terminus departure proof | restore fossil component-prerequisite rejection reasons, exact undock placement, wormhole priority, reconnect, and docked inventory/trade surfaces |
|
||||
| Inventory/equipment | inventory panels + ServerShared | daemon | inventory/equipment surfaces | generic UI | owner-exists; wired/projected in fragments; not proven | all transfer directions and rejection |
|
||||
| Trade | trade UI/economy | daemon | stock, quote, purchase commands | generic UI | daemon derives station, stock row, catalog item, current price, quantity, credits, target capacity, and hull-vs-cargo result; Eve advertises only currently available stock actions; generic Unity live witness receives an authoritative purchase receipt while paused | sell flow, quote expiry, contested stock, and full trade surface parity |
|
||||
|
|
|
|||
|
|
@ -113,6 +113,13 @@ and screen-feedback lifecycles. Contracts declare source event, spawn space,
|
|||
attachment socket, channel, lifetime, pooling class, parameters, and start/
|
||||
update/stop bindings. Effect realization cannot mutate gameplay state.
|
||||
|
||||
The current tractor lowering uses provider-owned, pre-generated particle
|
||||
textures and materials. `beam.presentation` carries source identity, provider
|
||||
asset role, daemon power, activation threshold, authored radius/distance,
|
||||
render channel, and an advertised activation action. EveUnity attaches and
|
||||
modulates that prefab; it does not raycast, apply force, infer contact, or move
|
||||
cargo. Ymir contact facts remain the only collection gate.
|
||||
|
||||
Projectile simulation and projectile presentation are separate. The daemon and
|
||||
Ymir own identity/pose/contact; presentation owns visual asset, trail, impact,
|
||||
and visibility tags.
|
||||
|
|
|
|||
Loading…
Reference in a new issue