There is a newer version of the record available.

Published January 21, 2024 | Version v0.10.0

mlange-42/arche: Arche v0.10.0

Authors/Creators

  • 1. @Helmholtz-UFZ @finam-ufz

Contributors

Contact person:

Description

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)

Files

mlange-42/arche-v0.10.0.zip

Files (212.0 kB)

Name Size Download all
md5:1d018a714d957c6aa39d873b8a8c807c
212.0 kB Preview Download

Additional details

Related works

Is supplement to
Software: https://github.com/mlange-42/arche/tree/v0.10.0 (URL)