Releases: friflo/Friflo.Engine.ECS
engine-v3.0.0-preview.19
-
Changed implementation of
EntityStore.CloneEntity()
Old: Used JSON serialization as fallback if source entity has one or more non-blittable component types.
E.g. a struct component containing fields with reference types like aarray
,List<>
orDictionary<,>
.New: Non-blittable components are now cloned using a static
CopyValue()
method with must part of component type.
E.g.public struct MyComponent : IComponent { public int[] array; static void CopyValue(in MyComponent source, ref MyComponent target, in CopyContext context) { target.array = source.array?.ToArray(); } }
In case
CopyValue()
is missing an exception is thrown including the required method signature in the exception message.
Info: Removing JSON serialization from cloning has additional advantages.- Much faster as JSON serialization/deserialization is expensive.
- No precision loss when using floating point types.
engine-v3.0.0-preview.18
- Changed license to MIT. Used LGPL before.
- Create
ComponentIndex
to simplify search entities with specific components in O(1).var store = new EntityStore(); store.CreateEntity(new Player { name = "Player One" }); var index = store.ComponentIndex<Player,string>(); var entities = index["Player One"]; // Count: 1
- Create
EntityRelations
to simplify iteration of relations.
engine-v3.0.0-preview.17
- Added support of JSON serialization for relations
- Added row
M
to systems perf log to indicate ifMonitorPerf
is enabled for a specific system.
engine-v3.0.0-preview.16
Breaking changes
- To avoid mixing up relations with components accidentally
IRelation
does not extendsIComponent
anymore. - Renamed public API's
IRelationComponent<>
->IRelation<>
RelationComponents<>
->Relations<>
See Wiki ⋅ Relations
3.0.0-preview.15
Support serialization of Entity fields in components. E.g.
struct RefComponent : IComponent {
public Entity reference;
}
will be serialized as JSON
{
"components": {
"RefComponent": {"reference":42}
}
}
3.0.0-preview.14
Fixes issues specific to indexed components and relations.
- Indexed component not found when adding component through EntityStore.CreateEntity - Issue #5
- After deleting the entity, the target entity still has incoming links - Issue #13
- After serialization/deserialization indexed components don't work - Issue #15
- EntitySerializer throws when using a MemoryStream created from a byte[] - Issue #27
- New entities have the same parent of recycled entities - Issue #29
- Use CommandBuffer.SetComponent then crash in Playback- Issue #31
3.0.0-preview.10
Published new nuget package Friflo.Engine.ECS.Boost
A unique feature of Friflo.Engine.ECS is - it uses no unsafe code. This enables running the dll in trusted environments.
For maximum query performance unsafe code it required to elide array bounds checks.
The new Boost package contains an extension dll and make use of unsafe code to improve query performance for large results ~30%.
See Boosted Query with example used for maximum query performance.
engine-v3.0.0-preview.7
Focus of preview.7 was performance improvements
-
Changed behavior The ids of deleted entities are now recycled when creating new entities.
Before: Every created entity got its own (incrementing ) unique id. This behavior lead to an every growing buffer when creating new entities.
To switch to old behavior set EntityStore.RecycleIds = false. -
Introduced EntityData struct to optimize read / write access to multiple components of the same entity.
The cost to access a component is significant less thanEntity.GetComponent()
. -
Change policy used to shrink the capacity of archetype containers.
See: EntityStore.ShrinkRatioThreshold
engine-v3.0.0-preview.6
Same version as engine-v3.0.0-preview.5
Now build with GitHub Action in this new repo: https://github.com/friflo/Friflo.Engine.ECS