New
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
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