Commit Graph

4 Commits

Author SHA1 Message Date
hypercross 4b94f411bf refactor: implement auto-tracking for component modifications
Introduce nested batching scopes to automate component dirty-marking
and defer structural mutations.

- Replace manual `MarkModified` with auto-tracking via `RefN` properties
  in `Select` iterators and `GetComponent`/`GetSingleton` calls.
- Implement nested batching scopes: `SystemGroup` (tick level),
  `ISystem.Run`
  (system level), `CommandQueue.ExecuteAll` (command level), and
  `Select`
  (iteration level).
- Update `ISystem` and `ITickedSystem` to use `RunImpl` to separate
  implementation from the batching-aware `Run` extension method.
- Add `ValN` properties to iterators for read-only, non-tracked access.
- Update documentation to reflect the new iteration and batching model.
2026-07-21 11:02:53 +08:00
hypercross 32f4aa3e35 refactor: optimize query execution and improve change tracking
- Optimize `QueryExecutor` to use the smallest sparse set as a driver
  for multi-component queries, reducing iteration overhead.
- Implement automatic cleanup of unused `Subject` instances in
  `ChangeBuffer` using a subscriber count.
- Improve `ChangeSet` deduplication to correctly handle rapid
  add/remove transitions for the same component.
- Add validation to ensure `IRelationship` components are added to
  their declared `Source` entity.
- Update documentation to reflect correct `Entity` bit layout.
2026-07-18 21:42:08 +08:00
hypercross 6739cf4ac9 docs: add ADR-012 and MessagePack serialization guidelines
- Update design.md with MessagePack component requirements
- Add ADR-012 to architecture.md regarding public type requirements
- Add MessagePackAnalyzer to OECS.csproj for compile-time validation
2026-07-18 19:07:22 +08:00
hypercross 34439e0f95 feat: initialize OECS project structure
Initializes the OECS repository with the core foundation, including:

- Entity management with 24-bit IDs and 8-bit versioning
- Sparse set-based component storage
- Entity allocation and recycling logic
- Core World API for entity and component lifecycle
- Project scaffolding for source and unit tests
- Design documentation and architecture decision records (ADRs)
2026-07-18 19:03:37 +08:00