Happy GDC! πΎ
Highlights
- Many changes that reduce memory utilization and binary footprint!
- Flecs now has more than 10.000 tests ran on every commit β
- 30-50% performance improvement for
get
/get_mut
/has
/owns
on clang & gcc when using LTO π - New APIs to work directly with internal data structures for building fast custom ECS operations
Release notes
This version includes the following bugfixes:
[cpp]
Fix issue with assigningflecs::Component
to implicitly registered tags and prefabs[cpp]
Fix query copy ctor/assign for default constructed queries (thanks @Thinkofname!)[cpp]
Fix ambiguous methods for enum types (thanks @Reddy-dev!)[cpp]
Use correct world interm_builder_i::singleton()
(thanks @BeanCheeseBurrito!)[cpp]
Fix issue with using.field_at
when using.with<T>()
whereT
is sparse[cpp]
Fix assert inecs_cpp_trim_module
when component name overlaps with module[cpp]
Fix issue whereentity::remove
could not be used to remove enum components[cpp]
Fix race condition in enum reflection code[core]
Fix issue with batched set commands and inherited components[core]
Fix compilation error with strayFLECS_API
annotations in source files[core]
Fix issue with instantiating prefab with union relationship while deferring is suspended[core]
Fix shift overflow for events with large (>64) numbers of components[core]
Fix issue with command queue that contains both recycled id and old id[core]
Fix use after free whenFLECS_USE_OS_ALLOC
is defined[core]
Fix invalid read for table with many flag/pair ids[core]
Fix memory leak in the entity index (thanks @jpeletier!)[core]
Fix ubsan error where offset was applied toNULL
[queries]
Fix issue with queries matching(ChildOf, 0)
when iterating component ids[queries]
Fix issue with cached queries and up traversal[queries]
Fix crash when usingiter::get_var
on chained iterators[observers]
Fix issue in observer event forwarding code where source was incorrectly set[observers]
Fix issue when usingLOG_LEVEL_3
in release mode[observers]
Fix issue with observers that have a fixed entity source[observers]
Fix issue with two observers withrun
actions where one could prevent the other from running (thanks @Thinkofname!)[observers]
Fix issue where observers could get registered multiple times for same event[observers]
Fix issue with observers that have terms with a variable source[pipelines]
Fix issue where sync point wasn't inserted forInOutNone
terms[meta]
Fix issue where member with_
name was not created in struct (thanks @GsLogiMaker!)[json]
Fix issue in JSON deserializer when skipping missing component[meson]
Add missingaddons/app.c
to meson.build (thanks @justinian!)
This version includes the following improvements:
[cpp]
Addflecs::ref::component()
method[cpp]
Fix warning in enum.hpp (thanks @jpeletier!)[cpp]
Allow specifying underlying type for constants with template parameter (thanks @Reddy-dev!)[cpp]
Support using enum reflection without requiringFLECS_META
addon[cpp]
AddFLECS_CPP_NO_ENUM_REFLECTION
flag[cpp]
Add path separator argument toflecs::entity
constructor[cpp]
Reduce memory footprint of component registration[cpp]
Add support for type checked.term_at<T>
and.term_at<T>(i)
(thanks @deathbeam!)[cpp]
Add support for untyped references (thanks @jpeletier!)[cpp]
Use low ids for untyped components (thanks @Reddy-dev!)[core]
Improve performance ofecs_ref_get
/flecs::entity::get_ref
[core]
Improve performance ofecs_delete_empty_tables
[core]
Make functions to suspend/resume readonly mode public again for language bindings[core]
Add fields to support debug (natvis) visualization[core]
Remove redundant component record flags[core]
Add newInheritable
trait to indicate in advance a component will be inherited from[core]
Store entities without components in root table[core]
Don't retain large allocations in block allocator[core]
Removeentry_allocator
field from maps[core]
Packecs_map_t
fields to reduce footprint[core]
Reduce footprint ofecs_id_record_t
,ecs_table_t
[core]
Simplify command batching logic by removing redundant guarantee[core]
Implementecs_shrink
/world::shrink
method that frees unused memory[core]
Addalways_inline
annotation to performance critical functions[core]
Expose internal APIs to work withecs_component_record_t
andecs_table_record_t
[queries]
Reduce number of block allocators for cached queries[queries]
Change default cache policy to cached when query hascascade
term[queries]
Add compiler flag to change default query caching policy to uncached[meta]
Implement equals/compare type hooks (thanks @jpeletier!)[meta]
Add opaque serializer callbacks for members and elements (thanks @jpeletier!)[script]
Split off parser and query DSL code from FLECS_SCRIPT addon[script]
Add support for parsing binary and hex base numbers[allocators]
Remove redundantblock_tail
member from block allocator[os api]
Add support for cosmo compiler (thanks @bnjmnjrk!)[docs]
Add links to new jellycake youtube tutorials[docs]
Remove outdatedemplace
documentation from C++ API[docs]
Add SDL3 example project to documentation page[docs]
Update link to Zig binding in README[docs]
Bazel docs update that reflects improvements in renovate (thanks @reutermj!)[docs]
Remove incorrect statement aboutFinal
trait from component traits manual[docs]
Improve API documentation for binding support functions[docs]
Fix formatting of code segment in quickstart (thanks @theaveasso!)[ci]
Fix typo in Allocator.c[ci]
Add missing enum tests to cpp/project.json (thanks @BeanCheeseBurrito!)[ci]
Add missing reference tests to cpp/project.json (thanks @jpeletier!)[ci]
Remove clang-13 from CI builds[ci]
Add emscripten build to CI (thanks @zelosleone!)
Breaking changes:
flecs.meta.constant
has moved toflecs.core
(#466 (comment))- Entities without components are now stored in a table (#466 (comment))
- Specifying a component with
query_builder::with
now usesInOutDefault
(previouslyInOutNone
, #466 (comment)) flecs::entity::remove
has changed to enable removing enum components (#466 (comment))
New Contributors
- @justinian made their first contribution in #1514
- @bnjmnjrk made their first contribution in #1548
- @Reddy-dev made their first contribution in #1551
- @GsLogiMaker made their first contribution in #1568
- @zelosleone made their first contribution in #1579
- @KenthJohan made their first contribution in #1605
- @theaveasso made their first contribution in #1610
Full Changelog: v4.0.4...v4.0.5