Commit Graph

5 Commits

Author SHA1 Message Date
hypercross 0a28890f2c feat: implement game saving and loading in TicTacToe
- Add serialization support to `World`, `EntityAllocator`, and
  `SparseSet`
- Implement `SaveGame` and `LoadGame` functionality in the TicTacToe
  example
- Add ability to resume a game from a saved state
- Implement auto-save after every move in the game loop
2026-07-18 21:06:57 +08:00
hypercross 6f9efc050b feat: add component validation and TryGetComponent
- Implement `TryGetComponent<T>` in `World` and `SparseSet<T>`
- Add validation to ensure `ForEach` type parameters match the
  `QueryDescriptor`
- Improve error handling in `SparseSet<T>.Get` to throw
  `InvalidOperationException`
- Use `GUID` instead of `FullName` for `QueryDescriptor` hash stability
2026-07-18 20:07:43 +08:00
hypercross 25789e7c9d fix: improve stability and add edge case tests
- Fix SparseSet resize logic to correctly initialize new slots
- Implement Equals and GetHashCode for QueryDescriptor
- Prevent collection modification exceptions in World.DestroyEntity
- Update CommandQueue to accumulate errors across drain cycles
- Add comprehensive edge case tests in EdgeCaseTests.cs
2026-07-18 19:58:23 +08:00
hypercross e4afaafd02 feat: add query system and system execution logic
Introduces a complete query system for iterating over entities with
specific component combinations, including support for "with" and
"without" filters.

Also adds:
- `ISystem` and `ITickedSystem` interfaces for defining logic.
- `SystemGroup` for managing and running groups of systems.
- `QueryBuilder` for a fluent API to construct queries.
- `QueryExecutor` for high-performance iteration using ref parameters.
- `Tick` and `TickType` to support timed and logical updates.
2026-07-18 19:33:05 +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