Skip to content

v0.7.6

Compare
Choose a tag to compare
@richardbiely richardbiely released this 27 Oct 07:40
· 1727 commits to main since this release

Building on the previous version, 0.7.6 finishes code refactoring which means:

  • namespaces are all set the way they should be now
  • ComponentType is now ComponentKind so its name does not collide with the component type system
  • any chunk iteration is done using chunk iterators which simplifies code a lot in many places and helps with readability
  • has_entities renamed replaced with empty
  • calc_entity_cnt renamed to count
  • set_structural_changes renamed to lock
  • get_structural_changes renamed to locked
    This also means new features can finally start being added to the framework.

Additionally, iterator refactoring helped also with iterator performance and usability.
Unlike IteratorDisabled or IteratorAll, Iterator suffered by not getting its code vectorized in all cases. This was because compilers were not able to guarantee the memory it iterates was contiguous. All it took was changing its loop from
for (uint32_t i = from; i<to; ++i) ...
to
for (uint32_t i = 0; i<to; ++i) ...
and making sure the span of data it receives is already offset.

Any usage of std::forward and std::move has been replaced with custom GAIA_FWD and GAIA_MOVE performing casts directly.
Besides shorter name, it helps with compilation time and performance of non-optimized builds. Albeit, mostly with older compilers.
In non-optimized bulids older compilers would treat both as functions calls rather than intrinsics which is pretty terrible. Most of all in framework/library code such as Gaia-ECS where a lot of perfect forwarding and moves are used.

Changed:

  • query, component and archetype namespaces dropped 6705b2e
  • ComponentType renamed to ComponentKind 3ba4e60
  • has_entities replaced with empty 15dbb8d
  • calc_entity_cnt renamed to count 15dbb8d
  • set_structural_changes renamed to lock, get_structural_changes renamed to locked e03e169

Fixed:

  • project would not compile on Clang 8 7d2cb2b
  • check for lock when enabling entities e03e169
  • core::each_tuple and core::each_tuple_ext not iterating properly c306db9

Tweaked:

Added:

  • std::forward replaced with GAIA_FWD be4b920
  • std::move replaced with GAIA_MOV 42e72be

Full Changelog: v0.7.5...v0.7.6