Skip to content

Flecs v3.2.9

Compare
Choose a tag to compare
@SanderMertens SanderMertens released this 14 Nov 23:24
· 518 commits to master since this release
ff72706

Highlights

  • Query DSL extension that makes it easier to traverse multiple edges of the same relationship:
    • ChildOf($pilot, $cockpit), ChildOf($cockpit, $plane) can now be rewritten as ChildOf($pilot, $cockpit, $plane)
  • New rule feature that makes it possible to lookup entities by name relative to a query variable:
    • Example: Turret($this), Health($this.cannon)
  • A new API for emitting and observing simple events on entities (c, cpp)
    • Example: window.emit<Resized>({800, 600})
  • A new API for enqueueing events into the command queue for deferred handling (c, cpp)
    • Example: window.enqueue<Resized>({800, 600})
  • Performance improvements:
    • Faster command batching in apps with lots of entities/commands enqueued from observers (~25x faster with 50k entities)
    • Query iteration improvements due to removal of complexity in table storage (~7%-17%)
    • Hierarchy creation/destruction improvements (~4%-7%)

Release notes

This version includes the following bugfixes:

  • Fix assert when journaling remove_all/delete_with functions
  • Fix world cleanup issue when using app_run
  • Fix assert when using a rule that assigns to an entity variable
  • Fix issue where batched commands could invoke multi-component OnSet observer with uninitialized values
  • Fix issue with creating C++ systems/observers with names relative to root
  • Fix issue with instantiating a prefab hierarchy with a recycled prefab id
  • Fix issue with deserializing large int64_t values (TODO: correctly handle large uint64_t values)
  • Fix macro redefined warning when defining both FLECS_DEBUG and FLECS_SANITIZE
  • Fix issue with evaluating filters with static sources that are no longer alive
  • Fix issue in cursor API with deserializing into top-level array types
  • Add missing flecs::Override to C++ API (thanks @BeanCheeseBurrito!)
  • Fix issue with parsing comments in value scopes in flecs script
  • Fix issue with setting pair components that have a recycled relationship id

This version includes the following improvements:

  • [cpp] Default to InOutNone when using .with() in query builder API
  • [cpp] Enable optional pairs in the C++ query builder (thanks @Thinkofname!)
  • [cpp] Add array method to flecs::component for registering components as array type
  • [cpp] Add default constructor to flecs::ref
  • [cpp] Add flecs::ref::try_ref method
  • [query-dsl] Add feature that expands R(A, B, C) into R(A, B), R(B, C)
  • [queries] Add ability to use cascade in descending order
  • [rules] Add support for by name lookups relative to query variables ($var.child_name)
  • [rules] Don't throw error when comparing variable to * or _ wildcards
  • [observers] Add support for entity events
  • [observers] Add support for enqueueing custom events into command queue
  • [json] Serialize large integers as strings in JSON serializer
  • [log] Improve assert performance (thanks @jbarthelmes!)
  • [log] Enable colors for logging in emcc builds
  • [metrics] Add ability to track member metrics on pair components
  • [docs] Fix broken link to meta_c in quickstart
  • [docs] Fix typo in quickstart
  • [docs] Fix crash in C++ hooks example
  • [docs] Fix issue with instancing code example in query manual
  • [docs] Add STACK_SIZE parameter to list of emcc parameters in quickstart
  • [docs] Add game_mechanics/factory example
  • [docs] Add more content to FAQ
  • [internals] Remove record_ptrs member from table
  • [internals] Rename flecs::_::invoker* to flecs::_::delegate*
  • [internals] Rename command constants from EcsOp* to EcsCmd*
  • [internals] Reduce complexity of command batching code
  • [ci] Fix warnings when compiling with -std=gnu2x
  • [ci] Fix missing field initializer warning on g++

Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/466a28be07c4ecbc94fa8cccb9dc4a5ba4dabf96

Known issues:
#844
#765
#714
#620
#478
#314

Full Changelog: v3.2.8...v3.2.9