12 releases
0.2.0-beta.2 | Nov 2, 2024 |
---|---|
0.2.0-beta.1 | Oct 30, 2024 |
0.1.0 | Oct 13, 2024 |
0.1.0-alpha.5 | Jul 9, 2024 |
0.1.0-alpha.1 | Nov 30, 2023 |
#491 in Game dev
33 downloads per month
Used in 5 crates
(via magma_app)
43KB
988 lines
Magma-ECS
Magma-ECS is the Entity-component-system for the Magma3D engine.
Features
- Simple and Lightweight
- Update function for systems
Allow for easy execution of the systems
- Parallel
All code is automatically parallelized
Disclaimer
This is still in developement and not production ready.
lib.rs
:
This crate provides the Entity-Component-System of the Magma3D-Engine.
The crate provides a World
struct with Resources
and Entities
.
An entity is just an index into the component storage.
A resource is like a global component, independent of the Entities
.
Example for creating and setting up a World
:
use magma_ecs::World;
let mut world = World::new();
// Register a component type.
// This can be any type that implements Any + Send + Sync.
world.register_component::<u32>();
// add a resource
world.add_resource(10_u32);
// create an entity with registered component
world.create_entity((20_u32,)).unwrap();
Dependencies
~6–12MB
~139K SLoC