Skip to content

Releases: mlange-42/arche

Arche v0.12.0

29 Apr 19:24
ef139e3
Compare
Choose a tag to compare

Arche v0.12.0

Arche is an archetype-based Entity Component System for Go.

Arche's Features

Changelog

Features

Documentation

  • Adds a showcase chapter "Made with Arche" to the documentation page (#411)

Performance

  • Re-arrange struct fields to save memory in a few places (#413)

Bugfixes

  • Fix crash caused by extending layouts of an inactive archetype (#416, reported in #415)

First-time contributors

Arche v0.11.0

19 Feb 10:24
795294e
Compare
Choose a tag to compare

Arche v0.11.0

Arche is an archetype-based Entity Component System for Go.

Arche's Features

  • Simple core API. See the API docs.
  • Optional logic filter and type-safe generic API.
  • Entity relations as first-class feature. See the User Guide.
  • World serialization and deserialization with arche-serde.
  • No systems. Just queries. Use your own structure (or the Tools).
  • No dependencies. Except for unit tests (100% coverage).
  • Probably the fastest Go ECS out there. See the Benchmarks.

Changelog

Release Highlights

Arche now has a dedicated documentation site with a structured user guide and background information. We hope that this will lower the barrier to entrance significantly.

Further, Arche got a few new features:

  • Query.EntityAt was added for random access to query entities.
  • Generic filters now support Exclusive, like ID-based filters.
  • Build tag debug improves error messages in a few places where we rely on standard library panics for performance.

Breaking changes

  • Renames types in ecs.stats to follow Go standards.
    stats.WorldStats -> stats.World, stats.NodeStats -> stats.Node, ... (#388)

Features

  • Adds method Query.EntityAt(), useful for things like random sampling of entities (#358)
  • Adds build tag debug to improve error messages in a few places where we rely on standard library panics for performance (#377)
  • Adds method FilterX.Exclusive() to all generic filters (#381)

Documentation

  • Adds a dedicated Arche User Guide web site (#380, #382, #383, #384, #385)
  • Adds BENCHMARKS.md benchmarks for a tabular overview of the runtime cost of typical Arche ECS operations (#367, #372)
  • Link benchmarking code in README.md and benchmarking tables (#375)
  • Documents build tags tiny and debug in package docs of ecs (#377)
  • Adds examples to demonstrate the use of non-ECS data structures together with ECS (#379)

Bugfixes

  • Prevents using the same component multiple times in any operations, through panic (#357)

Performance

  • Generic filters use Mask instead of slower MaskFilter if no components are excluded (#381)

Other

  • Improves error messages for running out of world locks, components or resources, and on unbalanced unlock (#363)
  • Adds benchmarks for query creation (#366)
  • Upgrade to Go 1.22 in CI (#376)
  • Renames directory examples to _examples to accommodate changed test coverage behaviour of Go 1.22 (#376)
  • In unit tests, error messages of all panics are asserted (#377)

Arche v0.10.1

01 Feb 11:37
fa87f7f
Compare
Choose a tag to compare

Arche v0.10.1

Arche is an archetype-based Entity Component System for Go.

Arche's Features

  • Simple core API. See the API docs.
  • Optional logic filter and type-safe generic API.
  • Entity relations as first-class feature. See Architecture.
  • World serialization and deserialization with arche-serde.
  • No systems. Just queries. Use your own structure (or the Tools).
  • No dependencies. Except for unit tests (100% coverage).
  • Probably the fastest Go ECS out there. See the Benchmarks.

For more information, see the GitHub repository and API docs.

Changelog

Bugfixes

  • Fix IsRelation check to allow for non-struct components, like type aliases (#354)

Arche v0.10.0

21 Jan 20:08
784cff9
Compare
Choose a tag to compare

Arche v0.10.0

Arche is an archetype-based Entity Component System for Go.

Arche's Features

  • Simple core API. See the API docs.
  • Optional logic filter and type-safe generic API.
  • Entity relations as first-class feature. See Architecture.
  • World serialization and deserialization with arche-serde.
  • No systems. Just queries. Use your own structure (or the Tools).
  • No dependencies. Except for unit tests (100% coverage).
  • Probably the fastest Go ECS out there. See the Benchmarks.

For more information, see the GitHub repository and API docs.

Changelog

Release highlights

  • Arche supports full world serialization and deserialization, in conjunction with arche-serde (#319)
  • Supports 256 instead of 128 component types as well as resource types and engine locks (#313)
  • Generic API supports up to 12 instead of 8 component types (#324)
  • Reworked event system with granular subscription to different event types and components (#333, #334, #335, #337, #340)

Breaking changes

  • MaskTotalBits changed from 128 to 256 (#313)
  • Removes Mask.Lo and Mask.Hi, internal mask representation is now private (#313)
  • Filter.Matches(Mask) became Filter.Matches(*Mask); same for all Filter implementations (#313)
    This change was necessary to get the same performance as before, despite the more heavyweight implementation of the now 256 bits Mask.
  • Component and resource IDs are now opaque types instead of type aliases for uint8 (#330)
  • Restructures EntityEvent to remove redundant information and better handle relation changes (#333)
  • World event listener changed from a simple function to a Listener interface (#334)
  • Removes World.ComponentType(ID), use function ComponentInfo(ID) instead (#341)

Features

  • Adds functions ComponentInfo(*World, ID) and ResourceType(*World, ResID) (#315, #318)
  • Adds methods World.Ids(Entity) and Query.Ids() to get component IDs for an entity (#315, #325)
  • Entities support JSON marshalling and unmarshalling (#319)
  • The world's entity state can be extracted and re-established via World.DumpEntities() and World.LoadEntities() (#319, #326)
  • Adds functions ComponentIDs(*World) and ResourceIDs(*World) to get all registered IDs (#330)
  • Adds methods Mask.And, Mask.Or and Mask.Xor (#335)
  • Adds build tag tiny to restrict to 64 components for an extra bit of performance (#338)
  • Adds methods Relations.Exchange(), Relations.ExchangeBatch(), Relations.ExchangeBatchQ() for exchange with relation target (#342)
  • Generic API adds Exchange.WithRelation() and optional target argument for operations with relation target (#342)
  • Generic API adds MapX.AddBatch(), MapX.AddBatchQ(), MapX.RemoveBatch()and MapX.RemoveBatchQ() (#342)
  • Generic API adds optional relation target argument to most MapX methods (#342)
  • Generic API adds FilterX.Filter() to get an ecs.Filter from a generic one (#342)
  • Generic API adds Map.SetRelationBatch() and Map.SetRelationBatchQ() (#344)
  • All batch operations (except entity creation) return the number of affected entities (#348)

Performance

  • Reduces archetype memory footprint by using a dynamically sized slice for storage lookup (#327)
  • Reduces event listener overhead through granular subscriptions and elimination of a heap allocation (#333, #334, #335, #337, #340)

Documentation

  • Adds an overview to packages ecs and generic on how to achieve ECS manipulation operations (#345)

Other

  • Entity generation data type changed from uint16 to uint32 (#317)
  • Adds unitoftime/ecs to competition benchmarks (#311)
  • Adds competition benchmarks for accessing 10 components (#328)

Arche v0.9.0

07 Nov 10:43
c2f9129
Compare
Choose a tag to compare

Infrastructure

  • Upgraded to Go 1.21 toolchain (#308)

Arche v0.8.1

30 Oct 23:07
ce720fa
Compare
Choose a tag to compare

Documentation

  • Emphasize in Entity and World docs that entities are intended to be stored and passed by copy, not by pointer (#306)

Arche v0.8.0

29 May 18:45
8297467
Compare
Choose a tag to compare

Highlights

Entity relations were added as a first-class feature (#231, #271)

Relations are used to represent graphs of entities, e.g. hierarchies. They can be added, removed and queried just like normal components. The new feature offers ergonomic handling of entity relations, and provides relation queries with native performance.

Breaking changes

  • Removed World.Batch for entity batch creation, use Builder instead (#239)
  • Rework of generic entity creation API, use MapX.New, MapX.NewWith, MapX.NewBatch and MapX.NewQuery (#239, #252)
  • Stats object WorldStats etc. adapted for new structure of archetypes nested in nodes (#258)
  • Removed generic filter method FilterX.Filter (#271)
  • Method Batch.NewQuery renamed to Batch.NewBatchQ (#298)

Features

  • Relation archetypes are removed when they are empty and the target entity is dead (#238, #242)
  • Support an unlimited number of cached filters, instead of 128 (#245)
  • WorldStats contains the number of cached filters (#247)
  • Archetypes with entity relations are removed on World.Reset (#247)
  • Capacity increment can be configured separately for relation archetypes (#257)
  • Adds methods for faster, unchecked entity relation access (#259)
  • Re-introduce World.Batch for batch-processing of entities (add/remove/exchange) (#264)
  • New method Builder.Add for adding components with a target to entities (#264)
  • New method Batch.SetRelation for batch-setting entity relations (#265)
  • New methods Builder.AddQ, Builder.RemoveQ etc. to get a query over batch-processed entities (#297)
  • Sends an EntityEvent to the world listener on relation target changes (#265)

Performance

  • Reduce memory footprint of archetypes by moving properties to nodes (#237)
  • Queries iterate archetype graph nodes in an outer loop, potentially skipping nested relation archetypes (#248)
  • Relation archetypes are recycled in archetype graph nodes (#248)
  • Already empty archetypes are not zeroed on reset (#248)
  • Optimize RelationFilter: get archetype directly instead of iterating complete node (#251)
  • Cached filters use swap-remove when removing an archetype (#253)
  • Speed up generic query re-compilation after changing the relation target (#255)
  • Speed up archetype and node iteration to be as fast as before the new nested structure (#270, #288)
  • Filter cache stores archetype graph nodes instead of archetypes (#276) (#288)
  • Use uint32 instead of uintptr for indices and query iteration counter (#283)
  • Cached filters use a map for faster removal of archetypes (#289)
  • Speed up iterating through many archetypes by approx. 10% (#301)

Documentation

  • Adds an example for creating and querying entity relations (#256)
  • Adds a section on entity relations to the ARCHITECTURE.md document (#256)
  • Replace Aos benchmarks plot in README for pointer iteration fix #284 (#285)
  • Adds a plot for entity relation benchmarks to ARCHITECTURE.md (#290)
  • Adds an outline of the most important types and functions to each sub-package (#295)

Other

  • Remove go-gameengine-ecs from Arche benchmarks (but not from competition!) (#228)
  • Reduce memory size of Query and internal archetype list by 8 bytes (#230)
  • Generic filters are locked when registered for caching (#241)
  • Adds benchmarks for getting and setting entity relations (#259)
  • Arche now has an official logo (#273)
  • Use for loop with counter in AoS competition benchmarks, to allow for pointers (#284)

Arche v0.7.1

26 Apr 14:44
500fcfb
Compare
Choose a tag to compare

Documentation

  • Tweak/improve example batch_ops (#222)
  • Adds an example for running simulations in parallel (#223)

Other

  • Adds benchmarks for world component access with shuffled entities (#224)

Arche v0.7.0

15 Apr 16:30
1764274
Compare
Choose a tag to compare

✔️ Feature release. No breaking changes.

Features

  • Adds method World.ComponentType(ID) to get the reflect.Type for component IDs (#215)
  • Adds methods World.GetUnchecked and World.HasUnchecked as optimized variants for known static entities (#217, #219)
  • Adds method MapX.GetUnchecked to all generic mappers, as equivalent to previous point (#217, #219)
  • Adds methods Map.GetUnchecked and Map.HasUnchecked to generic Map, as equivalent to previous points (#217, #219)

Performance

  • Optimize World.Alive(Entity) by only checking the entity generation, but not id == 0 (#220)

Arche v0.6.3

13 Apr 12:01
a91dd1b
Compare
Choose a tag to compare

Documentation

  • Minor README and docstring tweaks (#211, #213)

Other