Skip to content

Entia 1.4.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Magicolo Magicolo released this 23 Aug 05:30
· 143 commits to master since this release

IRunEach

  • added new systems interfaces for common iteration scenarios named IRunEach<T1... T7>
  • iteration using this interface uses less memory than using a Group<T> since it does not require caching the query structs and iterates using the most performant iteration pattern
  • query attributes can still be used with these interfaces by applying them on the implementation method Run

image

Families

  • added a new Families module to facilitate the usage of hierarchical structures of entities in a performant manner
  • added an AllFamilies injectable to interact with the Families module
  • added tests for Families module
  • fixed a few bugs where a family loop would be allowed in some cases in the Families module

Serialization

  • added an experimental serialization solution that revolves around Buffer.MemoryCopy which gives it a huge performance boost compared to BinaryFormatter for blittable types (especially blittable arrays) which the framework strongly uses and encourages
  • the solution is currently contained in the Entia.Experimental namespace since it is not yet production ready
  • can be used through the world.Serialize(instance, out var bytes); world.Deserialize(bytes, out instance) extensions located in the Entia.Experimental.Serialization namespace
  • new serializers can be defined by implementing the ISerializer interface or Serializer<T> abstract class and then linking the implementation through the world.Container

Container

  • added a new and much more general mechanism for extensibility that is heavily inspired by "traits" which exist in some other programming languages
  • data types are linked to some behavior using the IImplementation interface or the ImplementationAttribute attribute
  • behaviors can be any interface that implements the empty ITrait interface
  • implementations can be retrieved using a Container instance
  • every World now comes with its own Container instance
  • new implementations can be linked with data types through the Container instance
  • new traits can be defined and will be immediately usable with a Container
  • the framework now makes extensive use of the Container
  • this allowed the removal of a few world modules which only contained boiler plate code for extensibility

Others

  • added a few convenient system interfaces: IOnAdd<T>, IOnRemove<T>, IOnEnable<T> and IOnDisable<T> which give access to the T component
  • improved performance of TypeMap and reduced locking
  • added a convenient Get method on Group<T> and its injectables
  • Components.TryGet<T> now allows for an abstract T type
  • better Entity debug view
  • ensured that no static reference to a world is kept withing the framework because it would prevent it from being GC'ed
  • added more extensions for Option<T> and Result<T>
  • the ISilent<T> interface is more type-safe