Crate ABC_ECS

source ·
Expand description

An ECS (Entity Component System) library for Rust that is designed to be easy to use and safe Tailored specifically for ABC-Game-Engine but can be used for any project

Structs§

  • This struct holds all the entities and components in the game engine It is the main way to interact with the game engine, it is seperate from systems for safety reasons
  • This struct is a thread safe version of the EntitiesAndComponents struct It is used to allow systems to access the entities and components in parallel It will not allow any non send sync components to be accessed or added
  • An entity is a unique identifier for an object in the game engine The entity itself does not hold any data, it is a key to access data from the EntitiesAndComponents struct
  • This struct is very similar to the EntitiesAndComponents struct but it only allows access to components on a single entity for safety reasons
  • This struct is used to access a specific System in the game engine most of the time you will not need to use this struct
  • This struct is the main struct for the game engine

Traits§

  • Components are the data that is stored on entities no need to implement this trait, it is implemented for all ’static types
  • This trait is used to get a tuple of mutable references to components it is automatically implemented for tuples of components
  • This trait is used to get a tuple of references to components it is automatically implemented for tuples of components
  • This trait is used to get a tuple of owned components it is automatically implemented for tuples of components
  • Resources are objects that are not components and do not have any relation to entities They are a sort of blend between an entity and a system, they have their own update method that is called every frame like a system But unlike a system, they can be accessed by systems
  • Systems access and change components on objects Be careful to implement get_allow_entity_based_multithreading as true if you want to use the single_entity_step function If you don’t it will still work but, it will be slower (in most cases)
  • This trait is used to get a tuple of mutable references to components it is automatically implemented for tuples of components
  • This trait is used to get a tuple of references to components it is automatically implemented for tuples of components