Commit Graph

7 Commits

Author SHA1 Message Date
hypercross b551a67915 feat: add simplified Select extension methods to EntityIterator
Add overloads for Select that allow iterating over components without
manually building a QueryDescriptor, simplifying usage in systems.
2026-07-18 22:27:14 +08:00
hypercross df388ee9b3 refactor: remove QueryDescriptor from ISystem interface
Remove the mandatory Query property from the ISystem interface,
allowing systems to manage their own queries locally or via other
means. Update all implementing systems and tests to use local
query descriptors instead.
2026-07-18 22:22:52 +08:00
hypercross da84605b2f refactor: use ReadSingleton for GameState in RenderSystem 2026-07-18 21:24:11 +08:00
hypercross f1eddc75ae feat: add deferred structural mutations and entity iterators
Implement deferred structural mutations (AddComponent, RemoveComponent,
DestroyEntity) to allow safe modification of the world during
iteration.

Additionally, introduce a new `EntityIterator` API providing zero-
allocation `ref struct` iterators (`Select<T1>`, `Select<T1, T2>`, etc.)
to support manual iteration with early-exit capabilities.

As part of these changes, component access via `GetComponent<T>` during
iteration now automatically marks components as modified.
2026-07-18 21:22:23 +08:00
hypercross 9aa2a71257 feat: add WorldSerializer for saving and loading world state 2026-07-18 21:07:05 +08:00
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 a19861c080 feat: add TicTacToe example project
Implement a complete Tic-Tac-Toe game using OECS to demonstrate
ECS patterns, including:
- Command pattern for placing marks
- System groups for logical updates and rendering
- CSV loading for initial board state
- Reactivity logging for observing entity and component changes
2026-07-18 20:43:13 +08:00