Entia 1.4.0
Pre-release
Pre-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
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 theFamilies
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 toBinaryFormatter
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 theEntia.Experimental.Serialization
namespace - new serializers can be defined by implementing the
ISerializer
interface orSerializer<T>
abstract class and then linking the implementation through theworld.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 theImplementationAttribute
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 ownContainer
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>
andIOnDisable<T>
which give access to theT
component - improved performance of
TypeMap
and reduced locking - added a convenient
Get
method onGroup<T>
and its injectables Components.TryGet<T>
now allows for an abstractT
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>
andResult<T>
- the
ISilent<T>
interface is more type-safe