Release Notes โ
Here, there be dragons more foxes. What did you expect?
BETA NOTICE
fennecs will remain in Beta until version 1.0.0, which is expected in Q4 2024. Breaking API changes as well as bugs are likely to occur without warning in these beta builds. You are nonetheless encouraged to try fennecs out, play around and experiment with the package freely; our resident foxes aim to keep it it as useful and stable as possible! Please report issues and feedback on the GitHub Issues board.
UPCOMING โ
Match.Object
becomes internal / deprecated, useLink.Any
instead.Stream
(a Stream View without any type parameters) will be added (so filtering without a component list feels less awkward)
csharp
var thanosStream = population.Stream<Alive>() with
{
Subset = [Component.PlainComponent<Unlucky>()],
Exclude = [Component.PlainComponent<Lucky>()],
};
csharp
var thanosStream = population.Stream() with
{
Subset = [Component.PlainComponent<Unlucky>()],
Exclude = [Component.PlainComponent<Lucky>()],
};
...
Release 0.5.7-beta โ
bugfix
- Stream Filters (Subset/Exclude) now affect theCount
property of the Stream.bugfix
-Stream<>.Despawn
respects current filters instead of despawning the entire underyling Query- reinstated the Thanos appetizer's functionality! OH SNAP!
Release 0.5.6-beta โ
Link.Any
is a Match Target that can be used to match any Link target in a Query. It's value-identical toMatch.Object
, but makes the code more readable and reads in line withEntity.Any
.- lots of documentation updates and fixes
Release 0.5.5-beta โ
/www/misc/Changelog.md
added ๐ฆIBatch
renamed toIBatchBegin
, since it is not the "Batch" itself, just the ability to create (begin) batches.IBatchBegin
now has all the overloads with AddConflict and RemoveConflict parameters formerly only available inQuery
, and thus are now available inStream<>
.
csharp
public interface IBatchBegin
{
public Batch Batch(Batch.AddConflict add, Batch.RemoveConflict remove);
public Batch Batch();
public Batch Batch(Batch.AddConflict add);
public Batch Batch(Batch.RemoveConflict remove);
}
- submission must still be done by calling
Batch.Submit()
, which is not on this Interface. World.GCBehaviour
is nowinit
only.
Upgrade Steps โ
- You no longer need to call
Stream<>.Query.Batch(...)
, just useStream<>.Batch(...)
to access the overloads withAddConflict
andRemoveConflict
parameters.
Breaking Changes โ
Entity.Ref<C>
no longer automatically adds the component to the Entity if it does not exist. The syntax was too muddled, and certain degenerate types, such asstring
, could not match any overloads and could no longer be used withRef<C>
.
New Features โ
Stream<>
can be cloned with Subset and Exclude filters:
csharp
var filtered = myStream with
{
Subset = [Component.PlainComponent<ComponentA>()],
Exclude = [Component.AnyAny<ComponentB>(), Component.SpecificEntity<ComponentC>(notYou)]
};
- a new
Component
helper class exists to express strictly typed Match expressions, for these and other filters
csharp
public readonly record struct Component
{
public static Component AnyAny<T>();
public static Component AnyRelation<T>();
public static Component AnyEntity<T>();
public static Component AnyObject<T>();
public static Component PlainComponent<T>();
public static Component SpecificEntity<T>(Entity target);
public static Component SpecificLink<T>(T target) where T : class;
}
Performance Improvements โ
- Several accidental allocation leaks plugged.
Other Changes โ
- Temporary Restriction: Cannot run Jobs on Queries with Wildcards. (an exception will be thrown)
default(Match)
isMatch.Plain
, notMatch.Any
(otherwise it would be annoying to write Queries/Streams and run Jobs on them)
Known Issues โ
- Entity-Entity Relations with an Entity that resides in the same Archetype (i.e. the relation is PART of the Archetype's signature) crashes when bulk Despawning entities.
- Entity-Entity Relations with an Entity itself are a special case of the above, that can additionally face crash problems when despawning the entity itself.
- Streams can no longer be warmed up (
Stream.Warmup()
) (like queries used to - this is an oversight). This results in one or several one-time 40 byte allocations to show up in BenchmarkDotNet output.
Release 0.5.4-beta โ
Stream<>
is a lightweight View that can be created for any Query, and is what wraps zip_view-like enumeration and iteration over the Query (especiallFor
,Job
, andRaw
)Stream<...>
isIEnumerable<ValueTuple<Entity, ...>>
, which is great for Unit Testing and simple, read-only enumeration of Queries.Stream<C1, C2, ...>
expose all the runner functions fromStream<C1, C2>
andStream<C1>
.Entity.Ref<C>
creates the component if it is not present on an entity.
Breaking Changes โ
Query
does no longer expose Runners; and no longer has intrinsic type parameters. Instead,Stream<>
is used to access the same functionality.Query
enumerates ONLY to Entities, and no longer has anIEnumerator
of component types.
Upgrade Steps โ
- instead of
World.Query<...>().Compile()
, you can use the shorthandWorld.Query<...>().Stream()
orWorld.Stream<...>()
to get aStream<>
instance to use.
Known Issues โ
- the old StreamFilters on
Queries
have not been correctly ported to theStream<>
API, and won't wok. Entity.Ref<C>
in these versions is impossible to invoke with certain type parameters.