Skip to content

Inject explicit dependencies into engine and example systems - #81

Open
Milky2018 wants to merge 1 commit into
mainfrom
milky/inject-system-dependencies
Open

Milky2018 wants to merge 1 commit into
mainfrom
milky/inject-system-dependencies

Conversation

@Milky2018

Copy link
Copy Markdown
Collaborator

Engine systems and their helpers currently resolve many resources through the active World, hiding their dependencies even when the system signature uses typed parameters. This change passes queries and bound subsystem data through the full call chain, including the examples.

Changes

  • Add opaque, read-only Entities and Hierarchy system parameters. They retain entity metadata rather than a World and expose lifecycle checks and fixed parent-child traversal without component access or structural mutation.
  • Migrate input, physics, transforms, visibility, UI, accessibility, audio, animation playback/skinning, and rendering to explicit queries and resources. Cache prepared physics queries and keep 2D frame buffers stable across resets.
  • Bind event writers, reader views, and maintenance registries to their owning World. Inject clock/timer state, physics motion results, UI geometry, and render outputs into systems and helpers.
  • Migrate Cards, Pixel Adventure, and Survivors, including event consumption, touch consumption, audio output, timers, and entity liveness checks.
  • Preserve current-World acquisition and imperative convenience APIs, including clock functions, timeout(...), and generated state setters. Dynamic animation field application and LDtk/Tiled world synchronization retain exclusive World access.
  • Update the ECS guide, generated interfaces, and changelog. Add regression coverage for cross-World isolation, stale handles and slot reuse, deferred hierarchy visibility, frame reset lifetime, and inaccessible metadata storage.

Validation

  • moon fmt --check
  • moon check --target all --deny-warn --warn-list +73
  • moon test --deny-warn --warn-list +73: 455 Wasm tests and 89 JS tests passed
  • python3 -m unittest discover -s tests: 30 tests passed, including external API rejection checks
  • Published codegen freshness check passed
  • moon build --target js --release --deny-warn --warn-list +73
  • Browser smoke checks for all three examples; Cards click interaction advanced the game from pre-flop to flop

These are local validation results; GitHub CI will run on this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant