Skip to content

Gameplay scheduler: extend parallel coverage (worker set growth, particle split, render-queue routing, free-running tick DAG, enforced typed access) #576

Description

@drsnuggles8

Follow-up issue draft (post-#453: extend gameplay-tick parallelism)

Title: Gameplay scheduler: extend parallel coverage (worker set growth, particle split, render-queue routing, free-running tick DAG, enforced typed access)

Body:
Follow-up to #453, which shipped the declarative SystemScheduler end-state for this
slice: derived order from Reads/Writes/After/Before channel declarations, the
physics kick/fence split with a game-thread shadow band (Dialogue + Quest run
during the Jolt/Box2D world step), worker dispatch for the audited set
(Abilities ∥ Audio) with solved edges as task prerequisites, and the
ENTT_USE_ATOMIC + Scene-constructor pool pre-warm guards.

Remaining expansion opportunities, each with its enabling work:

  1. Inventory — two options, needs a deliberate choice:
    (a) physics shadow: simplest, BUT it currently reads post-physics transforms
    for pickup proximity — the shadow would feed it pre-physics transforms (one
    frame stale), an observable change the Reads(kLocalTransforms) edge currently
    forbids; (b) worker dispatch: needs a deferred-publish GameplayEventBus (queue
    drained at a game-thread barrier) + scene-level deferred entity destruction
    (it already self-defers past its own loop; lift to the executor barrier).
    The bus work also unlocks any future bus-publishing system for workers.
  2. Particles — split ParticlesCPU (worker-marked) / ParticlesGPU (main thread
    or render-command-queue routed; per-component UseGPU flag decides membership),
    and per-ParticleSystem member RNG seeded from global-seed × entity UUID
    (independently closes the Architecture: deterministic fixed-timestep simulation loop + seeded RNG (unlocks the existing rollback netcode) #452 sub-emitter determinism gap). Note particles
    already fan out internally via nested Tasks::Launch.
  3. SnowDeformers / MorphEval — gather CPU-side in the sim step, submit GL
    work (compute dispatch / SSBO / VBO upload) through the stateless render
    command queue; the cloth pipeline's deferred-VBO-upload pattern is the model.
    MorphEval additionally needs per-entity output buffers (instanced MeshSource
    sharing makes in-place vertex writes collide).
  4. Navigation / Animation — intra-system ParallelFor (per-agent path queries;
    per-entity pose sampling — UE does the same via hand-rolled parallel anim
    eval tasks). System-level marking is off the table (nav writes transforms;
    anim touches AssetManager lazy loads).
  5. Free-running tick DAG (UE Mass dispatch end-state) — dispatch game-thread-
    pinned systems as named-thread tasks so the whole tick becomes one
    prerequisite-driven DAG with the game thread pumping its named queue.
    Blocked on validating the ported named-thread wait support
    (GTaskGraphAlwaysWaitWithNamedThreadSupport is off-by-default/unvalidated).
  6. Enforced typed access — scoped per-system accessors validated against the
    channel declarations (Mass-style FMassEntityQuery enforcement), turning the
    audit table from prose into a compile/debug-time contract. Requires routing
    the 18 system bodies through accessor handles; the channel constants shipped
    in Architecture: replace the hard-coded OnUpdateRuntime sequence with a system scheduler (dependency graph + parallelism) #453 are the naming layer it builds on.
  7. Physics shadow growth — any new transform/physics-independent system
    should register between PhysicsKick and PhysicsFence by default; also
    consider hoisting the N>=2 hitch catch-up path (currently fully synchronous)
    to interleave char/world phases across kick/fence pairs if profiling shows
    hitch frames matter.

Acceptance per slice: audit note at the schedule builder, seam/shadow-legality
DependsOn tests extended, parallel==sequential determinism test covers the new
member, kill-switch still bisects.

Score

capability: 5
craft: 1
stability: 3
decay: 3
effort: 13
confidence: 0.5
learning: 8
fun: 5
kano: performance
blocked_by: []
blocks: []

Rated per issue-scoring · score = confidence × (capability + craft + stability + decay) / effort, derived by the picker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureEngine architecture / cross-cutting designfeatureNew feature or requestperformancePerformance / data-oriented optimization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions