Release Notes
Last updated
Last updated
Features in this list are also explained in the GitHub Wiki.
Every new version is backward compatible to earlier versions. Exceptions are labeled as Breaking change / Changed behavior. These changes are made only on rarely used features.
Releases on nuget are available at
Detailed information for each release at GitHub - Release Tags
Breaking changes
To avoid mixing up relations with components accidentally IRelation
does not extends IComponent
anymore.
Renamed public API's
IRelationComponent<>
-> IRelation<>
RelationComponents<>
-> Relations<>
Support serialization of Entity fields in components. E.g.
will be serialized as JSON
Fixes issues specific to indexed components and relations.
Return the passed each
parameter in QueryExtensions.Each(each)
methods.
This enables access to the state of the structs implementing IEach<...>
.
Same as 3.0.0-preview.8, 3.0.0-preview.9. Created until CI was successful
Published new nuget package Friflo.Engine.ECS.Boost A unique feature of Friflo.Engine.ECS is - it uses no unsafe code. 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.
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 than Entity.GetComponent()
.
Change policy used to shrink the capacity of archetype containers. See: EntityStore.ShrinkRatioThreshold
Same release as preview.5 build with GitHub Action in new Repository
Improved performance of Entity.RemoveChild()
& Entity.InsertChild()
when remove / insert child entity on tail.
Added runtime assertions to ensure an entity tree (parent / child relations) never contains cycles.
So the tree is always a DAG - directed acyclic graph.
An operation e.g. AddChild()
which would create a cycle within a tree will throw an exception like:
Improved performance of Entity.AddChild()
, Entity.RemoveChild()
& Entity.InsertChild()
by 30%
Reduced number of properties displayed for an Entity in the debugger. Moved properties: Archetype, Parent & Scripts to Entity.Info
Improved performance and memory allocations to build a scene tree.
Each parent in a tree has a TreeNode
component.
reduced sizeof(TreeNode)
component from 16 to 8 bytes.
Before: Each TreeNode
has an individual int[] array storing child ids.
Now: child ids are stored in a ~ dozen id pool array buffers. Independent from the number of parent or child entities.
If these array buffers grown large enough over time no heap allocations will happen if adding or removing child entities.
For specific use cases there is now a set of specialized component interfaces providing additional features. Note: Newly added features do not affect the behavior or performance of existing features. See documentation at: Examples - Component-Types
The specialized component types enable entity relationships, relations and full-text search. Typical use case for entity relationships in games are:
Attack systems
Path finding / Route tracing
Model social networks. E.g friendship, alliances or rivalries
Build any type of a directed graph using entities as nodes and links or relations as edges.
Added support for generic component and tags types. See Issue #53. E.g.
Introduced Systems, System Groups with command buffers and performance monitoring. Details at README - Systems
Added support for Native AOT. Details at Wiki â‹… General - Native AOT.
Enabled sharing a single QueryFilter instance by multiple queries.
Changing a query filter - e.g. adding more constrains - directly changes the result set of all queries using the queryFilter
.
Added CommandBuffer.Synced intended to record entity changes in parallel query jobs.
Performance
Improved bulk creation of entities by 3x - 4x with Archetype.CreateEntities(int count). See performance comparison at ECS Benchamrks.
Reduced memory footprint of an entity from 48 bytes to 16 bytes. See column Allocated in ECS Benchamrks.
Decreased initial component type registration from 80 ms to 23 ms (Mac Mini M2). Note: Component type registration runs only once per process on the first ECS API call.
Fixes
Fixed issue related to JSON serialization. See Issue #45 Before: Component types with unsupported field types caused an exception. Fix: These unsupported field types are now ignored by JSON serializer.
Parallel queries: fixed entities - of type ChunkEntities
- used as last parameter in a ArchetypeQuery.ForEach()
.
See Issue #50
Before: entities
returned always the same set of entities. Fix: entities
now returns the entities assigned to a thread.
Adding a Signal handler to an entity already having a Signal handler replaced the existing one. See Issue #46
Project
Simplify project structure for Friflo.Engine.ECS. Reduced number of files / folders in Engine folder
from 21 to 7.
Moved documentation and examples from README.md
to GitBook.io â‹… Wiki pages.
Optimize performance of Add<>()
, Set<>()
and Remove<>()
introduced in 1.26.0.
Features:
Add 10 CreateEntity()
overloads to create entities with components without any structural change in EntityStoreExtensions.
Add 10 overloads to Add<>()
, Set<>()
and Remove<>()
entity components with one/none structural change in EntityExtensions.
Add ArchetypeQuery.ToEntityList() returning the entities as a list which can be used for structural changes.
Emit events on create / delete entity via EntityStore.OnEntityCreate and EntityStore.OnEntityDelete.
Switched project to more permissive license LGPL v3.0. Before AGPL v3.0. See Issue #41.
Add support for component fields of type: sbyte, ushort, uint, ulong
. See Issue #38.
Support integration in Unity as nuget package. Supports Mono & AOT/IL2CPP builds. Tested on Windows & macOS.
Add ArchetypeQuery.ForEachEntity()
for convenient query iteration.
Support / fix using vector types - e.g. Vector3
- as component fields for .NET 7 or higher.
Introduced EntityList
to apply an entity batch to all entities in the list.
Add Entity.Enabled
to enable/disable an entity.
Add Entity.EnableTree()
/ Entity.DisableTree()
to enable/disable recursively the child entities of an entity.
Introduced CreateEntityBatch
to optimize creation of entities.
Added DebugView's for all IEnumerable<> types to enable one click navigation to their elements in the debugger.
E.g. the expanded properties ChildEntities and Components in the examples screenshot.
Breaking change: Changed property Entity.Batch
to method Entity.Batch()
.
Add support for entity batches and bulk batch operations to apply multiple entity changes at once.
Changed behavior of the Archetype assigned to entities without components & tags.
Before: Entities were not stored in this specific Archetype. Archetype.Entities
returned always an empty result.
Now: Entities are stored in this Archetype.
Reduced the number of properties shown for an entity in the debugger. See screenshot in Examples.
Add support for parallel (multi threaded) query job execution.
Add support for target framework .NET Standard 2.1 or higher.
Add additional query filters like WithoutAnyTags()
using an ArchetypeQuery.
Support to filter entity changes - like adding/removing components/tags - in queries using an EventFilter.
Add support for CommandBuffer's.
Features