Skip to content

Releases: genaray/Arch

1.2.8

13 Mar 20:29
9533619
Compare
Choose a tag to compare

Bug fixes & Changes 🛠

New Features 🎉

  • Allow getting and setting of recycled entity ids for persistence by @richdog in #193
  • New Dangerous methods for setting and getting recycled ids.
  • Integrated the updated and improved JobScheduler 1.1.2.
  • Added ScheduleParallelInlineChunkQuery for scheduling ChunkJobs more effectively and to determine dependencies.
  • Added World.IsAlive(EntityReference);.

New Contributors ❤

Full Changelog: 1.2.7...1.2.8

1.2.7

15 Oct 15:49
Compare
Choose a tag to compare

Bug fixes & Changes

  • Added Archetype-Edges for faster single Remove-Component operations.
  • Improved performance for Single Add and Remove operations.
  • Entity now implements IComparable<Entity>
  • Checking a default Entity or EntityReference for IsAlive now returns false.
  • Archetypes with zero entities are now skipped during iteration.
  • BitSets were vectorized for faster checks (especially when there many registered components)
  • Query API was slightly improved, no more in modifier for entity iteration -> faster
  • ComponentType is now slimmer and blittable (just pure data, no managed types in it anymore).

New Features

  • Native AOT support by ComponentRegistry and ArrayRegistry - can now be used to register components native aot-wise.
  • A variety of DangerousUtilities to access arch internals. Used especially by Arch.Extended.
  • Some new scripts to build Arch directly for Unity in the scripts folder.
  • Arch.LowLevel is now a dependency

Contributions

Thanks to @reeseschultz , @Hertzole, @DrSmugleaf for several contributions! <3

1.2.6

13 Aug 23:47
Compare
Choose a tag to compare

Bug fixes & Changes

  • Added Archetype-Edges for faster single Add-Component operations.
  • Increased performance for lookups and bulk operations due to better shift handling.
  • Worlds are now recycled correctly and more efficiently due to plain array usage.
  • CommandBuffer now invokes Events correctly.

New Features

  • Added Entity-Events.
  • Added dangerous utility methods for accessing some internals, this will be used in the serialization package.
  • Better Component-Registration and methods, now also work for most structs.

Contributions

Thanks to @DrSmugleaf, @nathanrw , @mikhail-dcl , @clibequilibrium for several contributions! <3

1.2.5

26 Apr 22:32
adb9e87
Compare
Choose a tag to compare

Bug fixes & Changes

  • CommandBuffer do now clear correctly
  • Added Debug.Asserts to several places to aid development
  • Fixed World.Range which did not set components
  • Fixed World.Add(entity,cmp) which did not set component either.
  • ComponentTypes inside ComponentRegistry are now offset by +1 to fix a hash related issue
  • MurMurHash3 used internally for Components
  • Query._any now works correctly for larger bitsets > 32.
  • Improved performance of TryGet and TryGetRef methods.

