Skip to content

Releases: centau/ecr

v0.9.0

02 Mar 01:12

Choose a tag to compare

v0.9.0 Pre-release
Pre-release

[0.9.0] - 2025-03-02

Added

  • Method Registry:find().
  • Method Registry:insert().
  • Method Registry:copy().
  • Overload ecr.queue() to accept a function connector.
  • Overload ecr.registry() to restrict entity range.
  • Function ecr.buffer_to_buffer().

Changed

  • Method Registry:patch() will return the new value.

Removed

  • Method Observer:persist().
  • Method View:use().

Fixed

  • Single type view not excluding properly with multiple exclude types.
  • Connection:disconnect() disconnecting the wrong listener.

v0.8.0

05 Dec 18:58

Choose a tag to compare

v0.8.0 Pre-release
Pre-release

[0.8.0] - 2023-12-05

Added

  • Constant ecr.context.
  • Constant id_size.
  • Function ecr.array_to_buffer().
  • Function ecr.buffer_to_array().
  • Overload for Registry:storage() to get an iterator for all storages.

Changed

  • All components must be defined before the registry using them is created.

  • The context entity does not exist until Registry:context() is first called.

  • The context entity can now be destroyed.

  • Observers are now empty when first created.

  • Entity id size reduced from 8 bytes to 4 bytes.

    • Max entities that can exist at once is now 2^16-1 (65,535).
  • Renamed ecr.Entity type alias to ecr.entity.

  • Renamed Registry:added() to Registry:on_add().

  • Renamed Registry:changed() to Registry:on_change()

  • Renamed Registry:removing() to Registry:on_remove().

  • Renamed Registry:orphaned() to Registry:has_none().

  • Property Pool.entities type is now a buffer.

  • Method Registry:set() can now also add tags.

  • Method Observer:disconnect() can only be called on empty observers.

  • Signal Registry:on_change() now fires before the component is changed.

    • New value still given as argument, but now can retrieve old value with Registry:get().

Removed

  • Method Registry:version().
  • Method Registry:current().

Improved

Large refactor to use the new Luau buffer datatype. Up to 2x faster and 2-4x
less memory usage across the board.

ECR v0.7.0

20 Jul 21:43

Choose a tag to compare

ECR v0.7.0 Pre-release
Pre-release

[0.7.0] - 2023-07-20

Added

  • Connection:reconnect().
  • ecr.entity which is a built-in component that can be used to access a
    dedicated entity pool:
    • Exclude-only views registry:view(ecr.entity):exclude(...).
    • Signals for creation and destruction of entities registry:added(ecr.entity):connect().
    • Direct access to array of all entities in the registry registry:storage(ecr.entity).
  • ecr.is_tag() to check if a given component is a tag type.
  • Registry:context() to store components not specific to an entity.
  • Methods for lower level access to pools.

Changed

  • Using Registry:set() to set nil values will now error.
    • Use Registry:remove() instead.
  • Registry:handle() calls are now memoized, passing the same ids will return
    the same handle objects.

Removed

  • Operations #Registry and for id in Registry do.
    • Replaced by entity storage.

ECR v0.6.1

04 Jul 10:40

Choose a tag to compare

ECR v0.6.1 Pre-release
Pre-release

[0.6.1] - 2023-07-04

Changed

  • Registry:patch() will invoke the component constructor if the entity
    does not have the given component.

Fixed

  • Registry:orphaned() not erroring with destroyed id.
  • ecr.queue() clearing early.

ECR v0.6.0

27 Jun 23:07

Choose a tag to compare

ECR v0.6.0 Pre-release
Pre-release

[0.6.0] - 2023-06-27

Added

  • Check for iterator invalidation occuring with group misusage.
  • Function ecr.tag() to create valueless components.
  • Function ecr.queue() and the Queue class.
  • Function ecr.name() for associating names with component types.
  • Method Registry:handle() and the Handle class.
  • Method Registry:try_get().
  • Method Observer:persist().
  • Length operator for registry #Registry.
  • Iteration over registry for id in Registry do.

Changed

  • Observers will automatically clear themselves after iteration by default.
    • Call Observer:persist() to stop this.
  • Registry:get() will now error if the entity does not have every component.

Removed

  • Method Registry:version().
  • Method Registry:current().
  • Method Registry:entities().
  • Method Registry:size().

ECR v0.5.0

14 May 23:32

Choose a tag to compare

ECR v0.5.0 Pre-release
Pre-release

[0.5.0] - 2023-05-14

Changed

  • Connecting or disconnecting an already connected or disconnected observer will no longer error.
  • Excluding an already excluded component with View:exclude() and Observer:exclude() no longer errors.
  • Method Registry:add() will do nothing if the entity already has the component.
  • Method Registry:orphan() renamed to Registry:orphaned().
  • Method Registry:valid() renamed to Registry:contains().
  • Method Registry:create() is now guaranteed to always return unique identifiers.
  • Using invalid entities no longer causes undefined behavior in any method and instead errors.
  • Registry:track() will now track all components passed, not just the first one.

Removed

  • Methods:
    • View:each()
    • Observer:each()
    • Group:each()

Fixed

  • Undefined behavior sometimes occuring when removing grouped components.
  • Observers not returning up-to-date values when changing a component while it is disconnected.

ECR v0.4.0

26 Jan 18:18

Choose a tag to compare

ECR v0.4.0 Pre-release
Pre-release

[0.4.0] - 2023-01-26

Added

  • Component grouping and Registry:group().
  • Method View:use().
  • Constant ecr.null.

Removed

  • Method View:include() and Observer:include().

Fixed

  • Registry:add() not firing Registry:added() signals.
  • Mismatch between argument list and values returned in multi-typed observers.
  • Observers not garbage collecting after calling Observer:disconnect().

Improved

  • Connection firing speed by ~70%.

ECR v0.3.0

09 Jan 00:50

Choose a tag to compare

ECR v0.3.0 Pre-release
Pre-release

[0.3.0] - 2023-01-09

Added

  • Overload for Registry:create() to create an entity with a given identifier.

Changed

  • Registry signals no longer pass the registry as the first argument to listeners.
  • Observers no longer track entities with removed components.
  • Method Registry:entities() now creates and returns an array of only valid entities.
  • Method ecr.registry() can no longer pre-allocate memory.

Removed

  • Method Registry:capacity().

Improved

  • Double-type view iteration speed by ~100%.

ECR v0.2.0

08 Dec 02:08

Choose a tag to compare

ECR v0.2.0 Pre-release
Pre-release

[0.2.0] - 2022-12-08

Added

  • Method View:include() and Observer:include().
  • Method Registry:change().
  • Method Registry:patch().
  • Method Registry:add() and optional default parameter for ecr.component().

Changed

  • Behavior for ... in View do now behaves the same as for ... in View:each() do.
  • Signal diconnect API (Signal now returns a connection object to call disconnect on).

Improved

  • Entity creation and release speed by ~100%.
  • Multi-type view iteration speed by ~60%.

ECR v0.1.0

17 Nov 13:15
99b8867

Choose a tag to compare

ECR v0.1.0 Pre-release
Pre-release

Initial release