Skip to content

Releases: skypjack/entt

EnTT v3.1.0

29 Aug 14:45
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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.