Flecs v3.2.9
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 asChildOf($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)
- Example:
- A new API for emitting and observing simple events on entities (c, cpp)
- Example:
window.emit<Resized>({800, 600})
- Example:
- A new API for enqueueing events into the command queue for deferred handling (c, cpp)
- Example:
window.enqueue<Resized>({800, 600})
- Example:
- 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 largeuint64_t
values) - Fix macro redefined warning when defining both
FLECS_DEBUG
andFLECS_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 toInOutNone
when using.with()
in query builder API[cpp]
Enable optional pairs in the C++ query builder (thanks @Thinkofname!)[cpp]
Addarray
method toflecs::component
for registering components as array type[cpp]
Add default constructor toflecs::ref
[cpp]
Addflecs::ref::try_ref
method[query-dsl]
Add feature that expandsR(A, B, C)
intoR(A, B), R(B, C)
[queries]
Add ability to usecascade
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]
AddSTACK_SIZE
parameter to list of emcc parameters in quickstart[docs]
Addgame_mechanics/factory
example[docs]
Add more content to FAQ[internals]
Removerecord_ptrs
member from table[internals]
Renameflecs::_::invoker*
toflecs::_::delegate*
[internals]
Rename command constants fromEcsOp*
toEcsCmd*
[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