Published January 21, 2024
| Version v0.10.0
Software
Open
mlange-42/arche: Arche v0.10.0
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
MaskTotalBitschanged from 128 to 256 (#313)- Removes
Mask.LoandMask.Hi, internal mask representation is now private (#313) Filter.Matches(Mask)becameFilter.Matches(*Mask); same for allFilterimplementations (#313)
This change was necessary to get the same performance as before, despite the more heavyweight implementation of the now 256 bitsMask.- Component and resource IDs are now opaque types instead of type aliases for
uint8(#330) - Restructures
EntityEventto remove redundant information and better handle relation changes (#333) - World event listener changed from a simple function to a
Listenerinterface (#334) - Removes
World.ComponentType(ID), use functionComponentInfo(ID)instead (#341)
Features
- Adds functions
ComponentInfo(*World, ID)andResourceType(*World, ResID)(#315, #318) - Adds methods
World.Ids(Entity)andQuery.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()andWorld.LoadEntities()(#319, #326) - Adds functions
ComponentIDs(*World)andResourceIDs(*World)to get all registered IDs (#330) - Adds methods
Mask.And,Mask.OrandMask.Xor(#335) - Adds build tag
tinyto 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()andMapX.RemoveBatchQ()(#342) - Generic API adds optional relation target argument to most
MapXmethods (#342) - Generic API adds
FilterX.Filter()to get anecs.Filterfrom a generic one (#342) - Generic API adds
Map.SetRelationBatch()andMap.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
ecsandgenericon how to achieve ECS manipulation operations (#345)
Other
- Entity generation data type changed from
uint16touint32(#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)