feat(physics): port retail complete object frame pipeline
Restore the named-retail object update order across local, remote, static, projectile, animation, shadow, teleport, and effect lifetimes. Separate authoritative root commits from spatial rebucketing, preserve per-owner hook/FIFO ordering, and remove update-path allocations with exact lifecycle and residency gates. Add deterministic conformance, adversarial lifetime, GUID-reuse, pending-cell, quaternion, timestamp, and allocation coverage. Release build is warning-free and all 6,446 tests pass with five intentional skips; retail, architecture, and adversarial reviews are clean. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
31a0889f08
commit
f961d70023
77 changed files with 12513 additions and 1871 deletions
|
|
@ -165,6 +165,9 @@ src/AcDream.App/
|
|||
├── Rendering/
|
||||
│ ├── GameWindow.cs # thin: GL/window lifecycle + delegates per-frame to RenderFrameOrchestrator
|
||||
│ ├── RenderFrameOrchestrator.cs # per-frame draw order (sky → terrain → opaque → trans → particles → debug → UI)
|
||||
│ ├── LiveEntityAnimationScheduler.cs # shipped: ordinary live-object update workset
|
||||
│ ├── RetailStaticAnimatingObjectScheduler.cs # shipped: separate static-animation workset
|
||||
│ ├── StaticLiveRootCommitter.cs # live static root → pose + collision boundary
|
||||
│ ├── TerrainModernRenderer.cs # (already exists)
|
||||
│ ├── TextureCache.cs # (already exists)
|
||||
│ ├── ParticleRenderer.cs # (already exists)
|
||||
|
|
@ -176,12 +179,16 @@ src/AcDream.App/
|
|||
├── Physics/
|
||||
│ ├── ProjectileController.cs # canonical live-record projectile orchestration
|
||||
│ ├── RemotePhysicsUpdater.cs # ordinary/Hidden remote narrow-tick integration
|
||||
│ ├── LiveEntityOrdinaryPhysicsUpdater.cs # manager-less canonical body Transition path
|
||||
│ ├── LiveEntityShadowPublisher.cs # authoritative exact-owner/residency collision gate
|
||||
│ ├── RemoteInboundMotionDispatcher.cs # shared animated/headless UpdateMotion funnel
|
||||
│ ├── RemoteTeleportController.cs # loaded/pending teleport placement ownership
|
||||
│ ├── RemoteTeleportHook.cs # ordered retail teleport teardown actions
|
||||
│ └── RemoteTeleportPlacement.cs # collision-seated SetPosition transition commit
|
||||
├── World/
|
||||
│ ├── InboundPhysicsStateController.cs # timestamps + accepted spawn snapshots
|
||||
│ ├── LiveEntityRuntime.cs # shipped: logical lifetime + ServerGuid↔entity.Id translation
|
||||
│ ├── RetailInboundEventDispatcher.cs # update-thread packet/frame FIFO barrier
|
||||
│ ├── LiveEntityPresentationController.cs # ordered Hidden/NoDraw/effect/collision side effects
|
||||
│ ├── LiveEntityTeardown.cs # failure-isolated multi-owner lifecycle drain
|
||||
│ └── ParentAttachmentState.cs # parent generations + pending ParentEvent relations
|
||||
|
|
@ -239,6 +246,64 @@ allocators fail fast instead of wrapping into another landblock's namespace.
|
|||
All other non-Parent packet
|
||||
families still need the future general queue tracked by divergence AD-32.
|
||||
|
||||
The per-frame object body is no longer an animation-dictionary loop inside
|
||||
`GameWindow`. `LiveEntityAnimationScheduler` snapshots canonical spatial root
|
||||
records and advances the incarnation-stable object clock, PartArray, hooks,
|
||||
one selected movement owner, and manager tail in retail order. Manager-less
|
||||
bodies delegate their candidate/Transition/cell/shadow commit to
|
||||
`LiveEntityOrdinaryPhysicsUpdater`; retained projectile bodies and remote
|
||||
MovementManagers remain mutually exclusive movement owners. Static animation
|
||||
is deliberately separate: `RetailStaticAnimatingObjectScheduler` owns the
|
||||
`CPhysics::static_animating_objects` workset for DAT and live PhysicsState-
|
||||
Static owners with Setup DefaultAnimation. Both schedulers are wired by
|
||||
`GameWindow`, but neither owns GUID identity or logical resources.
|
||||
The typed animation view fills its reusable snapshot and render-ID set from
|
||||
`LiveEntityRuntime`'s concrete spatial dictionary, avoiding interface-enumerator
|
||||
boxing on both update and render hot paths.
|
||||
`RemoteInboundMotionDispatcher` similarly keeps UpdateMotion protocol behavior
|
||||
outside `GameWindow`: GameWindow resolves the canonical record/body and the
|
||||
optional PartArray sink, while one dispatcher owns retail's interrupt, style,
|
||||
MoveTo/type-0, sticky, and standing-long-jump order. Static root projection is
|
||||
bounded by `StaticLiveRootCommitter`, which synchronizes changed roots to
|
||||
effects and collision without rebuilding zero-omega shadows or resurrecting a
|
||||
Hidden/withdrawn registration.
|
||||
|
||||
Synchronous network and lifecycle callbacks are bounded by
|
||||
`RetailInboundEventDispatcher`. It owns no wire state and no identity; it only
|
||||
serializes nested live-object operations until the current packet or full
|
||||
object-frame tail completes. State-bearing direct dispatch is allocation-free;
|
||||
only a genuinely nested operation allocates its retained queue wrapper.
|
||||
`LiveEntityRecord` then supplies exact-incarnation
|
||||
and per-channel authority versions at callback boundaries. Position, State,
|
||||
Vector, and Movement remain independent, while a separate velocity version
|
||||
invalidates only an older operation that would overwrite a newer velocity
|
||||
installed by Position, Vector, or Movement. This prevents re-entrant App
|
||||
observers from creating call-stack ordering that retail's update-thread packet
|
||||
FIFO cannot produce.
|
||||
|
||||
Pose-dependent hook deferral is similarly incarnation-scoped rather than GUID-
|
||||
or local-ID-scoped. `EntityEffectPoseRegistry` publishes a monotonic pose-owner
|
||||
lifetime, and `AnimationHookFrameQueue` captures it before semantic callbacks
|
||||
and rechecks it before each semantic AnimationDone and each routed hook. Static animation retains `process_hooks`
|
||||
until its root, live parts, and children are published; withdrawal invalidates
|
||||
both its prepared pose and pending hook tail.
|
||||
|
||||
Resolved ordinary motion commits its body/root/contact state before the
|
||||
canonical full-cell setter enters `LiveEntityRuntime.RebucketLiveEntity`.
|
||||
Because that setter may synchronously move the projection to pending or replace
|
||||
the GUID, both `RemotePhysicsUpdater` and `LiveEntityOrdinaryPhysicsUpdater`
|
||||
revalidate the exact incarnation before collision or manager-tail publication.
|
||||
Collision residency itself is projection-owned, not updater-owned:
|
||||
`LiveEntityPresentationController` suspends retained non-projectile shadows on
|
||||
every unavailable-projection edge, restores them on hydration, and reconciles
|
||||
the pending-first case at `OnLiveEntityReady` after collision registration.
|
||||
Local projection and both authoritative remote UpdatePosition tails commit the
|
||||
complete root before rebucketing, then publish collision only through an
|
||||
exact-record/spatial-residency gate. Remote reflood tracks translation,
|
||||
sign-invariant complete orientation, and cell changes so an in-place turn or a
|
||||
same-pose EnvCell crossing cannot leave offset Setup shapes stale.
|
||||
The projectile controller retains its separate body/InWorld/shadow edge owner.
|
||||
|
||||
Remote teleport placement is bounded in `Physics/RemoteTeleportController`,
|
||||
not `GameWindow`: it retains at most one pending request per materialized
|
||||
incarnation, scopes it by the live generation and accepted PositionSequence,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue