Skip to content

Flecs v3.2.7

Compare
Choose a tag to compare
@SanderMertens SanderMertens released this 05 Sep 02:03
· 733 commits to master since this release
ae0bed2

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:
Screenshot 2023-09-04 at 6 46 50 PM

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] Add binding_ctx and ctx_free/binding_ctx_free to world
  • [c] Add ctx/binding_ctx to query objects
  • [c] Add Private 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] Add ecs_entity_to_json_desc_t::serialize_ids option
  • [json] Add ecs_iter_to_json_desc_t::serialize_term_labels option
  • [json] Add ecs_iter_to_json_desc_t::serialize_id_labels option
  • [json] Remove serialize_meta_ids option
  • [json] Add option to serializer to return all queries an entity matches with
  • [json] Support serialize_id_labels and serialize_variable_labels in combination with serialize_table
  • [json] Allow for toggling private components in combination with serialize_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 for ecs_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 redundant group_by callback from group_iter example
  • [ci] Suppress new clang warning

Benchmark results
https://github.com/SanderMertens/ecs_benchmark/tree/563b5476cf13afdeff70fe120ad9d4308da9350b

Breaking changes

Known issues:
#844
#765
#714
#620
#478
#314

New Contributors

Full Changelog: v3.2.6...v.3.2.7