Releases: junkdog/artemis-odb
artemis-odb-2.3.0
Change Log
Version: 2.3.0: 2019-11-09
-
BREAKING CHANGES
- Web backend upgraded to GWT
2.8.2
. - Serialization modules that depend on libGDX now require
1.9.10
. - Make sure you clean your build when using Fluid entities.
- Web backend upgraded to GWT
-
Fluid entities quality of life changes.
- New
EntitySubscription
facadeESubscription
, for convenientE
iteration. - Annotation driven aspects allow DI of
ESubscription
(requires registeredFluidEntityPlugin
) - Ability to exclude specific component methods from the fluid API.
@FluidMethod(exclude=true)
E
toString now reports entity id for easier debugging. ie:E{id=10}
.
- New
-
Gradle plugin now supports
classesDirs
, deprecatedclassesDir
. -
Improve flexibility of logic behind annotations dependency injection. (no user impact).
-
FIX: Avoiding an NPE in optimizer.EntitySystemType if meta.superClass is null.
-
FIX: ObjectWeb ASM updated to 7.0 to avoid choking on more modern bytecode.
-
FIX: Artemis-odb integration tests now run properly on JDK 9+.
-
FIX: Fluid gradle plugin logging (now reports what artifacts it scans).
artemis-odb-2.2.0
Changelog
Version: 2.2.0 - 2019-01-06
-
BREAKING CHANGES
- Web backend upgraded to GWT
2.8.0
(LibGDX is blocking2.8.2
). - Serialization modules that depend on libGDX now require
1.9.9
.
- Web backend upgraded to GWT
-
Global option to delay component removal until all subscriptions have been notified.
new WorldConfigurationBuilder().alwaysDelayComponentRemoval(true)
-
Annotation driven aspects (
@All
,@Exclude
,@One
).- Annotate BaseEntitySystem subclass, alternative to constructor argument.
- Adds DI of
Archetype
,Aspect
,Aspect.Builder
andEntitySubscription
fields.
-
Fluid entities quality of life changes.
- To enable fluid entities in your world, best practice register
FluidEntityPlugin
instead ofSuperMapper
. FluidEntityPlugin
generated as part of the fluid generation process.- Added
FluidIteratingSystem
. - Generate class C containing all fluid component class literals. (not usable in annotations, sorry).
- Convenience methods to find entities:
- by group
for ( E e : E.withGroup("enemy") ) { .. }
- by tag
E player = E.withTag("player");
- by aspect
for ( E e : E.withAspect(Aspect.all(Pickup.class, Pos.class)) ) { .. }
- by component
for ( E e : E.withComponent(Pickup.class) ) { .. }
- by group
- Allow plugins for fluid interface generation.
- Override type handling via FieldProxyStrategy. (Want extra methods for LibGDX's
Pos2
? Now you can!)
- Override type handling via FieldProxyStrategy. (Want extra methods for LibGDX's
- To enable fluid entities in your world, best practice register
-
Support for abstract plugins with multiple possible implementations.
For example, a logging plugin might have multiple implementations (TinyLog, SLF4J+??, LibGDX).
As a plugin developer, we want to be able to refer to the generic facade (LoggingPlugin) and
throw a warning when no specific implementation has been registered. -
Fix: Better document side effects of ComponentMapper and EntitySubscription.
-
Fix: Unchecked warning in
SuperMapper
. -
Fix: ArtemisMultiException was missing no-args ctor (req by serializaion)
-
World
instances can now inject themselves (World::inject
)
artemis-odb-2.1.0
Changelog
Version: 2.1.0 - 2016-12-09
- Opt-in Fluid Entities API, convenient way to assemble and interact with
your entities, making code less verbose, improving readability. - Entity templates using Prefabs.
- Wasteful memory allocation during deserialization under control.
- Added
EntitySubscription::removeSubscriptionListener
. - Fix: IOException when serializing to json and prettyPrint is
false
artemis-odb-2.0.0
New in 2.0.0
Six release candidates and 4 months later, 2.0.0 emerges from the rabbit hole. A lot has been internally reworked - without inflicting too much change to the old API; most breaking changes are limited to functionality on the periphery of the framework - supposedly with minimal impact (SystemInvocationStrategy) on existing code.
EntityLinkManager
An optional system for automatically tracking relationships between entities. Components with fields referencing other entities are automatically registered and tracked; per-field listeners can supplement the system with additional logic.
Generally useful for editors/tooling - where unexpected entity and composition changes can occur. This system provides a way to ensure a consistent state without too much hooman/computer overhead.
// must be explicitly registered with the world
EntityLinkManager elm = world.getSystem(EntityLinkManager.class);
elm.register(InheritScale.class, new LinkAdapter() {
// LinkListeners are subject to dependency injection upon registration
private ComponentMapper<InheritScale> mapper;
@Override
public void onTargetDead(int sourceId, int deadTargetId) {
// target is dead - remove component
mapper.remove(sourceId);
}
});
... where InheritScale
:
@PooledWeaver
public class InheritScale extends Component {
@EntityId public int target = -1;
}
Other Uses/Examples
- Delete component when referenced entity dies
- Change state of old/new entity when referenced entity changes
- Perform clean-up on child entities when link with parent entity expires
New annotations: @DelayedComponentRemoval and @AspectDescriptor
@DelayedComponentRemoval extends the lifecycle of component types, ensuring removed instances are retrievable until all SubscriptionListener#removed(IntBag)
have been notified - regardless of removal method.
world.getAspectSubscriptionManager()
.get(Aspect.all(ProlongedLife.class))
.addSubscriptionListener(new SubscriptionListener() {
@Override
public void inserted(IntBag entities) {}
@Override
public void removed(IntBag entities) {
for (int i = 0, s = entities.size(); s > i; i++) {
// without @DelayedComponentRemoval on ProlongedLife,
// this may be null
ProlongedLife pf = prolongedLifeMapper.get(entities.get(i));
}
}
});
Decorate aspect-related fields with @AspectDescriptor to have them automatically injected as part of the normal injection mechanism. It's a bit situational, but can assist in keeping multi-subscription systems and such a bit cleaner.
@AspectDescriptor(
all = {Scale.class, Tint.class},
exclude = Velocity.class)
private EntityTransmuter transmuter;
@AspectDescriptor
works with:
Archetype
Aspect
Aspect.Builder
EntitySubscription
EntityTransmuter
Kryo serializer and shared artemis-odb-serializer
We now have a kryo serializer thanks to piotr-j. Output size is roughly 2/3 that of json, but custom component serializers can bring the size down further.
artemis-odb-serializer
is the new base package from which all serializer implementations inherit. It should now be bit easier to write custom serializers. However, I don't think it's a requested feature, so the API may need an iteration or two more before it's feasible - if desired, create an issue.
Internal changes
All java.util.BitSet
usage replaced by BitVector
- it performs better than BitSet when decoding bits-to-IntBag, especially when dealing with high population counts. This mainly affects the performance of entity subscriptions when propagating changes to systems and listeners.
That said, reliance on bitsets have decreased as all composition changes work directly against the composition id (a compositionId
is mapped to each unique component composition/bitset). In 1.4.0 and earlier, EntityEdit
resulted in a somewhat costly bitset-to-compositionId translation - this is no longer the case. As such, expect to see somewhat higher compositionId
numbers and faster performance.
Change Log
Breakage vs 1.4.0
There should not be anything major affecting existing side. Custom implementations of
SystemInvocationStrategy
need to be updated however.
- All usage of BitSet replaced by BitVector.
- Removed previously deprecated code, see: 5de377d.
- InvocationStrategy` - affectes custom implementations:
- bag-of-systems now stored as a field, instead of being passed as a parameter
toInvocationStrategy::process
InvocationStrategy::updateEntityStates
must be called before processing the first system.
Previously, the initial update was done by the world instance.
- bag-of-systems now stored as a field, instead of being passed as a parameter
- World's systems array is now typed with
BaseSystem
; this should only have
implication for custom implementations ofSystemInvocationStrategy
. - EntityFactory annotation processor and related classes have been removed,
for more background, see #428. - Components require a public no-args constructor. While this was allowed in past versions,
it never worked with serialization or pooled components. - Methods added to interface
Injector#getRegistered(Class|String)
- Calling
BaseSystem#process
will now run the system, even ifsetEnabled(false)
has been called.SystemInvocationStrategy
now tracks which systems are enabled/disabled. - Bag#getData throws ClassCastException when container wasn't created with any of the
typed constructors. - Removed
PackedComponent
and@PackedWeaver
.
Change Log 2.0.0 vs 1.4.0
Version: 2.0.0-RC6 (promoted to 2.0.0) - 2016-08-09
- Fix:
IntBag::get(index)
, ArrayIndexOutOfBoundsException reported size of backing array, not logical size. - Fix: Possible IOOB exception when registering more than 64 systems.
- Fix: EntityLinkManager/LinkListener::onLinkKilled never fired for unestablished links.
Version: 2.0.0-RC5 - 2016-07-23
- BREAKING CHANGES
- All usage of BitSet replaced by BitVector.
- BitVector: custom bitset implementation, generally faster than
java.util.BitSet
.- Optimized decoding of bits to integers, making all entity
mutations more efficient. unsafeGet
,unsafeSet
,unsafeClear
require that the underlying
array can contain the bit index.BitVector::ensureCapacity(int bits)
explicitly grows the bit vector.
Typically used together with theunsafe-
methods.EntityManager::registerEntityStore(BitVector)
- when representing
entity id:s as bits, makesunsafe-
methods safe - as theEntityManager
grows the bit vector as necessary.
- Optimized decoding of bits to integers, making all entity
- Fix: Bag and IntBag equals method would return false for identical bags with different capacities.
Version: 2.0.0-RC4 - 2016-07-10
- BREAKING CHANGES
- Removed previously deprecated code, see: 5de377d.
- InvocationStrategy` - affectes custom implementations:
- bag-of-systems now stored as a field, instead of being passed as a parameter
toInvocationStrategy::process
InvocationStrategy::updateEntityStates
must be called before processing the first system.
Previously, the initial update was done by the world instance.
- bag-of-systems now stored as a field, instead of being passed as a parameter
ComponentManager::compositionIdentity(BitSet)
now public.@AspectDescriptor
now also valid on Archetypes.EntityLinkManager
fires events for initial entities when registering a LinkListener;
toggleable in constructor.
Version: 2.0.0-RC3 - 2016-06-21
- BREAKING CHANGES
- World's systems array is now typed with
BaseSystem
; this should only have
implication for custom implementations ofSystemInvocationStrategy
. - EntityFactory annotation processor and related classes have been removed,
for more background, see #428.
- World's systems array is now typed with
- AspectFieldResolver; additional default injection field resolver
@AspectDescriptor
on appropriate fields to inject- Valid targets:
Aspect
,Aspect.Builder
,EntityTransmuter
,EntitySubscription
- add
EntityTransmuter(World, Aspect.Builder)
constructor - Deserialization exception reports on missing component identifiers (usually from
manually edited json). - Fix: WorldConfigurationBuilder.Priority didn't compare properly.
- Fix: thread safefty; InjectionCache's fields no longer static.
Version: 2.0.0-RC2 - 2016-05-26
- BREAKING CHANGES
- Components require a public no-args constructor. While this was allowed in past versions,
it never worked with serialization or pooled components.
- Components require a public no-args constructor. While this was allowed in past versions,
World#compositionId(entityId)
added. Previously, one had to go
viaEntity#getCompositionId()
EntityManager#reset
- if the world is empty, resets entity id generation to0
- Optimized entity subscriptions: compositionId pre-calculated and bundled
byAspectSubscriptionManager
before informing listeners...
artemis-odb-2.0.0-RC6
Change Log
Version: 2.0.0-RC6 - 2016-08-09
- Fix:
IntBag::get(index)
, ArrayIndexOutOfBoundsException reported size of backing array, not logical size. - Fix: Possible IOOB exception when registering more than 64 systems.
- Fix: EntityLinkManager/LinkListener::onLinkKilled never fired for unestablished links.
Version: 2.0.0-RC5 - 2016-07-23
- BREAKING CHANGES
- All usage of BitSet replaced by BitVector.
- BitVector: custom bitset implementation, generally faster than
java.util.BitSet
.- Optimized decoding of bits to integers, making all entity
mutations more efficient. unsafeGet
,unsafeSet
,unsafeClear
require that the underlying
array can contain the bit index.BitVector::ensureCapacity(int bits)
explicitly grows the bit vector.
Typically used together with theunsafe-
methods.EntityManager::registerEntityStore(BitVector)
- when representing
entity id:s as bits, makesunsafe-
methods safe - as theEntityManager
grows the bit vector as necessary.
- Optimized decoding of bits to integers, making all entity
- Fix: Bag and IntBag equals method would return false for identical bags with different capacities.
Version: 2.0.0-RC4 - 2016-07-10
- BREAKING CHANGES
- Removed previously deprecated code, see: 5de377d.
- InvocationStrategy` - affectes custom implementations:
- bag-of-systems now stored as a field, instead of being passed as a parameter
toInvocationStrategy::process
InvocationStrategy::updateEntityStates
must be called before processing the first system.
Previously, the initial update was done by the world instance.
- bag-of-systems now stored as a field, instead of being passed as a parameter
ComponentManager::compositionIdentity(BitSet)
now public.@AspectDescriptor
now also valid on Archetypes.EntityLinkManager
fires events for initial entities when registering a LinkListener;
toggleable in constructor.
Version: 2.0.0-RC3 - 2016-06-21
- BREAKING CHANGES
- World's systems array is now typed with
BaseSystem
; this should only have
implication for custom implementations ofSystemInvocationStrategy
. - EntityFactory annotation processor and related classes have been removed,
for more background, see #428.
- World's systems array is now typed with
- AspectFieldResolver; additional default injection field resolver
@AspectDescriptor
on appropriate fields to inject- Valid targets:
Aspect
,Aspect.Builder
,EntityTransmuter
,EntitySubscription
- add
EntityTransmuter(World, Aspect.Builder)
constructor - Deserialization exception reports on missing component identifiers (usually from
manually edited json). - Fix: WorldConfigurationBuilder.Priority didn't compare properly.
- Fix: thread safefty; InjectionCache's fields no longer static.
Version: 2.0.0-RC2 - 2016-05-26
- BREAKING CHANGES
- Components require a public no-args constructor. While this was allowed in past versions,
it never worked with serialization or pooled components.
- Components require a public no-args constructor. While this was allowed in past versions,
World#compositionId(entityId)
added. Previously, one had to go
viaEntity#getCompositionId()
EntityManager#reset
- if the world is empty, resets entity id generation to0
- Optimized entity subscriptions: compositionId pre-calculated and bundled
byAspectSubscriptionManager
before informing listeners. - Fix: ComponentMapper was accidentally marked as final in RC1.
Version: 2.0.0-RC1 - 2016-05-09
- BREAKING CHANGES
- Methods added to interface
Injector#getRegistered(Class|String)
ComponentMapper#getSafe
deprecated,#get
is sufficient for all use-cases now.
due to mappers always growing their backing arrays to accomodate the highest entity id.- Calling
BaseSystem#process
will now run the system, even ifsetEnabled(false)
has been called.
SystemInvocationStrategy
now tracks which systems are enabled/disabled.
(you may want to update your customSystemInvocationStrategy
implementations). - Bag#getData throws ClassCastException when container wasn't created with any of the
typed constructors.
- Methods added to interface
- Optional manager: EntityLinkManager, discovery and maintenance of relationships between entities.
- Automatically tracks component fields:
@EntityId int
,Entity
,@EntityId IntBag
,Bag<Entity>
(shares behavior with serialization). LinkListener
for listening in on when links between entities are established, changed or disconnected.- Tune behavior with
@LinkPolicy
, applied on component fields referencing entities. - Optimized link accessors via maven/gradle plugin - reflection-based fallback during development.
- Automatically tracks component fields:
@DelayedComponentRemoval
guarantees that component is available inSubscriptionListener#removed(IntBag)
.World#getRegistered
, retrieves injectable objects programmatically.- Re-worked
EntityEdit
logic, less code and more performance. - ComponentType validates component when first encountered.
- Removed
PackedComponent
and@PackedWeaver
. - added
AspectSubscriptionManager#getSubscriptions
- added
Bag(Class<T>)
andBag(Class<T>, int capacity)
IntBag#get
throwsArrayIndexOutOfBoundsException
wheneverindex
is greater than the reported size,
regardless of the size of the underlying array.- All systems are first injected, after which all systems are initialized. Previously,
each system was injected/initialized at the same time. - Serialization
- new
artemis-odb-serializer
artifact, used by all serialization backends, - Kryo serialization backend: binary with kryo
(thanks to @piotr-j).
- new
artemis-odb-2.0.0-RC5
Change Log
Version: 2.0.0-RC5 - 2016-07-23
- BREAKING CHANGES
- All usage of BitSet replaced by BitVector.
- BitVector: custom bitset, generally faster than
java.util.BitSet
.- Optimized decoding of bits to integers, making all entity
mutations more efficient. unsafeGet
,unsafeSet
,unsafeClear
require that the underlying
array can contain the bit index.BitVector::ensureCapacity(int bits)
explicitly grows the bit vector.
Typically used together with theunsafe-
methods.EntityManager::registerEntityStore(BitVector)
- when representing
entity id:s as bits, makesunsafe-
methods safe - as theEntityManager
grows the bit vector as necessary.
- Optimized decoding of bits to integers, making all entity
- Fix: Bag and IntBag equals method would return false for identical bags with different capacities.
Version: 2.0.0-RC4 - 2016-07-10
- BREAKING CHANGES
- Removed previously deprecated code, see: 5de377d.
- InvocationStrategy` - affectes custom implementations:
- bag-of-systems now stored as a field, instead of being passed as a parameter
toInvocationStrategy::process
InvocationStrategy::updateEntityStates
must be called before processing the first system.
Previously, the initial update was done by the world instance.
- bag-of-systems now stored as a field, instead of being passed as a parameter
ComponentManager::compositionIdentity(BitSet)
now public.@AspectDescriptor
now also valid on Archetypes.EntityLinkManager
fires events for initial entities when registering a LinkListener;
toggleable in constructor.
Version: 2.0.0-RC3 - 2016-06-21
- BREAKING CHANGES
- World's systems array is now typed with
BaseSystem
; this should only have
implication for custom implementations ofSystemInvocationStrategy
. - EntityFactory annotation processor and related classes have been removed,
for more background, see #428.
- World's systems array is now typed with
- AspectFieldResolver; additional default injection field resolver
@AspectDescriptor
on appropriate fields to inject- Valid targets:
Aspect
,Aspect.Builder
,EntityTransmuter
,EntitySubscription
- add
EntityTransmuter(World, Aspect.Builder)
constructor - Deserialization exception reports on missing component identifiers (usually from
manually edited json). - Fix: WorldConfigurationBuilder.Priority didn't compare properly.
- Fix: thread safefty; InjectionCache's fields no longer static.
Version: 2.0.0-RC2 - 2016-05-26
- BREAKING CHANGES
- Components require a public no-args constructor. While this was allowed in past versions,
it never worked with serialization or pooled components.
- Components require a public no-args constructor. While this was allowed in past versions,
World#compositionId(entityId)
added. Previously, one had to go
viaEntity#getCompositionId()
EntityManager#reset
- if the world is empty, resets entity id generation to0
- Optimized entity subscriptions: compositionId pre-calculated and bundled
byAspectSubscriptionManager
before informing listeners. - Fix: ComponentMapper was accidentally marked as final in RC1.
Version: 2.0.0-RC1 - 2016-05-09
- BREAKING CHANGES
- Methods added to interface
Injector#getRegistered(Class|String)
ComponentMapper#getSafe
deprecated,#get
is sufficient for all use-cases now.
due to mappers always growing their backing arrays to accomodate the highest entity id.- Calling
BaseSystem#process
will now run the system, even ifsetEnabled(false)
has been called.
SystemInvocationStrategy
now tracks which systems are enabled/disabled.
(you may want to update your customSystemInvocationStrategy
implementations). - Bag#getData throws ClassCastException when container wasn't created with any of the
typed constructors.
- Methods added to interface
- Optional manager: EntityLinkManager, discovery and maintenance of relationships between entities.
- Automatically tracks component fields:
@EntityId int
,Entity
,@EntityId IntBag
,Bag<Entity>
(shares behavior with serialization). LinkListener
for listening in on when links between entities are established, changed or disconnected.- Tune behavior with
@LinkPolicy
, applied on component fields referencing entities. - Optimized link accessors via maven/gradle plugin - reflection-based fallback during development.
- Automatically tracks component fields:
@DelayedComponentRemoval
guarantees that component is available inSubscriptionListener#removed(IntBag)
.World#getRegistered
, retrieves injectable objects programmatically.- Re-worked
EntityEdit
logic, less code and more performance. - ComponentType validates component when first encountered.
- Removed
PackedComponent
and@PackedWeaver
. - added
AspectSubscriptionManager#getSubscriptions
- added
Bag(Class<T>)
andBag(Class<T>, int capacity)
IntBag#get
throwsArrayIndexOutOfBoundsException
wheneverindex
is greater than the reported size,
regardless of the size of the underlying array.- All systems are first injected, after which all systems are initialized. Previously,
each system was injected/initialized at the same time. - Serialization
- new
artemis-odb-serializer
artifact, used by all serialization backends, - Kryo serialization backend: binary with kryo
(thanks to @piotr-j).
- new
artemis-odb-2.0.0-RC4
Change Log
Version: 2.0.0-RC4 - 2016-07-10
- BREAKING CHANGES
- Removed previously deprecated code, see: 5de377d.
- InvocationStrategy - affectes custom implementations:
- bag-of-systems now stored as a field, instead of being passed as a parameter
toInvocationStrategy::process
InvocationStrategy::updateEntityStates
must be called before processing the first system.
Previously, the initial update was done by the world instance.
- bag-of-systems now stored as a field, instead of being passed as a parameter
ComponentManager::compositionIdentity(BitSet)
now public.@AspectDescriptor
now also valid on Archetypes.EntityLinkManager
fires events for initial entities when registering a LinkListener;
toggleable in constructor.
Version: 2.0.0-RC3 - 2016-06-21
- BREAKING CHANGES
- World's systems array is now typed with
BaseSystem
; this should only have
implication for custom implementations ofSystemInvocationStrategy
. - EntityFactory annotation processor and related classes have been removed,
for more background, see #428.
- World's systems array is now typed with
- AspectFieldResolver; additional default injection field resolver.
@AspectDescriptor
on appropriate fields to inject.- Valid targets:
Aspect
,Aspect.Builder
,EntityTransmuter
,EntitySubscription
- add
EntityTransmuter(World, Aspect.Builder)
constructor - Deserialization exception reports on missing component identifiers (usually from
manually edited json). - Fix: WorldConfigurationBuilder.Priority didn't compare properly.
- Fix: thread safefty; InjectionCache's fields no longer static.
Version: 2.0.0-RC2 - 2016-05-26
- BREAKING CHANGES
- Components require a public no-args constructor. While this was allowed in past versions,
it never worked with serialization or pooled components.
- Components require a public no-args constructor. While this was allowed in past versions,
World#compositionId(entityId)
added. Previously, one had to go
viaEntity#getCompositionId()
EntityManager#reset
- if the world is empty, resets entity id generation to0
- Optimized entity subscriptions: compositionId pre-calculated and bundled
byAspectSubscriptionManager
before informing listeners. - Fix: ComponentMapper was accidentally marked as final in RC1.
Version: 2.0.0-RC1 - 2016-05-09
- BREAKING CHANGES
- Methods added to interface
Injector#getRegistered(Class|String)
ComponentMapper#getSafe
deprecated,#get
is sufficient for all use-cases now.
due to mappers always growing their backing arrays to accomodate the highest entity id.- Calling
BaseSystem#process
will now run the system, even ifsetEnabled(false)
has been called.
SystemInvocationStrategy
now tracks which systems are enabled/disabled.
(you may want to update your customSystemInvocationStrategy
implementations). - Bag#getData throws ClassCastException when container wasn't created with any of the
typed constructors.
- Methods added to interface
- Optional manager: EntityLinkManager, discovery and maintenance of relationships between entities.
- Automatically tracks component fields:
@EntityId int
,Entity
,@EntityId IntBag
,Bag<Entity>
(shares behavior with serialization). LinkListener
for listening in on when links between entities are established, changed or disconnected.- Tune behavior with
@LinkPolicy
, applied on component fields referencing entities. - Optimized link accessors via maven/gradle plugin - reflection-based fallback during development.
- Automatically tracks component fields:
@DelayedComponentRemoval
guarantees that component is available inSubscriptionListener#removed(IntBag)
.World#getRegistered
, retrieves injectable objects programmatically.- Re-worked
EntityEdit
logic, less code and more performance. - ComponentType validates component when first encountered.
- Removed
PackedComponent
and@PackedWeaver
. - added
AspectSubscriptionManager#getSubscriptions
- added
Bag(Class<T>)
andBag(Class<T>, int capacity)
IntBag#get
throwsArrayIndexOutOfBoundsException
wheneverindex
is greater than the reported size,
regardless of the size of the underlying array.- All systems are first injected, after which all systems are initialized. Previously,
each system was injected/initialized at the same time. - Serialization
- new
artemis-odb-serializer
artifact, used by all serialization backends, - Kryo serialization backend: binary with kryo
(thanks to @piotr-j).
- new
artemis-odb-2.0.0-RC3
Change Log
It's now possible to inject aspect-related classes:
public class SomeSystem extends BaseSystem {
@AspectDescriptor(
all = {ComponentX.class, ComponentY.class},
exclude = PooledString.class,
one = EntityHolder.class)
private EntitySubscription subcription;
@AspectDescriptor(
all = {ComponentX.class, ComponentY.class},
exclude = ComponentZ.class)
private EntityTransmuter transmuter;
@AspectDescriptor(
all = {ComponentX.class, ComponentY.class},
exclude = PooledString.class,
one = {ReusedComponent.class, EntityHolder.class})
private Aspect aspect;
Systems are automatically injected during world initialization. Use World#inject
for non-artemis types.
Version: 2.0.0-RC3 - 2016-06-21
- BREAKING CHANGES
- World's systems array is now typed with
BaseSystem
; this should only have
implication for custom implementations ofSystemInvocationStrategy
. - EntityFactory annotation processor and related classes have been removed,
for more background, see #428.
- World's systems array is now typed with
- AspectFieldResolver; additional default injection field resolver.
@AspectDescriptor
on appropriate fields to inject.- Valid targets:
Aspect
,Aspect.Builder
,EntityTransmuter
,EntitySubscription
- add
EntityTransmuter(World, Aspect.Builder)
constructor - Deserialization exception reports on missing component identifiers (usually from
manually edited json). - Fix: WorldConfigurationBuilder.Priority didn't compare properly.
- Fix: thread safefty; InjectionCache's fields no longer static.
Version: 2.0.0-RC2 - 2016-05-26
- BREAKING CHANGES
- Components require a public no-args constructor. While this was allowed in past versions,
it never worked with serialization or pooled components.
- Components require a public no-args constructor. While this was allowed in past versions,
World#compositionId(entityId)
added. Previously, one had to go
viaEntity#getCompositionId()
EntityManager#reset
- if the world is empty, resets entity id generation to0
- Optimized entity subscriptions: compositionId pre-calculated and bundled
byAspectSubscriptionManager
before informing listeners. - Fix: ComponentMapper was accidentally marked as final in RC1.
Version: 2.0.0-RC1 - 2016-05-09
- BREAKING CHANGES
- Methods added to interface
Injector#getRegistered(Class|String)
ComponentMapper#getSafe
deprecated,#get
is sufficient for all use-cases now.
due to mappers always growing their backing arrays to accomodate the highest entity id.- Calling
BaseSystem#process
will now run the system, even ifsetEnabled(false)
has been called.
SystemInvocationStrategy
now tracks which systems are enabled/disabled.
(you may want to update your customSystemInvocationStrategy
implementations). - Bag#getData throws ClassCastException when container wasn't created with any of the
typed constructors.
- Methods added to interface
- Optional manager: EntityLinkManager, discovery and maintenance of relationships between entities.
- Automatically tracks component fields:
@EntityId int
,Entity
,@EntityId IntBag
,Bag<Entity>
(shares behavior with serialization). LinkListener
for listening in on when links between entities are established, changed or disconnected.- Tune behavior with
@LinkPolicy
, applied on component fields referencing entities. - Optimized link accessors via maven/gradle plugin - reflection-based fallback during development.
- Automatically tracks component fields:
@DelayedComponentRemoval
guarantees that component is available inSubscriptionListener#removed(IntBag)
.World#getRegistered
, retrieves injectable objects programmatically.- Re-worked
EntityEdit
logic, less code and more performance. - ComponentType validates component when first encountered.
- Removed
PackedComponent
and@PackedWeaver
. - added
AspectSubscriptionManager#getSubscriptions
- added
Bag(Class<T>)
andBag(Class<T>, int capacity)
IntBag#get
throwsArrayIndexOutOfBoundsException
wheneverindex
is greater than the reported size,
regardless of the size of the underlying array.- All systems are first injected, after which all systems are initialized. Previously,
each system was injected/initialized at the same time. - Serialization
- new
artemis-odb-serializer
artifact, used by all serialization backends, - Kryo serialization backend: binary with kryo
(thanks to @piotr-j).
- new
artemis-odb-2.0.0-RC2
Change Log
Version: 2.0.0-RC2 - 2016-05-26
- BREAKING CHANGES
- Components require a public no-args constructor. While this was allowed in past versions,
it never worked with serialization or pooled components.
- Components require a public no-args constructor. While this was allowed in past versions,
World#compositionId(entityId)
added. Previously, one had to go
viaEntity#getCompositionId()
EntityManager#reset
- if the world is empty, resets entity id generation to0
- Optimized entity subscriptions: compositionId pre-calculated and bundled
byAspectSubscriptionManager
before informing listeners. - Fix: ComponentMapper was accidentally marked as final in RC1.
artemis-odb-2.0.0-RC1
New version starting to shape up. There will probably be a few more release candidates before the official 2.0.0. Upgrading from 1.x to 2.0.0 should be a relatively smooth operation - less invasive than when migrating to 1.0.0.
Be sure to check out the EntityLinkManager, and for retrieving those removed components in subscription listeners - @DelayedComponentRemoval
. Finally, the kryo serializer is in place now too (wiki entry coming soon.
Change Log
Version: 2.0.0-RC1 - 2016-05-09
- BREAKING CHANGES
- Methods added to interface
Injector#getRegistered(Class|String)
ComponentMapper#getSafe
deprecated,#get
is sufficient for all use-cases now.
due to mappers always growing their backing arrays to accomodate the highest entity id.- Calling
BaseSystem#process
will now run the system, even ifsetEnabled(false)
has been called.
SystemInvocationStrategy
now tracks which systems are enabled/disabled.
(you may want to update your customSystemInvocationStrategy
implementations).
- Methods added to interface
- Optional manager: EntityLinkManager, discovery and maintenance of relationships between entities.
- Automatically tracks component fields:
@EntityId int
,Entity
,@EntityId IntBag
,Bag<Entity>
(shares behavior with serialization). LinkListener
for listening in on when links between entities are established, changed or disconnected.- Tune behavior with
@LinkPolicy
, applied on component fields referencing entities. - Optimized link accessors via maven/gradle plugin - reflection-based fallback during development.
- Automatically tracks component fields:
@DelayedComponentRemoval
guarantees that component is available inSubscriptionListener#removed(IntBag)
.World#getRegistered
, retrieves injectable objects programmatically.- Re-worked
EntityEdit
logic, less code and more performance. - ComponentType validates component when first encountered.
- Removed
PackedComponent
and@PackedWeaver
. - added
AspectSubscriptionManager#getSubscriptions
- added
Bag(Class<T>)
andBag(Class<T>, int capacity)
IntBag#get
throwsArrayIndexOutOfBoundsException
wheneverindex
is greater than the reported size,
regardless of the size of the underlying array.- All systems are first injected, after which all systems are initialized. Previously,
each system was injected/initialized at the same time. - Serialization
- new
artemis-odb-serializer
artifact, used by all serialization backends, - Kryo serialization backend: binary with kryo
(thanks to @piotr-j).
- new