New Features

  • Implicit conversion operation for EntityReference to `Entity´.
  • World.AddOrGet<T> to ensure components on entities.
  • Some other small utility methods.

Contributions

Huge thanks to @DrSmugleaf and @nathanrw for bug fixes and contributions! :)

1.2.4.2-beta

16 Apr 13:47
0538b65
Compare
Choose a tag to compare
1.2.4.2-beta Pre-release
Pre-release

Bug fixes & Changes

  • Fixed an issue where structural changes sometimes allocated too many chunks resulting in wasted memory and potential crashes.
  • Fixed PURE_ECS compatibility
  • Fixed EntityReference.IsAlive() returning true in certain scenarios where the entity was clearly dead or not valid anymore.
  • Fixed a couple of warnings
  • Fixed some tests

Contributions

Thanks to @DrSmugleaf and @nathanrw for fixing several warnings and bugs! :)

1.2.4

15 Apr 14:29
Compare
Choose a tag to compare

Bug fixes & Changes

  • CommandBuffer operations were now fixed and do record Add and Sets correctly.
  • CommandBuffer resizes its internal arrays now correctly.
  • Non generic World.Add, World.AddRange, World.RemoveRange were fixed, they created wrong archetypes with doubled components in some cases.
  • Almost all API now uses spans, spanless alternatives can be found in Arch.Core.Extensions
  • Simplified HashCode generation in general.
  • Some slight performance improvements during entity move operations.
  • Removed in and ref modifiers for many operations because of performance reasons (most used structs are small enough to be copied and thus more efficient).

New Features

  • Added Debug-Assert which is triggered by undefined structural changes to notify the user about those.
  • Added non generic World.Remove.
  • Added EntityInfoStore which acts as an storage for Entity meta data and offers an unified API to access those data.

Contributions

Thanks to @DrSmugleaf for the PRs and fixing the compatibility with #define pure_ecs and nullable issues :)
Thanks to @Donaut for the EntityInfoDictionary and its integration! :)

1.2.3

19 Mar 19:04
f69c231
Compare
Choose a tag to compare

Bug fixes & Changes

  • Fixed a bug where frequent adding/removing components caused a messed up EntityInfo dictionary and a crash sooner or later.
  • Fixed a bug where adding components by a QueryDescription did not set its value correctly, this was now fixed as well.
  • Fixed BitSet.None, which now works correctly with large amounts of components.
  • Removed struct constraints on EntityExtension methods.
  • Entity.Set now uses default values
  • CommandBuffer methods now make use of default values.

New Features

  • World.Clear() was introduced and clears the whole world.
  • World.GetEntities(Span<Entity> ...); was introduced as an alternative to lists, soon all the available API will make use of spans.
  • ComponentRegistry features a method to register a ComponentType, therefore the user can register custom types.

ComponentRegistry.Add(ComponentType);

Arch tries to support so called managed structs. However, this is not always fully possible due to compatibility with a type-based API. And the existing C# Marshal methods are not always able to recognize managed structs and determine their size.

Therefore, a method has now been added to the ComponentRegister to allow the user to register components independently. He can specify the size himself and thus it is now also possible to add all managed structs.

public struct ManagedStruct{ public List<int> SomeInts{ get; set; } }

// Register
var componentType = new ComponentType(ComponentRegistry.Size, typeof(ManagedStruct), 8, false); // 8 = Size in bytes of the managed struct.
ComponentRegistry.Add(componentType);

// Use
var entity = world.Create(new ManagedStruct());

Contributions

Thanks to @DrSmugleaf for the PRs and fixing the compatibility with #define pure_ecs :)

1.2.0

05 Mar 13:38
Compare
Choose a tag to compare

Bug fixes

  • Fixed an issue where the QueryArchetypeEnumerator throws an exception that was caused due to inaccurate pooling
  • => 32 components on an entity will not throws exceptions anymore
  • entity.Add(cmp) now works exactly as world.Add(in entity, cmp) does

Changes

  • Reworked some internals
  • ComponentRegistry now features several methods to modify registered components for hot reloading
  • Several other small changes in documentation and API

Contributors

Thanks to @stgeorge and @clibequilibrium for discovering bugs and other small missing features :)

1.1.9

29 Jan 19:51
b577c51
Compare
Choose a tag to compare

New Features

  • Fixed a structural changes related memory leak occurred by calling .Add or .Remove.
  • High-performance bulk operations for Destroy,Set,Add and Remove operations by targeting a range of entities using QueryDescription.
  • Some other small performance tweaks.

Bulk Operations

Until now, destroying entities or changing their component structure has always been a costly endeavor.
This is mainly due to the Archetype and Chunk architecture itself.

Bulk operations are now changing that. By means of these you can address all entities of a certain structure, which is significantly faster.

var query = new QueryDescription().WithAll<Player>();
world.Set(in query, new Position(), new Transform()); // Sets components for all entities fitting the query.
world.Add(in query, new KillTag(), new DropItems(),..); // Every single entity fitting the queryDescription will receive those components
world.Remove<Velocity, Defence>(in query);
world.Destroy(in query); 

Contributions

Many thanks to @Pheubel and @stgeorge for contributions and issues :)

1.1.5

18 Jan 17:05
dc8df01
Compare
Choose a tag to compare

Changes

  • References<...> and EntityReferences<...> are now called Components<...> and EntityComponents<....>
  • Archetypes, chunk and the world do not automatically release resources anymore. That was slow as heck.
  • Entity version now works correctly.

New Features

  • World.TrimExcess() can now be called regularly to release unused memory and resources.
  • World.Reference(in entity) or entity.Reference() return a EntityReference used to reference entities.
  • World.Destroy is now slightly faster

Entity references

using var world = World.Create();

var entity = world.Create(_entityGroup);
var reference = world.Reference(entity);  // This should be stored in your component ( entity.Reference() is also available. )

// Checks if the entity is the same as before by comparing the version and its id
if(reference.IsAlive()) {
    var cmps = reference.Entity.Get(...);
}      

Bug fixes and contributors

Big thanks to @stgeorge , @Pheubel and @RoyAwesome for your bug discoverys and enhancements ! :)