feat(demo): migrate demo to new ECS implementation#435
Merged
stormmuller merged 4 commits intocreate-new-ecs-systemfrom Jan 11, 2026
Merged
feat(demo): migrate demo to new ECS implementation#435stormmuller merged 4 commits intocreate-new-ecs-systemfrom
stormmuller merged 4 commits intocreate-new-ecs-systemfrom
Conversation
Merged
Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com>
Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create new ECS architecture with data-oriented approach
feat(demo): migrate demo to new ECS implementation
Jan 11, 2026
stormmuller
approved these changes
Jan 11, 2026
stormmuller
added a commit
that referenced
this pull request
Jan 17, 2026
* feat: started adding new ECS system * feat: migrate animation components and systems to new ECS architecture (#427) * Initial plan * feat: migrate animation components and systems to new ECS style Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * refactor: streamline animation component and system implementations * feat: refactor audio component and system to ECS architecture * test: add comprehensive test suite for audio system (#428) * Initial plan * test: add comprehensive tests for audio system Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * feat: added new ecs implementation and removed the old one, migrating all component and systems * fix: restore test compatibility after ECS migration (#431) * Initial plan * fix: update ecs test imports and API usage Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: skip tests requiring old ECS API rewrite Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: resolve build errors from old ECS API usage Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: apply linting fixes Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: rewrite system tests for new ECS API Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: address code review feedback - use proper types, remove comments, delete empty test Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * Update utility functions to use new ECS implementation (#430) * Initial plan * feat: update utility functions to use new ECS implementation Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: replace any types with proper type imports in add-camera Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * refactor: simplify add-camera by using Partial<CameraEcsComponent> Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: remove automatic system addition from addCamera to prevent duplicates Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: implement Stoppable interface and remove unnecessary return from addCamera Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * refactor: follow codebase conventions and uncomment migrated ECS code - Remove unnecessary note from addCamera documentation - Uncomment and migrate rotation, scale, flip, and animation code in create-sprite - Refactor Game constructor to follow codebase convention (private fields with getters) Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: remove time and world getters from Game class Remove the public getters for time and world as they were not requested. Update internal usage to reference private fields directly. Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> Co-authored-by: Storm <stormmuller2@gmail.com> * fix: refactor physics and particle test files to use proper types and runtime checks (#433) * Initial plan * fix: update physics and particle emitter test files to meet requirements Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: revert unintended linting changes to non-test files Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: replace Vector2(0,0) with Vector2.zero and remove unnecessary try-catch blocks Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * fix: replace Vector2(0,0) with Vector2.zero and remove unnecessary comments Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * feat(demo): migrate demo to new ECS implementation (#435) * Initial plan * feat(demo): update demo to use new ECS system Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * feat(demo): add camera system to demo Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> * refactor: replace ControlAdventurerEcsComponent with tag in control-adventurer system --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com> Co-authored-by: Storm <stormmuller2@gmail.com> * refactor: remove createBatch function from demo * refactor: reorder imports and improve formatting in various test files and utilities * refactor: update audio system tests to use Howl for sound playback and improve assertions * fix: update ECS module paths to new directory structure * refactor: remove pooling module from package exports * docs: updated space shooter demo to use new ECS * refactor: update ECS system interfaces to include tags and improve query handling * fix: correct bullet and player movement direction in ECS systems * docs: update ECS documentation for components, entities, systems, and world management --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: stormmuller <17644200+stormmuller@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The demo application was using the deprecated class-based ECS architecture. Updated all demo files to use the new interface-based, data-oriented ECS system introduced in this PR.
Migration Changes
Componentto interfaces with symbol-based IDs viacreateComponentIdSystemto factory functions returning{ query, run }objectsworld.buildAndAddEntity([...components])toworld.createEntity()+world.addComponent(entity, componentId, data)registerCamera()helper with manual camera entity creation usingcameraIdcomponentregisterInputs()with directInputManagerinstantiation and explicit system registrationExample
Before (class-based):
After (factory function):
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.