Download Latest Version Flecs v4.0.5 source code.tar.gz (23.0 MB)
Email in envelope

Get an email when there's a new version of Flecs

Home / v4.0.1
Name Modified Size InfoDownloads / Week
Parent folder
Flecs v4.0.1 source code.tar.gz 2024-08-16 19.9 MB
Flecs v4.0.1 source code.zip 2024-08-16 20.7 MB
README.md 2024-08-16 5.2 kB
Totals: 3 Items   40.6 MB 0

Highlights

Lots of performance improvements! 🚀 - Queries for sparse components are up to 20x faster - get, get_mut, has and owns are 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] Call populate_self recursively 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 calling emplace after remove while deferred - [queries] Fix issue with not operator, traversal and wildcards - [queries] Fix issue with toggleable components and terms with #0 source - [queries] Fix issue with up traversal 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 a using statement - [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] Add flecs::ref<T> constructor that just takes an entity (thanks @RoyAwesome!) - [cpp] Add support for iterating sparse component queries with run callback - [core] Remove id and size fields from ecs_column_t - [core] Use one size/count member for all table columns - [core] Add component_map to tables to improve get/get_mut/has/owns performance - [core] Improve performance of ecs_table_get_*_index functions - [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] Replace ecs_iter_t::columns with table records array - [queries] Remove ecs_iter_t::ptrs - [queries] Reduce number of observers created per query - [queries] Reuse static sources/ids arrays 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] Replace no_readonly with immediate in 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 to EcsIteratble (thanks @waywardmonkeys!) - [misc] Create .gitattributes to 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 (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-10186639) - Sparse components must now be obtained with ecs_field_at (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-10231773) - The columns/ptrs members got removed from iterators (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-10231797) - Member target query results have changed (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-10231905)

New Contributors

Full Changelog: https://github.com/SanderMertens/flecs/compare/v4.0.0...v4.0.1

Source: README.md, updated 2024-08-16