Skip to content

Releases: skypjack/entt

EnTT v3.2.0

29 Oct 21:10

Choose a tag to compare

Changelog:

  • Added EnTT to the GitHub Sponsors program (link in the README file).
  • Added the try online badge to the README file.
  • Moved CI to GH Actions.
  • Use codecov instead of coveralls.
  • Relaxed constraints on the order of types in the group definition.
  • The runtime reflection system finally works across boundaries.
  • In-depth review of the runtime reflection system, backward compatibility not guaranteed.
  • Key/Value pairs, key-only properties, tuples and annotations (invocable) are allowed as meta properties.
  • meta_any uses std::reference_wrapper instead of as_alias_t for aliasing.
  • Added meta_type::compare, meta_any no longer has to store aside comparison functions.
  • New meta_any constructor for unmanaged objects taken from a meta_handle.
  • meta_handle no longer exposes data/try_cast.
  • All meta functions take their arguments by alias and can edit objects in the outer context.
  • Introduced meta_type::remove_extent to get the meta type of the elements of an array.
  • A static assertion forbids using non-copyable types with meta_any.
  • Added dispatcher::discard to clear pools of events.
  • Invocation order guaranteed for signals (sigh, registry, dispatcher, ...).
  • Overloaded sink::before function to insert listeners at specific locations in the signal.
  • sink::disconnect and sink::before support also pointers as instances or payload.
  • delegate supports also pointers as instances or payload.
  • sparse_set::swap and storage::swap accept entities, no longer positions.
  • Sorting pools doesn't require to allocate anymore and is much faster.
  • stomp & spawn work also with const source registries now.
  • Make empty components eat arguments on construction.
  • Multi-component version of registry::reserve, registry::shrink_to_fit, registry::empty.
  • Added registry::prepare to force-create component pools within the registry.
  • Views support exclusion lists (eg registry.view<T>(exclude<U>)).
  • view::get for single component views accepts an optional template parameter for consistency.
  • Multi-component version of view::empty.
  • Multi-component version of group:empty.
  • Sorting groups doesn't require to allocate anymore and is much faster.
  • Nested groups: perfect SoA to the rescue.
  • Allow process to work with delta types other than fundamental ones.
  • Utilities: overloaded and y_combinator.
  • Added is_equality_comparable[_v] trait.
  • Added what is needed for the choice trick, see choice_t/choice from type_traits.hpp.
  • named_type_traits_v<Type> utility/shortcut for named_type_traits<Type>::value.
  • ENTT_DISABLE_ETO macro to disable empty type optimization for components.
  • Macros (for example ENTT_NAMED_TYPE) always require a trailing semicolon.
  • resource_handle, resource_loader and resource_cache are now handle, loader and cache.
  • cache exports both resource_type and id_type.
  • basic_continuous_loader support for map-like containers.
  • Fixed a bug on groups when dependencies between components were set.
  • Fixed a bug of collector::where when multiple rules were declared at once.
  • Marked cmake project explicitly as C++, language C is required only if BUILD_MOD is set to ON.
  • Added cmake support for clang users on Windows.
  • Added namespace qualifier in CMake.
  • Performance improvements here and there (eg groups lookup, stomp & spawn utilities).

Be aware that this release contains some non-backward compatible changes.
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
I've also updated the FAQs and the section EnTT in Action with more and more examples.

EnTT v3.1.1

05 Sep 13:51

Choose a tag to compare

Changelog:

  • Small perf improvements here and there.
  • Fixed a major bug on the batch creation of entities.
  • Added a few more tests for the batch creation of entities.
  • The runtime reflection system compiles fine with VS2019 when C++20 is in use (latest).

This release is mainly due to the resolution of the bug on the batch creation of entities.
The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.

EnTT v3.1.0

29 Aug 14:45

Choose a tag to compare

