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

#711 in Game dev

Download history 23/week @ 2024-09-15 19/week @ 2024-09-22 17/week @ 2024-09-29 1/week @ 2024-10-06 181/week @ 2024-10-13 295/week @ 2024-10-20 337/week @ 2024-10-27 90/week @ 2024-11-03 6/week @ 2024-11-10 10/week @ 2024-11-17 8/week @ 2024-11-24 1/week @ 2024-12-01 45/week @ 2024-12-08 12/week @ 2024-12-15 13/week @ 2024-12-22

70 downloads per month
Used in 5 crates (via magma_app)

MIT license

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
~141K SLoC