| CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 564
Releases: SanderMertens/flecs
Flecs v4.1.4
dcbaf27Highlights
- Small release to fix a few bugs that got identified shortly after releasing 4.1.3
Release notes
This version includes the following bugfixes:
[core]Revert change for supporting types with destructive move semantics (caused crash)[core]Fix issues with ordered children trait and nested prefabs[core]Fix issues with ordered children trait and prefab slots[core]Fix assert when reclaiming component record (usingworld.shrink()) for large component id
This version includes the following improvements:
[core]Addecs_get_version()function (thanks @tabdroid-1!)[docs]Correct bazel test example in building flecs manual[docs]Fix documentation forECS_QUERY,ECS_QUERY_DEFINEandecs_querymacros
New Contributors
- @tabdroid-1 made their first contribution in #1891
Full Changelog: v4.1.3...v4.1.4
Assets 2
Flecs v4.1.3
8f63134Highlights
- Improved RAM utilization (create fewer component records, reclaim more data from component vectors, smaller entity administration)
- A new Building Flecs manual!
Release notes
This version includes the following bugfixes:
[core]Fix issue with reparenting named ordered children[core]Fix issue withecs_ref_getandecs_shrink[core]Fix issue where order or instantiated prefab children could be wrong[core]Fix assert forDontFragmentrelationship during world cleanup[core]Fix issue with how dtors get called for types that don't support non-destructive moves (thanks @Watermelon914!)[os_api]Add missingWIN32_LEAN_AND_MEANbefore new windows.h include[queries]Fix assert when usingset_varfor query with one cascad term[meta]Fix corruption with deserializing into enum with non-32 bits underlying type
This version includes the following improvements:
[cpp]Allowset_ptrto be used for pairs (thanks @Reddy-dev!)[cpp]Addowns_second()andauto_override_second()methods (thanks @Reddy-dev!)[core]Don't always create(T, *),(*, T)component records (only create when used)[core]Don't create component record when registering trait[core]Don't create component record forChildOf[core]Prevent creation of(*, 0)component record[core]Reclaim component vectors to actual count instead of power of 2[core]Reclaim memory from map data structures onworld.shrink()[core]Reclaim memory from empty component records duringworld.shrink()[core]Remove redundant component record lookup in observable code[core]Add convenience macro's for iterating component records and queries[core]Remve redundantecs_map_params_ttype and functions[core]Remove redundantif (table)check in table cache[core]Remove redundant check on cache initialized inecs_table_cache_get[core]Removeecs_record_t::crfield[core]Increase the maximum size of error strings[core]Prevent modifications to map while iterating[core]Don't callflecs_notify_on_addwhen creating entity in root table[core]Addecs_is_defer_suspended()function[observers]Remove redundant check inflecs_emit[queries]Add traversal tests for(ChildOf, _)[queries]Add performance tracing toecs_query_init[os_api]Useecs_os_free()instead offree()inflecs_dump_backtrace()[stats]Track memory of new locked components map[docs]Add Rescue Ops: Wildfire to README[docs]Renamecustom_runnerexamples torun_callback[docs]Remove outdated references to.singleton()API[docs]Add new "Building Flecs" manual (previously on quickstart)
Breaking changes:
- None
New Contributors
- @Watermelon914 made their first contribution in #1874
Full Changelog: v4.1.2...v4.1.3
Assets 2
Flecs v4.1.2
a53b471Highlights
- The C++ API now needs to be compiled as C++17!
- Lots of bugfixes for the new
DontFragmentstorage - New API and explorer dashboard for detailed memory statistics
- New endpoints and explorer pages for inspecting tables, components and queries
Release notes
This version includes the following bugfixes:
[cpp]Fix assert when usingecs_query_nextinsystem.runcallback[cpp]Fix issue with setting term flags withflecs::term::flags()method[cpp]Fix compiler error when usingset/assignwith non-copyable type[core]Fix issue whereecs_ref_tcould point to incorrectecs_record_tafter shrink[core]Fix issue withremove_all()and query rematching[core]Fix issue where enqueueing command inon_addhook didn't work when bulk creating[core]Fix memory leak for error message whenFLECS_SOFT_ASSERTis defined[core]Fix memory corruption when overriding components withon_sethooks[core]Fix issue whereon_sethook could be called multiple times for same component on override[core]Fix issue whereECS_ON_ADD,ECS_ON_SET,ECS_ON_REMOVEmacros could provide bad address when bulk creating[core]Fix issue whereget_alive()could return current generation of not-alive entity[core]Fix issue whereon_addhooks could get incorrectly invoked duringdelete_empty_tables()[core]Fix assert when empty table is cleared with hooks registered[core]Fix issue withflecs_sparse_ensureand recycled entity ids[core]Fix issue where table edges forDontFragmentrelationships weren't cleaned up[core]Fix issue with deleting parent withDontFragmentrelationship to child[core]Fix issue with cleaning upDontFragmentcomponents during bulk deletion[core]Fix issue where component record for not-alive id would be created in table graph code[core]Fix issue where sometimes the wrong entity was removed from aDontFragmentsparse set[core]Fix issue with instantiating component with(With, DontFragmentComponent)[core]Fix issue whereDontFragmentcomponent was removed before calling regular component observer[core]Fix issue withDontFragmenttags andclone()[os-api]Fix dbghelp casing for MinGW cross compilation (thanks @thomashodgkinson1987!)[queries]Fix issue where query flags weren't properly set for query with singleton terms[queries]Fix assert where depth calculation forcascadequery sees not alive entity[observers]Fix issue where single-term observers didn't set the field size[observers]Fix issue where observer would provide incorrect field sizes[json]Fix issue where a serialization error in an inherited component would return invalid JSON[json]Fix assert with serializing sparse tag to JSON withtype_info=true[json]Fix issue with skipping pretty printed objects in JSON parser[json]Fix issue with deserializing entity alias (thanks @degustaf!)[rest]Fix escaping for/tablesendpoint
This version includes the following improvements:
[cpp]Update to C++17[cpp]Addworld()method toflecs::untyped_ref[cpp]Use faster compile time alternative tostd::conditional(thanks @dementive!)[cpp]Add C++ API for singleton enum constants[core]Remove unused block allocators[core]Remove unuseddeser_stackallocator[core]Add error messages when adding traits after creating queries[core]Improve accuracy of frame pacing[core]Add compiler flags to build info type[core]Don't use private allocator in hashmap data structure[core]Add support for usingchildren()with sparse relationships[core]AddSingletontrait to module entities[os-api]Add Windows implementation forflecs_dump_backtrace()[queries]Make terms with Any wildcard cacheable[queries]Improve performance of toggle queries[observers]Removeecs_observer_desc_t::observablefield[meta]Parent anonymousas_types to opaque type to avoid anonymous types in root scope[meta]Implement lax member checks when deserializing[meta]Add support for character literals (thanks @degustaf!)[meta]Add filter callback to serializer that allows for blacklisting components[stats]Implement new API for getting detailed memory statistics[stats]Store pointer toecs_world_stats_tinEcsWorldStatsto improve memory utilization[stats]Fix isue with setting command count inWorldSummarycomponent[stats]Add more statistics toWorldSummarycomponent[rest]Add action endpoint with method to shrink memory[rest]Add/componentsREST endpoint[rest]Add/queriesREST endpoint[rest]Improve statistics of/tablesendpoint[docs]Fix issues with on_replace documentation[docs]Fix issues in doc examples (thanks @Indra-db!)[docs]Fix incorrectecs_merge()docs and improve error message when used incorrectly[docs]Remove outdated references to$singleton notation[docs]Add example that shows how to serializestd::optional(thanks @degustaf!)[docs]Add links to new Godot projects[ci]Update macOS 13 runners to 14
Breaking changes:
- The C++ API must now be compiled as C++17 (#466 (comment))
New Contributors
- @degustaf made their first contribution in #1791
- @dementive made their first contribution in #1788
- @thomashodgkinson1987 made their first contribution in #1813
- @Real-Septicake made their first contribution in #1834
Full Changelog: v4.1.1...v4.1.2
Assets 2
Flecs v4.1.1
50ce62aHighlights
- 2x faster trivial
set()calls (no hooks, observers or change detection) - 5x faster trivial
modified()calls (no hooks, observers or change detection) - 3x faster prefab instantiation due to new component overriding design
- Lots of reflection improvements for arrays, vectors and enums with custom underlying types
- Lots of explorer improvements (better autocomplete, drag-to-change values in inspector, pane resizing, script saving and more!)
- New script features that introduce more flexible ways to refer to entities:
// Create anonymous entity that is referred to later (previously impossible)
const alice: new {
Position: {10, 20}
}
bob {
// Alice variable can now be used without $ prefix
(Likes, alice)
}
for i in 0..10 {
"spaceship_{i}" { }
"shuttle_{i}" {
// Interpolated strings can now also be used in component/pair expressions
(DockedTo, "spaceship_{i}")
}
}Release notes
This version includes the following bugfixes:
[cpp]Don't move lvalue during component assignment (thanks @ColoredCarrot!)[cpp]Fix issue whereflecs::Scriptcomponent couldn't be used when definingFLECS_CPP_NO_AUTO_REGISTRATION[core]Fix issue where component hooks were not correctly called onworld.shrink()[core]Fix fatal assert withOrderedChildrentest in release mode[core]Fix issue where.get<Rel>(Wildcard)did not work for sparse components[core]Fix issue where children weren't correctly populated for instance of prefab withOrderedChildren[observers]Fix issue whereecs_field_is_setdidn't work for single term observers[queries]Fix issue where queries sometimes returned entities withNotQueryabletag[meta]Fix issues with deserializing inline arrays and vectors[meta]Fix issue in cursor API where it assumedint32_tfor underlying enum type[meta]Fix issues with serializing enums with custom underlying type[rest]Fix issue where REST API would not restore correct log function after endpoint[script]Fix crashes when using script annotations for invalid targets[script]Fix "can't serialize" errors when serializing script AST[script]Fix issue where value of script variable was incorrectly cached[script]Fix incorrect type check for component expressions used in initializer
This version includes the following improvements:
[cpp]Implement type traits in library to support older versions of gcc (thanks @AnonimiAngels!)[cpp]Implementworld::id_if_registeredmethod[cpp]Implementworld::type_info()[cpp]Remove redundantFLECS_METAcheck forto_constant()[cpp]Makeworld::to_json()methods const[cpp]Allow using APIs that accept enum constants in builds withFLECS_CPP_NO_ENUM_REFLECTION[core]Implementecs_table_has_traversable()function[core]Implementon_replacehook[core]Don't emitOnSetevents for operations when there are no hooks/observers[core]Improve performance ofset/ensure/emplace[core]Remove redundantcrfield from command struct[core]Improve error messages[core]Add checks that prevent making invalid modifications to core entities[core]Changetable_record_t.hdr.cachetype toecs_component_record_t[core]Improve performance of component overriding[core]Remove redundantNewcommand[core]Add new size argument toecs_emplace_idandecs_ensure_id[core]Implement newSingletontrait[core]Add moreecs_ref_ttests[core]Turn setting bothFLECS_DEBUG/NDEBUGerror into warning[core]Assert when passing alive ids to.entitiesmember ofecs_bulk_desc_t[meta]Split up push serializer operation into struct, array, vector[meta]Split up opaque type serializer operation into value, struct, array, vector[meta]Addunderlying_kindfield to serializer operation for serializing enums[meta]Addconstantsfield to serializer operation for serializing enums/bitmasks[meta]Change meaning ofecs_member_t::countso that it's interpreted as inline array when >= 0[meta]Split offconstantsmember fromEcsEnum/EcsBitmaskinto separateEcsConstantscomponent[meta]Split up meta addon code into smaller files[json]Don't serialize schema to JSON fornonefields[script]Add script tests for CRLF line endings[script]Don't reset script code for managed scripts after error[script]Store errors on managed script[script]Implement new expressions[script]Implement exported variables[script]Allow for using variable names without$prefix as components, relationships and targets[script]Allow for using interpolated string expressions as components[script]Inheritance statements now require a scope[rest]Allow managed scripts to be saved from the REST API/explorer[rest]Always store build info on world so it is available for the explorer[cmake]Bumpcmake_minimum_required_version(thanks @niceEli!)[docs]Fix issues in script examples[docs]Remove outdated section on pipelines from system manual[docs]Add Gloam vault to README[docs]Fix source documentation foris_alive()/is_valid()[docs]Fix query section in design with flecs manual[docs]Fix broken link in quickstart (thanks @ZaddikDev!)[docs]Add custom_serializer example[docs]Fix issues in queries and prefab manual (thanks @Chetco!)[docs]Fix outdated examples in change detection section of query manual[docs]Update incorrectis_enabledtoenabledin manuals (thanks @ericjeker!)[docs]Add hooks section to entities and components manual
Breaking changes:
ecs_emplace_idandecs_ensure_idnow accept an additional size argument: #466 (comment)- The singleton API has been changed to use a component trait: #466 (comment)
- Script evaluation APIs now have a result argument for capturing errors: #466 (comment)
- Inheritance statements in flecs script now require a scope: #466 (comment)
- The serializer data structures have been updated to allow for vector deserialization, enums with underlying types and more: #466 (comment) and #466 (comment)
New Contributors
- @AnonimiAngels made their first contribution in #1714
- @niceEli made their first contribution in #1731
- @ZaddikDev made their first contribution in #1734
- @ColoredCarrot made their first contribution in #1715
- @Chetco made their first contribution in #1754
- @ericjeker made their first contribution in #1768
Full Changelog: v4.1.0...v4.1.1
Assets 2
Flecs v4.1.0
9e06477Release 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 (#466 (comment))
- It is no longer possible to pass
0to the size argument ofecs_field_w_size(#466 (comment)) - It is no longer allowed to create entities in multithreaded systems (#466 (comment))
get/get_mutnow return references instead of pointers (#466 (comment))getno longer returns the enumeration constant when used with enum relationship (#466 (comment))Unionrelationships are no longer supported (#466 (comment))
New Contributors
- @sean-reed made their first contribution in #1612
- @Bonkt made their first contribution in #1619
- @jiannanya made their first contribution in #1646
Full Changelog: v4.0.5...v4.1.0
Assets 2
Flecs v4.0.5
3b0ca37Happy 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/ownson 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::Componentto 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_atwhen using.with<T>()whereTis sparse[cpp]Fix assert inecs_cpp_trim_modulewhen component name overlaps with module[cpp]Fix issue whereentity::removecould 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_APIannotations 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_ALLOCis 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_varon chained iterators[observers]Fix issue in observer event forwarding code where source was incorrectly set[observers]Fix issue when usingLOG_LEVEL_3in release mode[observers]Fix issue with observers that have a fixed entity source[observers]Fix issue with two observers withrunactions 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 forInOutNoneterms[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.cto 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_METAaddon[cpp]AddFLECS_CPP_NO_ENUM_REFLECTIONflag[cpp]Add path separator argument toflecs::entityconstructor[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 newInheritabletrait 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_allocatorfield from maps[core]Packecs_map_tfields 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::shrinkmethod that frees unused memory[core]Addalways_inlineannotation to performance critical functions[core]Expose internal APIs to work withecs_component_record_tandecs_table_record_t[queries]Reduce number of block allocators for cached queries[queries]Change default cache policy to cached when query hascascadeterm[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_tailmember from block allocator[os api]Add support for cosmo compiler (thanks @bnjmnjrk!)[docs]Add links to new jellycake youtube tutorials[docs]Remove outdatedemplacedocumentation 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 aboutFinaltrait 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.constanthas moved toflecs.core(#466 (comment))- Entities without components are now stored in a table (#466 (comment))
- Specifying a component with
query_builder::withnow usesInOutDefault(previouslyInOutNone, #466 (comment)) flecs::entity::removehas 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
Assets 2
Flecs v4.0.4
8a1e9abHappy new year! π₯ π
Highlights
- Component ids no longer need to match between worlds, which means Flecs worlds are now truly independent!
- Enums with custom underlying types are now properly supported by the core and meta addon
- The script and query implementations have been fuzzed, which lead to lots of gnarly bugs being found π
- A big flecs script refactor improved performance 50x (!) over 4.0.3, and 6x over 3.2.12
- Many, many new flecs script features which means much more complex scenes can now be built:

Procedural scene constructed from primitive shapes with flecs script
Release notes
This version includes the following bugfixes:
[cpp]Fix ubsan error infree_obj<T>(thanks @jspohr!)[cpp]Fix issue with registering hooks after component registration (thanks @jpeletier!)[cpp]Fix issue where callingset_group/set_varon const query objects was not possible[cpp]Fix crash when iterating components of entity with an empty type[cpp]Fix issue with nested observers and implicit namespaced component registration[cpp]Fix issue with reregistering component symbol after deletion[cpp]Fix issue where shared fields could not be accessed withfield/field_atineachcallback[cpp]Fix issue withenum_data::index_by_value[cpp]Fix crash in C++ addon logging[cpp]Fix issue in C++ API when iterating a large number of sparse components[core]Fix issue where batched commands for implicitly registered component could crash[core]Fix issue with registration of traits for builtin entities[core]Fix issue with usingecs_entity_desc_t::setwhile deferring is suspended[core]Fix illegal memory access inecs_add_path_w_sep[core]Fix write to invalid memory inflecs_path_append[core]Fix issue with name lookups that have multiple consecutive separator characters[core]Fix issue with attempting to lookup#id's with value larger thanUINT32_MAX[core]Fix leaks when usingFLECS_USE_OS_ALLOC[core]Fix issues where code was accessing world flags on stage object[core]Fix access to uninitializedecs_cmd_t::idfield[core]Fix leak when deferring a batched set for a large non-trivial component[core]Fix issue where second element of pair could not be a sparse component[core]Fix command batching issue where component is added in two stages[observers]Fix issue where observers could be triggered multiple times for the same event[observers]Fix issue where event was incorrectly propagated for masked component[observers]Fix issue where observer with multipleup()terms could get duplicate events[observers]Fix issue whereOnTableCreateobserver did not trigger in deferred mode[queries]Fix crash when sorted query withMatchEmptyTablesonly matches empty tables[queries]Fix issue where up traversal with inheritance could return duplicate results[queries]Fix issue whereIsAwas incorrectly traversed for non-inheritable components[queries]Fix issue with usingquery.find(flecs::entity, ...)andEcsQueryMatchEmptyTables[queries]Fix issue where queries would return inconsistent component id for*Fromoperator fields[queries]Fix assert that happens while reporting a query error[queries]Fix assert when query has unbalanced{}scopes[queries]Fix issue where query incorrectly treatedthisentity reference as variable[queries]Fix issue with queries that have mixed cached fields and shared fields[queries]Fix issue with queries created in stage, change detection and shared fields[meta]Fix memory leaks in cursor string conversions[json]Fix issue where override components would show up as inheritable in serialized JSON[script]Fix issue where script AST would incorrectly cache ids of entities created by template[script]Fix issue with parsing opaque primitive components[script]Fix issue with using pair components in templates[rest]Fix issue with reporting errors that contain formatting characters[misc]Fix file handle leak when file fails to load (thanks @peter15914!)
This version includes the following improvements:
[cpp]Prevent recycled entity ids when reparenting C++ module[cpp]Addto_json()method toflecs::query_base[cpp]Allow forX_TO_JSON_INITmacros to be used in C++[cpp]Fix warning for incorrect type instatic_castfor inout & operator kinds[cpp]Implement world local component ids[cpp]Enums with custom underlying types are now supported[core]Reduce overhead of monitors by not creating observers for optional terms[core]Add assert to prevent entity ids from overflowing the 32 bit range (thanks @Ukendio!)[core]Implement type info flags for detecting invalid component lifecycle (thanks @jpeletier!)[core]Reduce page size of non-entity sparse sets (Reduce memory footprint)[core]Use map instead of sparse set for type_info (Reduce memory footprint)[core]Remove unnecessary observer sparse set (Reduce memory footprint)[core]Reduce size of low id record array (reduces RAM)[core]Changeflecs.core.Disabledto(OnInstantiate, Override)(fromInherit)[core]Allow for infinitely nested observer calls[core]Add cycle detection in observer code to prevent stack overflows[core]Add error message when invalid path is passed toecs_add_path_w_sep[core]Remove propagation of empty state for tables[core]Changeecs_delete_empty_tablesAPI by changing its parameters to adescstruct[queries]Addecs_query_getto getecs_query_t*object from entity[queries]Add more validator tests for!(ChildOf, _)queries[systems]Add system disabling test[script]Flecs script expression refactor[script]Add support for function arguments to flecs script[script]Add math functions to flecs script in a newFLECS_SCRIPT_MATHaddon[script]Add ability to specify variables when running a script[script]Add support for multiple template instances per entity[script]Improve detection of invalid statements inwithscopes[script]Add ability to define world-scoped script variables (likePI)[script]Add support for string interpolation to expression parser[script]Add support for entity name expressions (like"e_$i" { })[script]Implement support forfor var in x..yloops[script]Add divide by zero checks so runtime doesn't crash but reports error[script]Add more builtin script functions for doc addon and testing for components[script]Implement random number generator for flecs script[script]Bulk-add components in entity scope to improve script performance[script]Add support forelse if[script]Add support formatchexpressions[script]Add support for using add assign and multiply assign in initializers[script]Empty scopes now create an anonymous entity[script]Allow referring to variables without$[script]Variables now need to useconst x: valuenotation when using implicit type[script]Props can now have implicit types[http]Allow HTTP server to be created without threading support (thanks @basicer!)[http]Allow for script code to be provided in body of/scriptrequest[http]Increase size of HTTP receive buffer, throw warning if request exceeds it[http]Add body parameter toecs_http_server_request[docs]Add system & query examples foreachandruncallback variants[docs]Add example that shows how to iterate multiple queries in a system[docs]Add Unreal-Flecs link to documentation page[docs]Fix issue with query_to_custom_json example[docs]Fixecs/worldtypo in system manual (thanks @iHR4K!)[docs]Add Resistance is Brutal to README[docs]Improvements to migration guide (thanks @999pingGG!)[docs]Add flecs tutorial links to documentation page[ci]Fix warnings in tests (thanks @jpeletier!)[ci]Silence clang warning about missingdefaultcase[ci]Fix CI bazel job to work with new bazel version
Breaking changes
- Flecs script API functions have been renamed: #466 (comment)
flecs::reset()no longer exists: #466 (comment)- Events for communicating empty table state no longer exist: #466 (comment)
- The signature of
ecs_http_server_requesthas changed: #466 (comment) - The
const var = valuescript syntax has been deprecated: #466 (comment) - Empty script scopes now create anonymous entities: #466 (comment)
- Not strictly a breaking change, but the order in which nested observers are evaluated has changed, which may break code that relied on observer ordering (which is undefined).
New Contributors
Assets 2
Flecs v4.0.3
b3ad03cHighlights
- None, just a lot of small improvements and bugfixes π
Release notes
This version includes the following bugfixes:
[cpp]Fix issue withmodified<R, T>where first type is a tag[cpp]Fix conflicting identifier between flecs and magic_enum library[cpp]Fix issue with reparenting module that is in root namespace[cpp]Disable incorrect msvc warning on enum reflection code[core]RemoveFLECS_APIin block_allocator.c which was causing linker errors (thanks @Indra-db!)[core]Fix crash if component and entity w/component are deleted in same cleanup operation[core]Fix linked list corruption in supporting data structure for Union relationships[core]Fix issue where union relationships weren't copied from prefab to prefab instance[core]Fix bug with component overriding for prefabs with union pairs[core]Avoid size integer overflow of command buffer vector during world cleanup (thanks @jpeletier!)[queries]Fix issue with queries that match empty tables and iterate individual entities[queries]Fix issue with evaluating queries withanywildcards that match multiple tables[queries]Fix issue where offset could be applied toNULLaddress[observers]Fix issue with yield_existing observers andnotterms[observers]Fix issue with getting field inOnSetobserver after removing override[observers]Fix issue where(OnInstantiate, Override)would not trigger OnSet observers[expr]Fix memory leak after failed multiline string assignment[json]Fix JSON serialization for auto_override/toggle components[json]Fix issue with serializing type info to JSON for sparse components[log]Fix issue whereecs_log_set_levelreturns wrong value[stats]Fix issue inflecs::statsmodule when globalMatchEmptyTablesflag is set[alerts]Fix brokenFLECS_NO_ALERTSmacro (thanks @pfeodrippe!)
This version includes the following improvements:
[cpp]Implementiter::targetsfor easy iteration of relationship targets for a field[cpp]Remove redundant call tostrcpyinecs_cpp_get_symbol_name[cpp]Enforce correct type when using*_secondoperations in entity, entity_view and entity_builder[queries]Return wildcard table records inecs_iter_t::trsforanywildcard terms[queries]Report errors for invalid usage ofcascadeanddescmodifiers[observers]Add yield_existing flags for customizing observer create/delete behavior[observers]Trigger events for optional observer terms[core]Addecs_world_get_flagsfunction[core]Escape separator characters in entity name when usingecs_get_path[core]Add option to escape characters for serialization in entity path[core]Implementecs_table_clear_entities(thanks @gsnook!)[meta]EmitOnSetafter modifyingEcsEnumcomponent (thanks @jpeletier!)[json]Fix issue with serializing queries that have large numbers of fields[json]Don't serialize baseDontInheritcomponents to JSON[rest]Include query plan used to populate cache in REST reply[http]Automatically test port range when creating HTTP server for multi-application support[doc]Add UUID to doc addon[docs]Add link to flecs raylib starter kit to documents[docs]Add Hyperion to README[docs]Add Age of Respair to README[docs]Fix incomplete sentence in query manual[docs]Fix find/replace errors in query manual[docs]Show how to use lookup functions in hierarchy examples[docs]Fix disabling typo in entity manual[docs]FixTermAtindexing in C# docs (thanks @deathbeam!)[docs]Rename Routine to System in C# docs (thanks @deathbeam)[docs]Fix comment typo in prefab example (thanks @Indra-db)[docs]Fix broken link in relationship manual[docs]Add note to prefab manual on how prefabs are only ignored for entities matched on$this[docs]Add missing , in migration guide[docs]Fix typo in scopes section of query manual[tests]Fix duplicate test case[build]Remove unnecessary version attribute from flecs bazel model definition (thanks @reutermj!)[ci]macOS CI improvements (thanks @waywardmonkeys!)
Breaking changes
ecs_get_path_w_sep_bufnow has an additionalescapeargument (#466 (comment))
New Contributors
- @deathbeam made their first contribution in #1395
Full Changelog: v4.0.2...v4.0.3
Assets 2
Flecs v4.0.2
bf9ec9fHighlights
- New blog: Building an ECS #3: Storage in pictures
- Runtime types now automatically generate hooks that cleanup resources (thanks @jpeletier!)
- New OS API hooks that enable integration with tracy-style profilers!
Release notes
This version includes the following bugfixes:
[cpp]Fix spurious entities that are created when renaming C++ module[cpp]Fix issue with non-$this fields in query iteration (thanks @Gaspard--!)[cpp]Fix issue with computing component name from multiple threads/worlds[cpp]Fix issue where C++ world object would sometimes not get freed (thanks @jpeletier!)[cpp]Fix issue with observers and up traversal[cpp]Fix clang 20 compiler error in enum reflection code[core]Fix issue with using sparse components andecs_new_w_table[core]Fix issue withecs_new_w_tableand overriding components[core]Fix issue with creating queries inside of hooks[core]Fix issue with testing tables for wildcard pair ids[core]Fix potential leak inecs_clonedue to double constructor call (thanks @jpeletier!)[core]Fix issues with simple observers/queries for sparse components[core]Fix issues with hooks for sparse components[core]Fix issue with batchedOnAdd+OnRemoveobservers[queries]Fix issue with matchingIsA -> IsA -> ChildOfup traversal[queries]Fix issue with matching prefab/disabled entities for queries that start with not term[systems]Fix issue with setting rate filter on system without tick source[systems]Fix issue with cleaning up iterator resources for systems that match nothing[json]Fix crash when serializing query plan for trivial query[json]Fix issue where conflictingalertsmember could serialize to invalid JSON[script]Fix issue where script visitor function wasn't restored after parsing template[stats]Fix issue where units module was not always imported by stats (thanks @domdom!)[stats]Fix crash when fetchingWorldSummaryby REST API before it's initialized[explorer]Fix issue with entity names that have contain/characters
This version includes the following improvements:
[cpp]Addflecs::ref::has[cpp]Add missing overload forquery_builder::with(const char*, id_t)[cpp]Addflecs::iter::other_table()[c]Removeconstfromecs_ref_get[core]Implement fine-grained feature tracking for add/remove operations[core]Add performance tracing hooks to OS API[core]Add perf trace when sleeping due to target_fps (thanks @waywardmonkeys!)[core]Add support forAUTO_OVERRIDEto prefab children[core]Implement deterministic ids for prefab children[core]Use__alignof__on clang[core]Allow for restoring ranges withecs_set_entity_range[core]Add compile time flag to disable statistics counters[core]Fix thread sanitizer warnings[core]Prevent callingecs_run_post_frameoutside of frame[core]Addecs_id_from_str[core]Allow for suspending readonly mode outside of multithreaded systems[queries]Remove redundant query instruction constants[queries]Allow(IsA, tgt|self)queries to be cached[queries]Don't automatically cache queries with only not/optional terms[observers]Addyield_existingsupport toOnRemoveobservers[meta]Support callingecs_meta_get_stringon opaque string types[meta]Make flaky alert tests not flaky (thanks @jpeletier!)[meta]Add aconst_stringopaque type (thanks @jpeletier!)[meta]Auto-generate lifecycle hooks for reflection-only types[stats]Add counter for tracking component monitor evaluations[units]Remove unused symbols from units addons[docs]Fix typos in documentation on how to run tests (thanks @jpeletier!)[docs]Add Meta copyright notice to LICENSE (has no impact on license which is still MIT!)[docs]Fix typos (thanks @waywardmonkeys!)[docs]Fixemit/eventtypo in observer manual (thanks @awest03!)[docs]Add missing access modifier section to query language manual[docs]Add link to storage in pictures to docs[docs]Fix broken links in design guide[build]Move flecs.c and flecs.h files todistrfolder[build]Migrate bazel build to bzlmod (thanks @reutermj!)[build]Add bazel build definitions for examples and add bazel build/test to CI[ci]Add spell check to CI (thanks @Georgiy-Tugai!)
Breaking changes
New Contributors
- @domdom made their first contribution in #1312
- @reutermj made their first contribution in #1301
- @Gaspard-- made their first contribution in #1327
- @awest03 made their first contribution in #1344
- @Georgiy-Tugai made their first contribution in #1353
Full Changelog: v4.0.1...v4.0.2
Assets 2
Flecs v4.0.1
02c8c26Highlights
Lots of performance improvements! π
- Queries for sparse components are up to 20x faster
get,get_mut,hasandownsare 1.5-3x faster- Cached queries are 5x faster to create, and match 1.5x faster with new tables
- Simple uncached queries are up to 2x faster than v4.0.0 (5x faster than v3.2.12)
Release notes
This version includes the following bugfixes:
[cpp]Fix crash when copying world object during shutdown (thanks @jpeletier!)[cpp]Callpopulate_selfrecursively for simple query results (thanks @Indra-db!)[core]Fix assert when toggling component from stage[core]Fix command batching issue that could prevent query rematching[core]Fix issues with commands for sparse components[core]Fix issue with cloning named entities[core]Fix assert when callingemplaceafterremovewhile deferred[queries]Fix issue with not operator, traversal and wildcards[queries]Fix issue with toggleable components and terms with#0source[queries]Fix issue withuptraversal and (re)matching empty tables[observers]Fix issue with updating observers to different callback kind[observers]Fix issue with observer for sparse component (thanks @Megafunk!)[systems]Fix issue with updating system to different callback kind[script]Fix issue where anonymous entities wouldn't clear after script update[script]Fix syntax error for scripts with only ausingstatement[script]Fix issue where unresolved component in template didn't throw an error[script]Fix issue with anonymous template instance creation[script]Fix issues with partial component assignments[script]Fix issues with assigning non-trivial components[json]Fix issues in new deserializer, serialize full paths by default[json]Fix issue with serializing entity to JSON from stage[json]Fix issues with serializing sparse components[json]Fix issue with serializing inherited components without reflection data[rest]Ensure REST HTTP server always has valid delta_time value[rest]Only enable time measurements when OS time API is initialized
This version includes the following improvements:
[cpp]Addflecs::ref<T>constructor that just takes an entity (thanks @RoyAwesome!)[cpp]Add support for iterating sparse component queries with run callback[core]Removeidandsizefields fromecs_column_t[core]Use one size/count member for all table columns[core]Addcomponent_mapto tables to improveget/get_mut/has/ownsperformance[core]Improve performance ofecs_table_get_*_indexfunctions[queries]Add dedicated iterator mode for queries that are fully cached[queries]Add dedicated iterator mode for queries that are fully trivial[queries]Don't evaluate first term of uncached queries twice[queries]Reduce branching in trivial iterator code[queries]Remove iterator mode that returned entities one by one[queries]Replaceecs_iter_t::columnswith table records array[queries]Removeecs_iter_t::ptrs[queries]Reduce number of observers created per query[queries]Reuse staticsources/idsarrays for cached results where possible[queries]Don't generate query plan for trivial queries[queries]Implement fast query validation for simple queries[meta]Add option to provide 0 offset without triggering automatic offset computation (thanks @Indra-db!)[script]Suppress variable shadowing warning for parser on msvc[json]Remove legacy (v3) deserializer[log]Fix incorrect log color comparison (thanks @kagetu!)[docs]Replaceno_readonlywithimmediatein system manual[docs]Fix link to migration guide[docs]Fix grammar in Rust query examples (thanks @waywardmonkeys!)[docs]Fix find/replace typos (thanks @waywardmonkeys!)[docs]Remove references toEcsIteratble(thanks @waywardmonkeys!)[misc]Create.gitattributesto preserve line endings on Windows (thanks @epreston!)[ci]Prevent running workflows concurrently for same branch
Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/bda57ec04f1cb9ebeacab8a17cf9a0c3353d267b
Breaking changes
- Query results with inherited components now must be explicitly handled in C API (#466 (comment))
- Sparse components must now be obtained with
ecs_field_at(#466 (comment)) - The
columns/ptrsmembers got removed from iterators (#466 (comment)) - Member target query results have changed (#466 (comment))
New Contributors
Full Changelog: v4.0.0...v4.0.1