Changelog:

  • Added radix_sort algorithm.
  • Resource handles are now mutable.
  • Small enhancement to the actor class.
  • entt::null no longer takes the version into account.
  • Updated the codebase so as to remove direct dependencies on hashed strings (eg runtime reflection system).
  • Added support for std::wstrings to hashed string (see the hashed_wstring class and the _hws literal).
  • Entity identifiers are enum classes, user defined types are allowed (see entt::entity and ENTT_OPAQUE_TYPE).
  • entt::registry::component_type has been replaced by the opaque identifier entt::component.
  • Batch creation returns iterators and no longer raw pointers.
  • Added two overloads of registry::create to spawn (literally clone) entities from a prototype.
  • Added registry::stomp to clone/overwrite entities locally or between different registries.
  • Added registry::ctx_or_set to get or create context variables at once (similar to registry::get_or_assign for components).
  • Easy set up for short circuits on the registry class and cross events between different registries.
  • The arguments of the signals emitted by the registry class are entity/registry/component and no longer registry/entity/component.
  • registry::clone accepts also an exclusion list to opt-out from the cloning functionality.
  • Added view::less and group::less. They work like each but they don't return empty types.
  • Added the possibility to sort free instances for owned types (see registry::sort).
  • It's now possible to sort non-owning groups using a custom comparison function.
  • Added excluded components to the list of template parameters of a group.
  • Full featured as_group helper, it supports also observed and excluded components.
  • Added cache::each to allow iteration of all resources in a cache.
  • A more flexible delegate class that accepts also functions with a list of parameters that is shorter than that of the delegate itself.
  • delegate works also with move only types and non-const references.
  • delegate::operator== and delegate::operator!= test the instance as a whole.
  • Removed collector from sigh type, turned sig::collect in a function template.
  • Reviewed sink::disconnect (and added another overload to remove all the listeners at once based on instances or payload).
  • Added connection and scoped_connection, the former is now the return value of sink::connect.
  • delegate and sink accept only references for instances and values, no longer naked pointers.
  • Curried functions return their values as references, no longer as naked pointers.
  • Introduced the observer class to ease the definition of reactive systems.
  • Greatly improved the runtime reflection system and reduced to a minimum the number of copies when meta_any is involved.
  • Added support for void to meta_any, it's treated as a normal type but it contains no values.
  • Added meta_any::try_cast (extended-if-friendly function), assignment operators, in-place constructors and so on.
  • meta_any can finally be used to work also with unmanaged objects.
  • Return values for meta_func are void-friendly and convert to false only in case of errors.
  • Setters and getters for meta_data receive instances as references, no longer as pointers.
  • Added the possibility to set free/member functions as conversion functions on meta_conv.
  • Introduced policies (as_is, as_void, as_alias) in the runtime reflection system.
  • Defined type_list_size and type_list_size_v to get the size of a type list.
  • Fixed a major bug in the clone functionality of the registry class.
  • Fixed a major bug in the range destroy of the registry class.
  • Fixed group::sort with components.
  • Bazel as an alternative build system.
  • Added Conan support in editable mode.
  • Added support for VS2019 through appveyor (CI).
  • Performance improvements here and there (eg construction/destruction of components).

Classes and features that are no longer available starting from this version:

  • prototype: registry::stomp makes it easier to use a prototype-registry for the same purpose.
  • dependency (and therefore connect, disconnect): new signatures for callbacks allow for short circuits.
  • invoker and basic collectors (null and void ones): added an explicit collect function to sigh.
  • maybe_atomic_t: no longer required.

The documentation is up-to-date and the library is battle-tested with 100% coverage as usual.
I've also updated the FAQs and the section EnTT in Action with more and more examples.

EnTT v3.0.0

16 May 14:19

Choose a tag to compare

A major release that represents an important improvement for EnTT, both in terms of performance and functionalities.

To begin with, this is the first official release that requires and fully supports C++17.
This is the root cause of some of the API changes that made it no longer backward compatible. However, the API itself has been greatly improved in some of its parts (such as the connect function of the delegate class).
Moreover, the library has been converted to snake case, leaving behind the misleading coding style of the previous version.

Below there is a perhaps incomplete list of features and more or less important updates:

  • Added support for named types as an alternative to the family class.
    • As a consequence, EnTT can now work across boundaries (welcome DLLs).
  • Introduced a full featured runtime reflection system.
  • Introduced a few new utilities: as_view, as_group, label.
  • Removed persistent view, it's no longer available (see groups for further details).
  • Removed raw view, it's no longer available (single component view serves the same purpose now).
  • Support for context variables (sort of registry-wise singletons).
  • Removed support for single instance components.
  • Empty type optimization to reduce memory usage.
  • Improved the registry class in all its parts:
    • Added registry::try_get.
    • Added registry::get_or_assign.
    • Added registry::create overload to generate multiple entities at once.
    • Support for component lists to initialize entities when invoking registry::create.
    • Renamed registry::accommodate to registry::assign_or_replace for consistency.
    • Support for const and non-const types of components (eg registry.view<T>() vs registry.view<const T>()).
    • Support for const overload of registry::view.
    • Support for groups (see below).
    • Added registry::clone functionality.
    • Bulk operations are now available.
  • Extended the delegate class and therefore sigh and dispatcher as a consequence:
    • Support for invocable types that doesn't strictly respect the signature of the delegate.
    • Support for curried functions (available for free functions, they can now accept a payload).
  • Extended the view class:
    • Added view::find to search for specific entities.
    • view::each support lambdas that either accept or not the entity as a first argument (performance improvement).
  • Improved and extended hashed_string:
    • Added hashed_string::to_value static member function.
    • Added possibility to use either int32 or int64 for the value.
  • Slightly improved the resource part, in particular cache and handle classes.
  • Slightly improved the snapshot stuff in all its parts.
  • Slightly improved the monostate class.
  • Added Conan support.
  • Added fwd.hpp headers.
  • Introduced new grouping functionalities: the groups are an extremely powerful tool that allows up to perfect SoA during iterations. They support also exclusion lists. Please, refer to the official documentation for all the details.
  • Introduced pagination for the pools to reduce memory usage on sparse components.
  • Introduced ENTT_DISABLE_ASSERT/ENTT_ASSERT macros to speed up EnTT in debug (see the FAQ from the wiki for more details).
  • Added signal on replace, renamed and extended signals on construction/destruction.
  • Added default aliases for most common cases (eg entt::entity and entt::registry).

The most important feature both in terms of functionalities and performance are the so-called groups. Let me go a little more in detail. They are divided into three parts and refer to different access patterns, being therefore indicated for different paths, from the most critical to the least relevant:

  • Full-owning groups: they allow what is called perfect SoA. Iterating this type of groups is reduced to iterating a bunch of packed arrays of the same size, all ordered in the same way. Probably we are close to the best that can be achieved in terms of performance.
  • Partial-owning groups: they allow what is called almost-perfect SoA. These groups go with perfect SoA on the types of components they manage to indecently increase performance during iterations and rely on indirection to access the other types of components.
  • Non-owning groups: they know in advance what are the entities that respect a given pattern and take advantage of this to iterate them quickly. However, they don't own any component and therefore rely on direction to retrieve their instances.

In general, the more types a group owns, the faster it will be to iterate entities and components. Refer to the wiki for all the details.

I didn't mention all the improvements made to further increase performance, but I want to let you know that there have been many.
To sum up, EnTT is now faster than ever, more flexible and offers even more features.

EnTT is still and as always battle-tested with 100% coverage. This doesn't mean that it's bug-free, but gives enough guarantees about its stability for use in production environments.
The documentation has been updated, as well as the wiki and both reflect the latest version available.

If I've forgotten anything, do not hesitate to contact me, so as to integrate this section.

EnTT v2.7.3

02 Sep 21:06

Choose a tag to compare

Mainly due to some important bugs:

  • Fixed Snapshot::destroyed, it could lead to undefined behavior under certain circumstances (see #128)
  • Fixed Registry::accommodate, it didn't trigger events in any case (see #133)
  • break_t doesn't exist anymore, dependency is now connect/disconnect
  • Delegate/SigH support also const member functions now
  • Suppressed warnings within SparseSet on x86 platforms
  • Updated entt-in-action list
  • Review of the internals
  • Updated build system
  • More tests

Moreover, ports that have been created/updated:

  • Added unofficial/unsupported port to/branch vs2015 (help is appreciated, otherwise it will get old soon)
  • Updated branch c++17.draft, an up-to-date port of EnTT to C++17 that will replace master sooner or later

Finally, the documentation has been completely reviewed. The README file is now shorter than ever and I created a set of wiki pages with all the information and crash courses written so far. The wiki pages are also part of the online documentation prepared via doxygen (see menu, related pages) and therefore of the project, dir docs.

EnTT v2.7.2

02 Aug 21:09

Choose a tag to compare

Mainly due to some important bugs:

  • Fixed major bug on sparse set (#120)
  • Fixed major bug in the snapshot stuff (#116)
  • Got a logo, finally!
  • Introduced entt::OneShotBubbleSort
  • Added entt::Registry::entity
  • Added entt::label
  • Some performance improvements
  • Updated documentation
  • Better build system

EnTT v2.7.1

03 Jul 11:08

Choose a tag to compare

Bug fixing:

  • Runtime views were inherently bugged and they could result in undefined behavior under certain circumstances. They work as expected now.