Skip to content

Conversation

@eraflo
Copy link
Owner

@eraflo eraflo commented Feb 7, 2026

Description

Implement core native physics lanes (Broadphase, Solver)

Refactored the core ECS World struct to adhere to the SAA/CLAD architecture by decomposing it into specialized sub-managers (EntityStore, StorageManager, QueryPlanner). This separation of concerns improves maintainability and prepares the system for the Dynamic Context Core (DCC).

Significant optimizations were introduced, including an $O(1)$ archetype_map in StorageManager to replace linear page searches.

Additionally, implemented Page Vacuuming in the CompactionLane. The WorldMaintenance trait now supports vacuum_hole_at, allowing the generic CompactionLane to actively defragment component pages by moving entities into holes left by removed components, improving memory contiguity and cache locality.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring / Performance improvements
  • Build system / CI improvements
  • Other (please describe):

How Has This Been Tested?

Added physic testing.
Ran the full ECS test suite to verify no regressions were introduced by the decomposition. Verified that the new vacuum_hole_at logic correctly compiles and integrates with the CompactionLane.

  • New unit tests added/updated for the changes.
  • All existing unit tests pass with these changes.
  • Manual testing performed as described below:

Test Configuration:

  • KhoraEngine Version/Commit: Current HEAD
  • OS: Windows

Checklist:

  • I have read the CONTRIBUTING.md file.
  • My code follows the style guidelines of this project. I have run cargo fmt --all -- --check locally and it passes.
  • My code has been linted with cargo clippy --workspace --all-targets --all-features -- -D warnings and there are no new clippy warnings.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas or for complex logic.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new compiler warnings.
  • I have added tests that prove my fix is effective or that my feature works (if applicable).
  • New and existing unit tests pass locally with my changes (cargo test --workspace --all-targets --all-features).
  • Any dependent changes have been merged and published in downstream modules (if applicable).

@eraflo eraflo linked an issue Feb 7, 2026 that may be closed by this pull request
@eraflo eraflo merged commit 4833e7a into main Feb 7, 2026
5 checks passed
@eraflo eraflo deleted the 158-feature-define-and-implement-core-physicslanes-broadphase-solver branch February 7, 2026 16:00
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

🎉 This PR is included in version 0.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Define and Implement Core PhysicsLanes (Broadphase, Solver)

1 participant