13 releases

0.2.0 Mar 3, 2025
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.1 Nov 30, 2023

#701 in Game dev

Download history 10/week @ 2024-11-20 6/week @ 2024-11-27 18/week @ 2024-12-04 33/week @ 2024-12-11 8/week @ 2024-12-18 11/week @ 2024-12-25 8/week @ 2025-02-05 42/week @ 2025-02-12 321/week @ 2025-02-26 118/week @ 2025-03-05

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

MIT license

46KB
1K SLoC

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