Skip to content

1.1.9

Compare
Choose a tag to compare
@genaray genaray released this 29 Jan 19:51
· 236 commits to master since this release
b577c51

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 :)