Flecs v4.1.0
Release announcement
https://ajmmertens.medium.com/flecs-4-1-is-out-fab4f32e36f6
Release notes
This version includes the following bugfixes:
[core]Add missingFLECS_APItoecs_get_path_w_sep_buf[core]Fix issue with component toggling in multithreaded apps[core]Fix issue where not having a default ctor would mark copy/move ctor as invalid[core]Fix issue wherecomponent_record::keep_aliverefcount was incorrectly updated by observers (thanks @garrett-is-a-swann!)[core]Fix misaligned addresses in sanitized mode[queries]Fix issue with change detection after early outing from iterator[queries]Fix issue where query incorrectly flagged itself asMatchOnlySelf[observers]Don't assert on invalid observer creation[observers]Fix uninitialized value in multi-componentOnSetobserver when overriding[json]Fix crash when escaping null character in JSON serializer[script]Fix issue in script template instantiation where children vector was deleted while iterating[script]Fix script assert when adding component as tag without default ctor[script]Fix issue where token buffer was incorrectly used for interpolated strings[script]Fix assert when parsing incorrect syntax for interpolated strings[http]Fix buffer overflow inecs_http_server_requestfunction[rest]Fix serialization of pipeline statistics to JSON[os]Fix bug where a condition variable was not correctly freed on Windows (thanks @kagetu!)
This version includes the following improvements:
[cpp]Changeflecs::entity::parent()to useecs_get_parent[cpp]Addsize(),entities(),clear_entities(),column_size(),depth(),records(),id(),lock(),unlock(),has_flags()methods to C++ table API[cpp]Run system queries entirely in C++ to avoid function pointer overhead[cpp]Change return type ofget()toconst T&[cpp]Change return type ofget_mut()toT&[cpp]Add newtry_get()withconst T*return type[cpp]Add newtry_get_mut()withT*return type[cpp]Addentity_view::get_constant()for fetching constant from enum relationship[cpp]Addentity::child()method for spawning a child of an existing entity[cpp]Remove redundantsetfunctions[cpp]Implemententity::assign()method[c]Addecs_singleton_get_mut,ecs_singleton_ensure[core]Remove redundantecs_header_t::magicfield[core]Reduce large initial size of table edge diff builder vectors[core]Reduce page size of entity index[core]Shrink world after bootstrap whenFLECS_LOW_FOOTPRINTis defined[core]Allocate stack allocator page on first use, not when initializing the allocator[core]Bypassecs_allocator_twhen usingFLECS_USE_OS_ALLOC[core]Reclaim memory from stages when callingshrink()[core]Improve performnace ofecs_ref_get[core]Implement support for non-fragmenting components[core]Cleanup sparse set functions[core]Implement world exclusive access feature[core]Remove redundant entity count arguments from internal functions[core]Improve organization and documentation of core code[core]ImplementOrderedChildrenstorage[core]Remove redundant fields fromecs_iter_t[core]Make sureecs_vec_reclaimfrees memory whenFLECS_USE_OS_ALLOCis defined[core]Remove support for creating entity ids in multithreaded mode[core]Remove support forUnionrelationships (replaced byDontFragment, Exclusive)[core]Move core tags out of low id range[queries]Improve detection of trivial queries[queries]Don't use large static arrays in query struct[queries]Reduce size ofecs_query_op_ctx_t[queries]Default to uncached queries whenFLECS_LOW_FOOTPRINTis defined[queries]Speed up query evaluation with bloom filter[queries]Remove redundanttable_idfield from query cache element[queries]Reduce query cache footprint by removing dependency onecs_table_cache_t[queries]Add trivial query cache iterator[queries]Speed up change detection for trivial queries[queries]Remove now redundant query notification mechanism[queries]Use smaller query cache element for trivial queries[queries]Use array to store query cache elements instead of a linked list[queries]Cache column pointers on query cache elements[queries]Allow using trivial query cache for queries with not/optional operators[queries]Treat!(R, *)terms as cacheable[queries]Prevent rematching when creating/deleting targets of traversable relationships[queries]Change argument ofecs_iter_get_grouptoconst ecs_iter_t*(thanks @Indra-db!)[observers]Support single-term observers without query[systems]Improve performace of running systems by using more efficient iteration function[timer]ReplaceAddTickSourcesystem withWithpair[pipeline]Improve performance of running systems in pipeline[meta]Implement ordered enum/bitmask constants (thanks @Bonkt!)[script]Addflecs::entity::lookup()method to script[build]Add Android support to cmake build (thanks @jiannanya!)[docs]Fix C# filter example in observer manual[docs]Add clojure binding to quickstart guide (thanks @pfeodrippe!)[docs]Remove unmaintained Rust binding from README (thanks @Indra-db!)[docs]Add new jellycacke videos on observers and singletons[docs]Add link to ECS survivors to docs[docs]Update change tracking examples[docs]Add FEAST game to README[docs]Remove Hytale game to README[docs]Remove outdated references to instancing in query manual[docs]Improve monitor example in observer manual[docs]Fix incorrect location of lookup variable section in query manual[docs]Add ECS Survivors, Ascendant to README
Breaking changes:
- Change detection now has to be explicitly enabled on queries (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-13249013)
- It is no longer possible to pass
0to the size argument ofecs_field_w_size(https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-13249030) - It is no longer allowed to create entities in multithreaded systems (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-13393095)
get/get_mutnow return references instead of pointers (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-13438915)getno longer returns the enumeration constant when used with enum relationship (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-13438960)Unionrelationships are no longer supported (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-13578339)
New Contributors
- @sean-reed made their first contribution in https://github.com/SanderMertens/flecs/pull/1612
- @Bonkt made their first contribution in https://github.com/SanderMertens/flecs/pull/1619
- @jiannanya made their first contribution in https://github.com/SanderMertens/flecs/pull/1646
Full Changelog: https://github.com/SanderMertens/flecs/compare/v4.0.5...v4.1.0