Releases: SanderMertens/flecs
Flecs v4.0.0-beta
What is this?
This is the Flecs v4 beta release! 🎉
You can use this release to familiarize and play around with the new APIs and features before v4 comes out. The biggest difference between v3 and v4 is a new query engine that unifies filters, queries and rules in a single API.
What is a beta release?
Beta means that the v4 branch now has all the features that the final release will have! The next few weeks will be spent finding bugs, updating documentation, updating the Flecs demo's and on creating a migration guide.
What's new since v4.0.2-alpha
- A new sparse component storage
- Union relationships have been reimplemented for the v4 code base
- On prefab instantiation, components are now copied to the instance instead of inherited.
- New traits have been introduced to customize instantiation behavior
- The
iter
andrun
query iteration callbacks have been replaced with a singlerun
callback OVERRIDE
is renamed toAUTO_OVERRIDE
- Flecs script assemblies have been renamed to templates
- The existing query manual has been updated to v4
- A new Flecs Query Language manual has been added that describes query DSL syntax
- A new component traits manual has been added
- Lots of C functions have been documented with doxygen
- Bugfixes
This version does not work with the explorer because of a breaking change in the query DSL. To use the explorer with this release, use this URL: https://www.flecs.dev/explorer/v4?remote=true.
The release should be stable enough for experimentation.
What is missing?
- There are a handful of known bugs that still need to be fixed
- Performance testing hasn't finished yet
- Documentation has not been updated yet
When will v4 come out?
The updated goal is to release in June.
Where can I share feedback?
Post v4 feedback in this discussion post: #1181 or on the Flecs discord server, whichever you prefer!
⚠️ Do not use this release in an actual project! ⚠️
Flecs v4.0.2-alpha
What is this?
This is another early preview of the upcoming v4 release! 🎉
You can use this release to familiarize and play around with the new APIs and features before v4 comes out. The biggest difference between v3 and v4 is a new query engine that unifies filters, queries and rules in a single API.
What's new since v4.0.1-alpha
- A new Flecs Script parser with an improved syntax, new features and a new script manual!
- A few tweaks to the query DSL that reduce complexity and make it (slightly) less verbose
- Query fields are now indexed from zero! (so
it.field(0)
instead ofit.field(1)
) - Lots of improvements to API ergonomics & removal of tech debt
- Lots of bug fixes since the last alpha release
This version does not work with the explorer because of a breaking change in the query DSL. To use the explorer with the alpha, use this URL: https://www.flecs.dev/explorer/v4?remote=true.
The release should be stable enough for experimentation.
Flecs script example
// New: a cleaner syntax allows for more natural type descriptions
struct Position {
x = f32
y = f32
}
assembly CheckBox {
prop checked = bool: false
// New: conditional logic!
if $checked {
Image("checked.png") // New: improved anonymous entity notation
} else {
Image("unchecked.png")
}
}
// New: new syntax that improves ergonomics of working with assemblies
CheckBox my_checkbox(checked: true) {
Position: {x: 400, y: 300} // New: a more consistent way to specify components
// Streamlined syntax for creating child entities
Label my_lbl("Hello world") {
Position: {x: 100, y: 0}
}
}
Query DSL example
// Old
Item, Player($this:self|up(ContainedBy))
// New
Item, Player($this|self|up ContainedBy)
What is missing?
- A big usability update to prefabs is still underway
- There are a handful of known bugs that still need to be fixed
- Performance testing hasn't finished yet
- Documentation has not been updated yet
When will v4 come out?
The updated goal is to release around the end of May, with a beta release coming out in around two weeks.
Where can I share feedback?
Post v4 feedback in this discussion post: #1181 or on the Flecs discord server, whichever you prefer!
⚠️ Do not use this release in an actual project! ⚠️
Flecs v4.0.1-alpha
What is this?
This is an early preview of the upcoming v4 release! 🎉
You can use this release to familiarize and play around with the new APIs and features before v4 comes out. The biggest difference between v3 and v4 is a new query engine that unifies filters, queries and rules in a single API.
Overview
- All tests are passing on all platforms and compilers
- The query API is mostly stable
- Examples have been updated to the new APIs
- Many parts of the API have been simplified
- The release mostly works with the explorer and query editor
Code examples
// A system with query variables
world.system<Position>("SpaceshipsDockedToPlanet")
.with<SpaceShip>()
.with<DockedTo>("$obj")
.with<Planet>().src("$obj")
.each([](flecs::entity spaceship, Position& p) {
// ...
});
// By default queries are uncached. This is similar to a v3 filter/rule
world.query_builder<Position>()
.with(flecs::ChildOf, "$parent")
.each([](Position& p) {
// ...
});
// Adding .cached() enables caching, which is similar to a v3 query.
// Only the terms that are cacheable will be cached. This allows
// for queries that are partially cached, which is not possible in v3.
auto q = world.query_builder<Position>()
.with(flecs::ChildOf, "$parent")
.cached()
.build();
q.each([](Position& p) {
// ...
});
// Queries can be named. This associates the query with an entity
// with the same name. Queries that are associated with an entity
// are cached. This means that by default all system queries enable
// caching, just like in v3.
auto q = world.query_builder<Position>("Children")
.with(flecs::ChildOf, "$parent")
.build();
q.each([](Position& p) {
// ...
});
// Queries that are associated with an entity need to be explicitly
// destructed. This is the same behavior as `flecs::entity`.
// Queries that are not associated with an entity are cleaned up
// when they go out of scope. This is the same behavior as
// `flecs::world` (RAII).
q.destruct();
flecs::world world_a;
{
// World objects can now be copied. This just creates a handle to
// the existing world, it doesn't create/copy a new world.
flecs::world world_b = world_a;
}
void Move(ecs_iter_t *it) {
Position *p = ecs_field(it, Position, 0); // Field indices now start from 0!
Velocity *v = ecs_field(it, Velocity, 1);
for (int i = 0; i < it->count; i ++) {
p[i].x += v[i].x;
p[i].y += v[i].y;
}
}
The release should be stable enough for experimentation.
What is missing?
- The APIs are not yet finalized. Big changes are still underway, especially in the C API
- A few new features are still in development
- There are a handful of known bugs that still need to be fixed
- Performance testing hasn't finished yet
- Documentation has not been updated yet
When will v4 come out?
There is still a lot that needs to happen before the release. The goal is to release around the end of April, with a higher probability of it being later than earlier.
Where can I share feedback?
Post v4 feedback in this discussion post: #1181 or on the Flecs discord server, whichever you prefer!
⚠️ Do not use this release in an actual project! ⚠️
Flecs v3.2.11
Highlights
- Hytale is using Flecs as the backbone for their upcoming engine!
- More than half of the contributions in this release are from the community ❤️
- Work on Flecs 4.0 is well underway, with simpler query APIs and better performance! Follow progress here
Release notes
This version includes the following bugfixes:
- Fix issue with parsing newlines in query strings
- Fix issue with registration of nested types in module
- Fix issue in rule engine with lookup variables and equality operators
- Fix issue with rules that are partially trivial
- Fix issue where a member with a missing MetaType wasn't correctly handled (thanks @ZeroErrors!)
- Fix issue where query term with equality operator was incorrectly marked as trivial
- Fix potential out of bounds read in rule engine
- Fix JSON serialization error for labels with double quotes
- Fix issue with evaluating
R(_, _)
and_(_, T)
queries - Fix issues with not/optional operators and terms with any (
_
) source - Fix issue where rule compiler would not detect uninitialized lh of equality operator
- Fix issue where
ecs_ref_t
could point to invalid component after table recycling - Fix issue in code that dedups events for multi-component observers
- Fix issue where observer could access deleted id record during world cleanup
This version includes the following improvements:
[cpp]
Add missing overloads fordelete_with
andremove_all
(thanks @Charlie-83!)[cpp]
AddFLECS_CPP_NO_AUTO_REGISTRATION
flag to disable automatic component registration[cpp]
Addflecs::string::contains
[cpp]
Add support for associating a timer/tick source with a type (thanks @ZeroErrors!)[cpp]
Add missingconst
toentity_view
methods (thanks @waywardmonkeys!)[cpp]
Add missingflecs::doc::get/set_color()
functions (thanks @waywardmonkeys!)[cpp]
Mark explicit move ctors/operator= asnoexcept
(thanks @waywardmonkeys!)[cpp]
Remove redundant void arg of log function (thanks @waywardmonkeys!)[query-dsl]
Add support forR(A, B || C)
syntax to DSL[query]
Fill outecs_iter_t.system
when using filters, queries and rules (thanks @BeanCheeseBurrito!)[query]
Improve string conversion of queries with equality operators[rule]
Skip empty ids forR(_, *)
and*(_, T)
queries[json]
Implement serializer for user-friendly JSON format[json]
Add option for serializing query field metadata[rest]
Fix issue where cached REST request would always return code 200[rest]
Addtry
parameter that prevents throwing HTTP error when trying out queries[snapshot]
Reduce copies when duplicating tables with non-POD components for snapshots (thanks @ZeroErrors!)[strbuf]
Simplify implementation ofecs_strbuf_t
, improve performance[http]
Improve performance ofecs_http_server_request
[http]
Enable caching of HTTP requests made from C API[log]
Don't mix writing to stderr/stdout in logging output[log]
Make output file used by logging functions configurable[doc]
Fix copy-paste issues with type names (thanks @waywardmonkeys!)[doc]
Fix relationship example by specifying inout (thanks @garrett-is-a-swann!)[doc]
Update Doxygen to v1.10.0 (thanks @ZeroErrors!)[doc]
Enable graphviz dot files in Doxygen (thanks @ZeroErrors!)[doc]
Change defgroup documents to use autobrief (thanks @ZeroErrors!)[doc]
Fix typos (thanks @waywardmonkeys!)[doc]
Fix typos and spelling errors (thanks @ZeroErrors!)[doc]
Fixed documentation link in quickstart addons section (thanks @DJLink!)[doc]
Remove spurious asterisk (thanks @waywardmonkeys!)[doc]
Use @code/@encode (thanks @waywardmonkeys!)[doc]
Fix grouping errors in C docs (thanks @waywardmonkeys!)[doc]
Link function names in doc comments (thanks @waywardmonkeys!)[doc]
Fixecs_doc_get_name
code samples (thanks @waywardmonkeys!)[doc]
Add tab widget for code snippets (thanks @ZeroErrors!)[doc]
Add Extermination Shock to readme[doc]
Add Hytale to readme[doc]
Improve doc addon docs (thanks @waywardmonkeys!)[doc]
Fix doxygen warnings (thanks @waywardmonkeys!)[doc]
Add missing doc.brief descriptions to flecs entities[doc]
Add C# example snippets to Quickstart, RestApi, System manuals (thanks @BeanCheeseBurrito!)[ci]
Update pages workflow actions (thanks @waywardmonkeys!)[ci]
Add macOS-14 Apple Silicon jobs (thanks @waywardmonkeys!)
Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/4681e8606aa9204b97f6316d3611e9f0d2572852
Known issues:
#844
#765
#714
#620
#478
#314
New Contributors
- @Charlie-83 made their first contribution in #1104
- @garrett-is-a-swann made their first contribution in #1107
- @DJLink made their first contribution in #1117
Full Changelog: v3.2.10...v3.2.11
Flecs v3.2.10
Highlights
- Significant performance improvements of the rule query engine:
- Up to 4x faster when compared with v3.2.9 for simple component queries
- Up to 6x faster when compared with filters for simple component queries
- Many other improvements, like automatic reordering of terms & simplified control flow
- Rules now support
up
traversal!
Release notes
This version includes the following bugfixes:
- Fix memory leak with batched
set
commands for new components - Fix issue in detection of whether a query has no data fields
- Fix missing argument in error trace in meta addon
- Fix issue that would occur when units module is not imported before monitor module
- Fix issue with invalidating observer reachable cache
- Fix issue where
on_set
hook was invoked without deferred mode & could be called twice - Fix issue where structural changes from
on_set
hook could get lost - Fix issue where anonymous rule variables would be stored before regular variables in variable array
- Fix issue where content type wasn't set on reply for cached HTTP request
- Fix segfault when enqueueing custom event
- Fix duplicate matches in rules with or (
||
) expressions - Fix issue where ids of terms without source weren't correctly set in rule iterator
- Fix duplicate matches in rules with
Any
wildcards - Fix issue with any terms with not (
!
) operators in rules - Fix crash in query DSL parser when using
Rel(X, Y, Z)
syntax - Fix assignment within conditional expression error
- Fix issue where cloning an entity with a name would throw an error
This version includes the following improvements:
[rules]
Implementup
traversal for rules[rules]
Simplify control flow instructions of rule engine[rules]
Add new rule instructions for trivial queries which batches evaluation of multiple terms[rules]
Implement automatic filtering of prefab/disabled entities[rules]
Implement rule instruction reordering to limit evaluation of instructions with only unknown variables[rules]
Improve performance of evaluating queries with exclusive wildcard pairs[rules]
Improve performance of setting data fields for trivial and mixed source queries[meta]
Add newid
primitive type for component ids/pairs[meta]
Use%f
in log statements for doubles instead of%d
[json]
Remove overzealous check on whetherit.ptrs
is NULL in iterator serializer[stats]
Remove redundant REST statistics[stats]
Remove less than useful table statistics[stats]
Remove less than useful id statistics[rest]
Reduce log spam from invalid queries from REST API in release mode[meson]
Make compiling hello world example optional (thanks @apache-hb!)[docs]
Fix broken link in REST manual[docs]
Fix C++ module example in manual[docs]
Fix typos in source & documentation (thanks @waywardmonkeys!)[docs]
Doc improvements and formatting (thanks @waywardmonkeys!)[docs]
Remove redundant comment terminators (thanks @waywardmonkeys!)[ci]
Update GitHub actions toactions/checkount@v4
(thanks @waywardmonkeys!)[ci]
Fix new gcc warnings
Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/ab33138f58c7a24cf05f662ac790d7cfbcfbe8e0
Known issues:
#844
#765
#714
#620
#478
#314
New Contributors
- @apache-hb made their first contribution in #1074
- @waywardmonkeys made their first contribution in #1089
Full Changelog: v3.2.9...v3.2.10
Flecs v3.2.9
Highlights
- Query DSL extension that makes it easier to traverse multiple edges of the same relationship:
ChildOf($pilot, $cockpit), ChildOf($cockpit, $plane)
can now be rewritten asChildOf($pilot, $cockpit, $plane)
- New rule feature that makes it possible to lookup entities by name relative to a query variable:
- Example:
Turret($this), Health($this.cannon)
- Example:
- A new API for emitting and observing simple events on entities (c, cpp)
- Example:
window.emit<Resized>({800, 600})
- Example:
- A new API for enqueueing events into the command queue for deferred handling (c, cpp)
- Example:
window.enqueue<Resized>({800, 600})
- Example:
- Performance improvements:
- Faster command batching in apps with lots of entities/commands enqueued from observers (~25x faster with 50k entities)
- Query iteration improvements due to removal of complexity in table storage (~7%-17%)
- Hierarchy creation/destruction improvements (~4%-7%)
Release notes
This version includes the following bugfixes:
- Fix assert when journaling
remove_all
/delete_with
functions - Fix world cleanup issue when using
app_run
- Fix assert when using a rule that assigns to an entity variable
- Fix issue where batched commands could invoke multi-component
OnSet
observer with uninitialized values - Fix issue with creating C++ systems/observers with names relative to root
- Fix issue with instantiating a prefab hierarchy with a recycled prefab id
- Fix issue with deserializing large
int64_t
values (TODO: correctly handle largeuint64_t
values) - Fix macro redefined warning when defining both
FLECS_DEBUG
andFLECS_SANITIZE
- Fix issue with evaluating filters with static sources that are no longer alive
- Fix issue in
cursor
API with deserializing into top-level array types - Add missing
flecs::Override
to C++ API (thanks @BeanCheeseBurrito!) - Fix issue with parsing comments in value scopes in flecs script
- Fix issue with setting pair components that have a recycled relationship id
This version includes the following improvements:
[cpp]
Default toInOutNone
when using.with()
in query builder API[cpp]
Enable optional pairs in the C++ query builder (thanks @Thinkofname!)[cpp]
Addarray
method toflecs::component
for registering components as array type[cpp]
Add default constructor toflecs::ref
[cpp]
Addflecs::ref::try_ref
method[query-dsl]
Add feature that expandsR(A, B, C)
intoR(A, B), R(B, C)
[queries]
Add ability to usecascade
in descending order[rules]
Add support for by name lookups relative to query variables ($var.child_name
)[rules]
Don't throw error when comparing variable to*
or_
wildcards[observers]
Add support for entity events[observers]
Add support for enqueueing custom events into command queue[json]
Serialize large integers as strings in JSON serializer[log]
Improve assert performance (thanks @jbarthelmes!)[log]
Enable colors for logging in emcc builds[metrics]
Add ability to track member metrics on pair components[docs]
Fix broken link to meta_c in quickstart[docs]
Fix typo in quickstart[docs]
Fix crash in C++ hooks example[docs]
Fix issue with instancing code example in query manual[docs]
AddSTACK_SIZE
parameter to list of emcc parameters in quickstart[docs]
Addgame_mechanics/factory
example[docs]
Add more content to FAQ[internals]
Removerecord_ptrs
member from table[internals]
Renameflecs::_::invoker*
toflecs::_::delegate*
[internals]
Rename command constants fromEcsOp*
toEcsCmd*
[internals]
Reduce complexity of command batching code[ci]
Fix warnings when compiling with-std=gnu2x
[ci]
Fix missing field initializer warning on g++
Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/466a28be07c4ecbc94fa8cccb9dc4a5ba4dabf96
Known issues:
#844
#765
#714
#620
#478
#314
Full Changelog: v3.2.8...v3.2.9
Flecs v3.2.8
Highlights
- A new
iterable::find
method that makes it easier to find entities using filters, rules and queries:
flecs::query<Position> q = ecs.query<Position>();
flecs::entity result = q.find([](Position& p) {
return p.x == 20;
});
- A new Flecs Godot example by @paulfigiel!
- Lots of improvements in the Flecs.NET C# binding by @BeanCheeseBurrito!
Release notes
This version includes the following bugfixes:
- Fix crash in
ecs_pipeline_init
when passing invalid parameter - Fix incorrect
INVALID_PARAMETER
assert inecs_entity_init
when providing empty separator - Fix incorrect return type of
flecs::iter::id
- Fix potential double free in C++ when using
each_term
- Fix issue with parsing bitmask expressions with spaces
- Fix issue with deleting & recycling the same id in command buffer
- Fix flecs script crash when trying to assign an entity that's not a component in
with
statement - Fix flecs script issue with assignment after scope statement
- Fix custom build issue when specifying
FLECS_MONITOR
andFLECS_REST
- Fix world cleanup issue where regular entities could get cleaned up after components
- Fix issue where observers/hooks were not executed in deferred mode if deferring was suspended
- Fix issue where event could be propagated along incorrect relationship edge
- Fix incorrect return type of
world::id
(thanks @Indra-db!) - Fix C++ issue that prevented using a release build of flecs with debug build app & vice versa
- Fix issue where passing
nullptr
as name toworld::use
didn't work correctly (thanks @Indra-db!) - Remove incorrect template parameter from
world::from_json
- Fix issue where passing
NULL
as doc string would not remove doc component - Fix crash in
ecs_iter_str
- Fix issue on VS2019 where enum constant registration did not work correctly
This version includes the following improvements:
[cpp]
Addtable::get
method for enum types (thanks @Indra-db!)[cpp]
Additerable::find
method[cpp]
Add parameter toworld::lookup
/entity::lookup
to disable/enable recursive searching[cpp]
Remove unnecessary return inentity::modified
(thanks @Indra-db!)[cpp]
Remove redundant component registration fromentity::ref
methods (thanks @Indra-db!)[cpp]
Addentity_builder::set_json
[cpp]
Add backworld::delta_time
method[meta]
Allow for creating reflection data in deferred, suspended deferred and readonly modes[script]
Add ability to self-reference assembly instance through$this
variable[metrics]
Add ability to create metrics for nested members[alerts]
Add summary counts toAlertsActive
component[cmake]
Add support for building & running tests with cmake (thanks @Naios!)[cmake]
Increase cmake version (thanks @Sororfortuna!)[doc]
Fix typos in examples/documentation (thanks @Rageking8!)[doc]
Documentation corrections (thanks @999pingGG!)[doc]
Improve comments offwd_declare_component
example[doc]
Add missing argument topair
function in relationship manual example[doc]
Show how to calltarget()
in relationship basics example[doc]
Fix incorrect documentation comments in C++ API
Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/f0c12a99219706c120fd49fe9862749f32f740b5
Known issues:
#1042
#844
#765
#714
#620
#478
#314
New Contributors
- @Rageking8 made their first contribution in #1037
- @Indra-db made their first contribution in #1046
- @999pingGG made their first contribution in #1048
- @Sororfortuna made their first contribution in #1053
Full Changelog: v3.2.7...v3.2.8
Flecs v3.2.7
Highlights
- A new Flecs.NET C# binding by @BeanCheeseBurrito with a similar design as the C++ API!
- Deferred
set
operations are now almost twice as fast in the C++ API 💨 - New functions in the experimental JavaScript API for client-side replication of entities:
// Connect to flecs application
flecs.connect("http://localhost:27750")
// World that stores the joined result of two queries
let w = flecs.world()
.query("SpaceShip, (Dockedto, *)")
.query("Planet, Habitable")
.on_update(() => {
// Access replicated entities
for (let s in w.entities["fleet"]) {
const planet = w.entities[s.pairs.DockedTo];
// Is spaceship docked to a planet?
if (planet.tags.include("Planet") {
// Is planet habitable?
const habitable = planet.tags.include("Habitable") ? "habitable" : "inhabitable";
console.log("SpaceShip " + s.name + " is docked to a " + habitable + " planet!");
}
}
});
- The explorer can now show sync point statistics and which queries/systems an entity matches with:
Release notes
This version includes the following bugfixes:
- Fix issue where
ecs_table_get_column_size
was interpreting column as type index - Fix regression with using
get
with wildcard id - Replace invalid cast in Windows OS API with
TEXT()
- Fix crash in JSON serializer when trying to serialize variables for query iterators
- Fix issue with JSON type serializer and nested structs
- Fix issue where operations in
yield_existing
observers weren't always deferred - Fix issue where overriding exclusive relationships could cause an entity to have multiple instances
- Fix module registration issue across DLLs that could cause an
INVALID_COMPONENT_SIZE
assert
This version includes the following improvements:
[c]
Fix inconsistency in naming of get_ctx/set_ctx functions[c]
Addbinding_ctx
andctx_free
/binding_ctx_free
to world[c]
Addctx
/binding_ctx
to query objects[c]
AddPrivate
trait to more internal components[c++]
Assert when attempting to create a nested pair id[c++]
Improve performance of deferred C++set
operations[c++]
Fix issue in filter builder API with pair singletons[timer]
Allow for timer randomization to reduce spikes in pipeline schedule[queries]
Add support for setting$this
variable on query iterators[meta]
Shorten enum constant names by removing name prefix/enum type name prefix[json]
Addecs_entity_to_json_desc_t::serialize_ids
option[json]
Addecs_iter_to_json_desc_t::serialize_term_labels
option[json]
Addecs_iter_to_json_desc_t::serialize_id_labels
option[json]
Removeserialize_meta_ids
option[json]
Add option to serializer to return all queries an entity matches with[json]
Supportserialize_id_labels
andserialize_variable_labels
in combination withserialize_table
[json]
Allow for toggling private components in combination withserialize_table
[stats]
Add statistics for sync points[doc]
Fix typo in OS API header[doc]
Fix example in query manual (thanks @jbarthelmes!)[doc]
Fix outdated documentation in query manual and manual[doc]
Fix typo in query manual (thanks @pfeodrippe!)[doc]
Fix documentation forecs_new_w_pair
in manual[doc]
Fix links in flecs script tutorial[doc]
Fix & improve documentation in main header (thanks @copygirl!)[doc]
Add new C# binding by @BeanCheeseBurrito to README[doc]
Add questions to FAQ on how to debug issues with the explorer[doc]
Remove redundantgroup_by
callback fromgroup_iter
example[ci]
Suppress new clang warning
Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/563b5476cf13afdeff70fe120ad9d4308da9350b
Breaking changes
- Fix inconsistencies in get/set ctx APIs (#466 (comment))
Known issues:
#844
#765
#714
#620
#478
#314
New Contributors
- @pfeodrippe made their first contribution in #1030
Full Changelog: v3.2.6...v.3.2.7
Flecs v3.2.6
Highlights
- Realtime strategy game Tempest Rising uses Flecs!
- 20% performance increase for
add
/remove
operations when entity already has the component - Experimental new web tool and JavaScript API for working with the Flecs REST API
- Improved support and CI testing for MinGW targets
Release notes
This version includes the following bugfixes:
- Fix issue with queries and recycled component ids
- Fix JSON serializer issue where
serialize_alerts
is enabled but module is not imported - Fix meta bug where member count was ignored if explicit offset was provided (thanks @ZeroErrors!)
- Fix C++ compiler errors when using
ecs_map_t
macro API - Fix assert when serializing entity alerts for alert without message template
- Fix recursive cleanup issue for entities with multiple relationships to parent entity
- Fix C++ component hook registration issue when child type was registered before parent
This version includes the following improvements:
[c]
Fix inconsistencies between column index and type index in table API[c]
Fix naming inconsistencies in table API[cpp]
Fix inconsistencies between column index and type index inflecs::table
API[cpp]
Fix naming inconsistencies inflecs::table
API[cpp]
Addcomponent::member
overload that takes pointer to member (thanks @ZeroErrors!)[cpp]
Addconst
toflecs::string::size
andflecs::string::length
(thanks @yuyoyuppe!)[cpp]
Addworld::scope(const char*)
method (thanks @sasichkamega!)[meta]
Add support for packed structs (thanks @ZeroErrors!)[meta]
Remove unused size/alignment fromEcsMetaType
(thanks @ZeroErrors!)[rest]
Reduce amount of default enabled parameters for REST query endpoint[internals]
Simplify table data structures[internals]
Improve organization and naming of source files[doc]
Add note to FAQ about why (recycled) entity ids can be large[doc]
Add Tempest Rising to README[doc]
Add note on empty entities to cleanup order[ci]
Add msys/mingw builds to CI[ci]
Fix orphaned tests
Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/e66a97d07528be158c1875b7193612904d203ef7
Breaking changes
- Table API changes (#466 (comment))
Known issues:
#844
#765
#714
#620
#478
#314
New Contributors
- @yuyoyuppe made their first contribution in #1019
- @sasichkamega made their first contribution in #1027
Full Changelog: v3.2.5...v3.2.6
Flecs v3.2.5
Highlights
- Manually ran pipelines can now run multithreaded systems!
- Lots of bugfixes and small improvements :)
- The entity inspector in the explorer can now show incoming relationship edges:
Release notes
This version includes the following bugfixes:
- Fix leaking field in AlertInstance component
- Fix leak in query cache with entity filter (union relationships/bitset components/flattened trees)
- Fix issue where
ecs_count
didn't include prefabs and disabled entities - Fix issue with using
OVERRIDE
flag in plecs scripts - Fix issue with reporting alert severity in JSON serializer
- Fix issue with importing
flecs.monitor
withoutflecs.meta
- Fix compilation issues in FreeBSD (thanks @SirLynix!)
- Fix issue where
removed
argument was not correctly passed byecs_commit
- Fix issue where
ecs_commit
wouldn't enter deferred mode while executing the operation - Fix issue where
ecs_iter_t::other_table
would get reset for observers after event propagation - Fix issue with calling
.get()
onflecs::table
/flecs::range
from stage - Fix issue where REST API would return malformed JSON on seralization error (thanks @ZeroErrors!)
- Fix issue where C++ component with the same name as a core entity would be incorrectly registered
- Fix incorrect
ifdef
that checked forMSVC
instead ofPOSIX
(thanks @MilanDierick!) - Fix issue with change detection for queries with static sources
- Fix issue with change detection and writing to shared terms
- Fix issue in rule engine where variable writes in OR chains weren't treated as conditional
- Fix issue where getting the target of a union relationship could return not alive entity handle
- Fix issue with systems that configure both
interval
andrate
- Fix memory corruption issues when using nested iterators (thanks @johnse-hypixel!)
- Fix incorrect assert when computed alignment mismatched actual alignment
- Fix issue where world passed to C++ rule iterator wasn't used
This version includes the following improvements:
[core]
Remove ability to get entity id array as field with index 0 (thanks @ZeroErrors!)[c]
Addecs_singleton_set_ptr
(thanks @darkuranium!)[cpp]
Addentity_builder::scope
method that returns world object scoped to entity[cpp]
Addflecs::iter::entities
method (thanks @ZeroErrors!)[cpp]
Addworld::run_pipeline<T>
overload (thanks @ZeroErrors!)[cpp]
Addworld::target
method (thanks @ZeroErrors!)[cpp]
Addworld::get_info
, remove redundant functions (thanks @ZeroErrors!)[pipeline]
Add support for multithreading toecs_run_pipeline
(thanks @ZeroErrors!)[meta]
Add support for member value ranges[json]
Serialize alerts from children in entity serializer[json]
Add option to serialize incoming relationship edges for entity[alerts]
Addretain_period
to alert configuration[alerts]
Make it possible for alerts to change severity based on a condition[alerts]
Add ability to generate alerts for member values that are out of range[alerts]
Reduce alert detection interval to 0.5 seconds[monitor]
AddWorldSummary
component[expr]
Implementparent()
,name()
anddoc_name()
functions in expression parser[http]
Fix unused parameter warning (thanks @MilanDierick!)[doc]
Fix quickstart example[doc]
Fix filenames in documentation comments (thanks @ZeroErrors!)[doc]
Reduce usage ofauto
in C++ examples[doc]
Remove redundant functions from C++ examples[doc]
Update C++ examples that used older/more verbose API methods[ci]
Use stricter warning settings to compile code warning free[ci]
Switch asan build to run on Linux, which includes leakage reporting[ci]
Build code on additional compiler versions[cmake]
AddFLECS_STRICT
flag that enablesWerror
and stricter warning settings
Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/8539a8634bc6cc99a61efd5919ffe8f02c6b3478
Breaking changes
- Passing 0 to
ecs_field
no longer returns the entity id array (#466 (comment)) - The
ecs_lookup_symbol
function has an additionalrecursive
argument (#466 (comment)) - The C API convention for naming component id variables has changed (#466 (comment))
- Redundant methods for obtaining world information have been removed (#466 (comment))
Known issues:
#965
#844
#765
#714
#620
#478
#314
New Contributors
- @SirLynix made their first contribution in #998
- @MilanDierick made their first contribution in #996
- @darkuranium made their first contribution in #1007
- @johnse-hypixel made their first contribution in #1012
Full Changelog: v3.2.4...v3.2.5