Rust game engine core with CDE-optimized hot paths.
Applies Coleman Dimensional Encoding (CDE) to turn common engine hot paths from O(n) scans into O(1) lookups with O(k) bounded iteration. Morton-encoded spatial grids, query planning, deterministic simulation with checksums and replay, WebAssembly support.
- Entity ID: stable integer identifier for each entity.
- Component mask: bitset indicating which components are attached.
- Component data: dense, columnar storage per component type.
- Spatial partition: grid or tree cell index per entity for spatial queries.
ChronoEngine is optimized for:
- "Given a system and frame, iterate entities matching a component mask efficiently."
- "Given a region, return all entities within spatial bounds."
- "Given an entity, fetch or mutate its component data."
An ECS can be reduced to:
- Entity IDs,
- Component masks,
- Component storage, and
- Spatial index.
This is both necessary and sufficient for all ECS systems and queries. Encoding these dimensions yields a CDE layout that is MSS for engine behavior and performance.
# Requires Rust 1.92.0+ (pinned via rust-toolchain.toml)
# WebAssembly target for browser builds:
rustup target add wasm32-unknown-unknowncargo test --workspace --all-targets
cargo clippy --workspace --all-targets -- -D warnings
cargo check --workspace --target wasm32-unknown-unknownBenchmarks:
cargo bench -p chronoengine_core --bench core_benches
cargo bench -p chronoengine_core --bench phase1_benchesChronoEngine implements proven optimizations from ChronoUO (800-1000 concurrent players at 120 FPS):
- O(1) spatial operations via Morton-encoded grids
- Query planning for optimal execution paths
- Deterministic simulation with checksums and replay
- WebAssembly support for browser deployment
- Strict memory safety (core crate forbids
unsafe)
| Document | Purpose |
|---|---|
| ARCHITECTURE.md | Component breakdown, SOLID analysis |
| PERFORMANCE.md | Complexity proofs, benchmark methodology |
See CONTRIBUTING.md for development process and code review checklist.
Apache-2.0 © 2026 Jacob Coleman — See LICENSE for details.