diff --git a/ai/memory-bank/tasks/TASK_1_CCD_GITHUB_ISSUE.md b/ai/memory-bank/tasks/TASK_1_CCD_GITHUB_ISSUE.md new file mode 100644 index 0000000..9365331 --- /dev/null +++ b/ai/memory-bank/tasks/TASK_1_CCD_GITHUB_ISSUE.md @@ -0,0 +1,15 @@ +# Title +Continuous Collision Detection (CCD) Implementation + +## Labels +enhancement, physics + +## Body +Implement Continuous Collision Detection to prevent "tunneling" at high velocities. This involves calculating time of impact (TOI) between moving bodies. + +**Acceptance Criteria**: +- 0% tunneling observed at velocities up to 1000m/s. +- CCD pipeline integrates with the existing collision detection system. +- Performance impact remains within acceptable bounds for high-speed simulations. + +Continuous Collision Detection (CCD) Implementation needs to be resolved/issued/tested by the Physics Engineer. diff --git a/ai/memory-bank/tasks/TASK_2_DOD_GITHUB_ISSUE.md b/ai/memory-bank/tasks/TASK_2_DOD_GITHUB_ISSUE.md new file mode 100644 index 0000000..c4302b7 --- /dev/null +++ b/ai/memory-bank/tasks/TASK_2_DOD_GITHUB_ISSUE.md @@ -0,0 +1,15 @@ +# Title +Data-Oriented Design (DOD) & ECS Refactoring + +## Labels +architecture, refactoring + +## Body +Refactor core engine structures to support Data-Oriented Design, making it compatible with modern ECS architectures like Bevy and Flecs. + +**Acceptance Criteria**: +- Memory layout is optimized for cache coherency. +- API allows integration with a standard ECS in under 2 hours. +- Core systems (e.g., rigid body updates) operate on flat arrays or similar DOD structures. + +Data-Oriented Design (DOD) & ECS Refactoring needs to be resolved/issued/tested by the Architecture Lead. diff --git a/ai/memory-bank/tasks/TASK_3_SIMD_GITHUB_ISSUE.md b/ai/memory-bank/tasks/TASK_3_SIMD_GITHUB_ISSUE.md new file mode 100644 index 0000000..54e3279 --- /dev/null +++ b/ai/memory-bank/tasks/TASK_3_SIMD_GITHUB_ISSUE.md @@ -0,0 +1,16 @@ +# Title +Multithreading and SIMD Vectorization + +## Labels +performance, optimization + +## Body +Integrate `rayon` for task-based parallelism and the `wide` crate (instead of std::simd) for vectorizing math operations in the physics pipeline over Data-Oriented Design (DOD) Structure of Arrays (SoA) layouts. + +**Acceptance Criteria**: +- Engine scales linearly up to 16 threads on supported hardware. +- Core math operations (vector additions, dot products, cross products) utilize SIMD instructions via the `wide` crate. +- Thread synchronization does not introduce unresolvable latency. +- Parallel iteration over multiple mutable arrays must be chained using `.par_iter_mut().zip(...)` instead of passing tuples. + +Multithreading and SIMD Vectorization needs to be resolved/issued/tested by the Systems Engineer. diff --git a/ai/memory-bank/tasks/TASK_4_DETERMINISM_GITHUB_ISSUE.md b/ai/memory-bank/tasks/TASK_4_DETERMINISM_GITHUB_ISSUE.md new file mode 100644 index 0000000..13f7ed9 --- /dev/null +++ b/ai/memory-bank/tasks/TASK_4_DETERMINISM_GITHUB_ISSUE.md @@ -0,0 +1,15 @@ +# Title +Cross-Platform Determinism Setup + +## Labels +determinism, ci + +## Body +Implement strict floating-point math control and deterministic solver execution across multiple architectures using `libm`. + +**Acceptance Criteria**: +- Simulation yields identical results across different CPU architectures. +- CI testing pipeline includes deterministic behavior checks. +- Fallback mechanisms for non-deterministic math functions are implemented. + +Cross-Platform Determinism Setup needs to be resolved/issued/tested by the Systems Engineer. diff --git a/ai/memory-bank/tasks/TASK_5_GPU_GITHUB_ISSUE.md b/ai/memory-bank/tasks/TASK_5_GPU_GITHUB_ISSUE.md new file mode 100644 index 0000000..805a525 --- /dev/null +++ b/ai/memory-bank/tasks/TASK_5_GPU_GITHUB_ISSUE.md @@ -0,0 +1,17 @@ +# Title +GPU Acceleration (Compute Shaders) Integration + +## Labels +gpu, wgpu + +## Body +Future-proof the engine by integrating `wgpu` (~v0.19) for GPU-accelerated compute shaders, targeting massive scale simulations like soft-bodies or fluids. + +**Acceptance Criteria**: +- Basic WGPU context is established and integrated into the build. +- A prototype compute shader runs and passes data back to the CPU physics pipeline. +- CPU pipeline remains stable during GPU execution. +- WGSL shaders must avoid 16-byte alignment crashes by using flat `array` (indexing by 3) instead of `array>`. +- `Vector3d` sent via `bytemuck` must use `#[repr(C)]` with `Pod` and `Zeroable` derives. + +GPU Acceleration (Compute Shaders) Integration needs to be resolved/issued/tested by the Graphics Engineer. diff --git a/ai/memory-bank/tasks/worm-engine-tasklist.md b/ai/memory-bank/tasks/worm-engine-tasklist.md index 7eb2690..1d36755 100644 --- a/ai/memory-bank/tasks/worm-engine-tasklist.md +++ b/ai/memory-bank/tasks/worm-engine-tasklist.md @@ -54,7 +54,7 @@ ### [ ] Task 4: SIMD Vectorization Implementation **Description**: Integrate `wide` for vectorizing math operations in the physics pipeline. Defer until DOD refactoring is complete to use a Structure of Arrays (SoA) approach. Avoid applying Array of Structures (AoS) SIMD to individual math primitives like `Vector3d`. **Acceptance Criteria**: -- Core math operations (vector additions, dot products, cross products) utilize SIMD instructions. +- Core math operations (vector additions, dot products, cross products) utilize SIMD instructions via the `wide` crate. - SIMD implementation leverages SoA approach exclusively without overhead on individual primitives. **Files to Create/Edit**: @@ -95,9 +95,6 @@ **Assignment**: GPU Acceleration (Compute Shaders) Integration needs to be resolved/issued/tested by the Graphics Engineer ## Quality Requirements -- [ ] Must pass `cargo check` cleanly -- [ ] Must pass `cargo test` suite -- [ ] No background processes in any commands - NEVER append `&` - [ ] Iterating multiple mutable SoA arrays in `rayon` must chain `.par_iter_mut().zip(...)` - [ ] WGSL shaders must avoid 16-byte alignment crashes by using flat `array` and Rust structs must use `#[repr(C)]`, `Pod`, and `Zeroable`.