Skip to content

Releases: friflo/Friflo.Engine.ECS

engine-v3.0.0-preview.19

10 Dec 10:19
Compare
Choose a tag to compare
  • 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 a array, List<> or Dictionary<,>.

    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.

    1. Much faster as JSON serialization/deserialization is expensive.
    2. No precision loss when using floating point types.

engine-v3.0.0-preview.18

10 Dec 10:18
Compare
Choose a tag to compare
  • 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

10 Dec 10:20
Compare
Choose a tag to compare
  • Added support of JSON serialization for relations
  • Added row M to systems perf log to indicate if MonitorPerf is enabled for a specific system.

engine-v3.0.0-preview.16

22 Nov 11:12
Compare
Choose a tag to compare

Breaking changes

  1. To avoid mixing up relations with components accidentally IRelation does not extends IComponent anymore.
  2. Renamed public API's
    IRelationComponent<> -> IRelation<>
    RelationComponents<> -> Relations<>

See Wiki ⋅ Relations

3.0.0-preview.15

19 Nov 13:36
Compare
Choose a tag to compare

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

3.0.0-preview.10

08 Aug 17:44
Compare
Choose a tag to compare

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

31 Jul 15:50
Compare
Choose a tag to compare

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

engine-v3.0.0-preview.6

25 Jul 08:51
Compare
Choose a tag to compare

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