artemis-odb-2.1.0

@junkdog junkdog released this Dec 9, 2016 · 14 commits to master since this release

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

Downloads

artemis-odb-2.0.0

@junkdog junkdog released this Aug 15, 2016 · 112 commits to master since this release

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
      to InvocationStrategy::process
    • InvocationStrategy::updateEntityStates must be called before processing the first system.
      Previously, the initial update was done by the world instance.
  • World's systems array is now typed with BaseSystem; this should only have
    implication for custom implementations of SystemInvocationStrategy.
  • 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 if setEnabled(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
  • 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 the unsafe- methods.
    • EntityManager::registerEntityStore(BitVector) - when representing
      entity id:s as bits, makes unsafe- methods safe - as the EntityManager
      grows the bit vector as necessary.
  • 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
        to InvocationStrategy::process
      • InvocationStrategy::updateEntityStates must be called before processing the first system.
        Previously, the initial update was done by the world instance.
  • 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 of SystemInvocationStrategy.
    • EntityFactory annotation processor and related classes have been removed,
      for more background, see #428.
  • 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.
  • World#compositionId(entityId) added. Previously, one had to go
    via Entity#getCompositionId()
  • EntityManager#reset - if the world is empty, resets entity id generation to 0
  • Optimized entity subscriptions: compositionId pre-calculated and bundled
    by AspectSubscriptionManager 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 if setEnabled(false) has been called.
      SystemInvocationStrategy now tracks which systems are enabled/disabled.
      (you may want to update your custom SystemInvocationStrategy implementations).
    • Bag#getData throws ClassCastException when container wasn't created with any of the
      typed constructors.
  • 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.
  • @DelayedComponentRemoval guarantees that component is available in SubscriptionListener#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>) and Bag(Class<T>, int capacity)
  • IntBag#get throws ArrayIndexOutOfBoundsException whenever index 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).

Downloads

artemis-odb-2.0.0-RC6

@junkdog junkdog released this Aug 9, 2016 · 115 commits to master since this release

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
  • 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 the unsafe- methods.
    • EntityManager::registerEntityStore(BitVector) - when representing
      entity id:s as bits, makes unsafe- methods safe - as the EntityManager
      grows the bit vector as necessary.
  • 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
        to InvocationStrategy::process
      • InvocationStrategy::updateEntityStates must be called before processing the first system.
        Previously, the initial update was done by the world instance.
  • 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 of SystemInvocationStrategy.
    • EntityFactory annotation processor and related classes have been removed,
      for more background, see #428.
  • 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.
  • World#compositionId(entityId) added. Previously, one had to go
    via Entity#getCompositionId()
  • EntityManager#reset - if the world is empty, resets entity id generation to 0
  • Optimized entity subscriptions: compositionId pre-calculated and bundled
    by AspectSubscriptionManager 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 if setEnabled(false) has been called.
      SystemInvocationStrategy now tracks which systems are enabled/disabled.
      (you may want to update your custom SystemInvocationStrategy implementations).
    • Bag#getData throws ClassCastException when container wasn't created with any of the
      typed constructors.
  • 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.
  • @DelayedComponentRemoval guarantees that component is available in SubscriptionListener#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>) and Bag(Class<T>, int capacity)
  • IntBag#get throws ArrayIndexOutOfBoundsException whenever index 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).

Downloads

artemis-odb-2.0.0-RC5

@junkdog junkdog released this Jul 23, 2016 · 125 commits to master since this release

Change Log

Version: 2.0.0-RC5 - 2016-07-23

  • BREAKING CHANGES
  • 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 the unsafe- methods.
    • EntityManager::registerEntityStore(BitVector) - when representing
      entity id:s as bits, makes unsafe- methods safe - as the EntityManager
      grows the bit vector as necessary.
  • 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
        to InvocationStrategy::process
      • InvocationStrategy::updateEntityStates must be called before processing the first system.
        Previously, the initial update was done by the world instance.
  • 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 of SystemInvocationStrategy.
    • EntityFactory annotation processor and related classes have been removed,
      for more background, see #428.
  • 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.
  • World#compositionId(entityId) added. Previously, one had to go
    via Entity#getCompositionId()
  • EntityManager#reset - if the world is empty, resets entity id generation to 0
  • Optimized entity subscriptions: compositionId pre-calculated and bundled
    by AspectSubscriptionManager 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 if setEnabled(false) has been called.
      SystemInvocationStrategy now tracks which systems are enabled/disabled.
      (you may want to update your custom SystemInvocationStrategy implementations).
    • Bag#getData throws ClassCastException when container wasn't created with any of the
      typed constructors.
  • 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.
  • @DelayedComponentRemoval guarantees that component is available in SubscriptionListener#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>) and Bag(Class<T>, int capacity)
  • IntBag#get throws ArrayIndexOutOfBoundsException whenever index 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).

Downloads

artemis-odb-2.0.0-RC4

@junkdog junkdog released this Jul 10, 2016 · 134 commits to master since this release

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
        to InvocationStrategy::process
      • InvocationStrategy::updateEntityStates must be called before processing the first system.
        Previously, the initial update was done by the world instance.
  • 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 of SystemInvocationStrategy.
    • EntityFactory annotation processor and related classes have been removed,
      for more background, see #428.
  • 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.
  • World#compositionId(entityId) added. Previously, one had to go
    via Entity#getCompositionId()
  • EntityManager#reset - if the world is empty, resets entity id generation to 0
  • Optimized entity subscriptions: compositionId pre-calculated and bundled
    by AspectSubscriptionManager 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 if setEnabled(false) has been called.
      SystemInvocationStrategy now tracks which systems are enabled/disabled.
      (you may want to update your custom SystemInvocationStrategy implementations).
    • Bag#getData throws ClassCastException when container wasn't created with any of the
      typed constructors.
  • 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.
  • @DelayedComponentRemoval guarantees that component is available in SubscriptionListener#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>) and Bag(Class<T>, int capacity)
  • IntBag#get throws ArrayIndexOutOfBoundsException whenever index 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).

Downloads

artemis-odb-2.0.0-RC3

@junkdog junkdog released this Jun 21, 2016 · 151 commits to master since this release

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 of SystemInvocationStrategy.
    • EntityFactory annotation processor and related classes have been removed,
      for more background, see #428.
  • 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.
  • World#compositionId(entityId) added. Previously, one had to go
    via Entity#getCompositionId()
  • EntityManager#reset - if the world is empty, resets entity id generation to 0
  • Optimized entity subscriptions: compositionId pre-calculated and bundled
    by AspectSubscriptionManager 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 if setEnabled(false) has been called.
      SystemInvocationStrategy now tracks which systems are enabled/disabled.
      (you may want to update your custom SystemInvocationStrategy implementations).
    • Bag#getData throws ClassCastException when container wasn't created with any of the
      typed constructors.
  • 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.
  • @DelayedComponentRemoval guarantees that component is available in SubscriptionListener#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>) and Bag(Class<T>, int capacity)
  • IntBag#get throws ArrayIndexOutOfBoundsException whenever index 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).

Downloads

artemis-odb-2.0.0-RC2

@junkdog junkdog released this May 26, 2016 · 176 commits to master since this release

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.
  • World#compositionId(entityId) added. Previously, one had to go
    via Entity#getCompositionId()
  • EntityManager#reset - if the world is empty, resets entity id generation to 0
  • Optimized entity subscriptions: compositionId pre-calculated and bundled
    by AspectSubscriptionManager before informing listeners.
  • Fix: ComponentMapper was accidentally marked as final in RC1.

Downloads

artemis-odb-2.0.0-RC1

@junkdog junkdog released this May 8, 2016 · 194 commits to master since this release

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 if setEnabled(false) has been called.
      SystemInvocationStrategy now tracks which systems are enabled/disabled.
      (you may want to update your custom SystemInvocationStrategy implementations).
  • 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.
  • @DelayedComponentRemoval guarantees that component is available in SubscriptionListener#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>) and Bag(Class<T>, int capacity)
  • IntBag#get throws ArrayIndexOutOfBoundsException whenever index 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).

Downloads

artemis-odb-1.4.0

@junkdog junkdog released this Mar 9, 2016 · 331 commits to master since this release

This one introduces a minor breaking API change. We considered it sufficiently minor to not warrant a major version bump.

Change Log

Version: 1.4.0 - 2016-03-09

  • BREAKING CHANGES
    • If you have overridden default injection functionality and instance FieldHandler
      yourself, be aware the FieldHandler constructor behaviour has changed. See below.
  • Fix: IntervalEntitySystem#getIntervalDelta sometimes returned wrong value when interval < world.delta.
  • Fix: Transmuting deleted entities throws an exception, mirroring EntityEdit on deleted.
  • Fix: Simultaneous transmute + delete caused dead entities in SubscriptionListener#inserted.
  • Fix: Using custom FieldHandler or FieldResolver disabled @Wire on fields.
    • Warn if attempting to inject custom objects without prerequisite resolver (PojoFieldResolver).

Downloads

artemis-odb-1.3.1

@junkdog junkdog released this Dec 29, 2015 · 347 commits to master since this release

Change Log

Version: 1.3.1 - 2015-12-29

  • Fix: During deserialization, indirectly referenced entities were not included in
    the archetypes section

Version: 1.3.0 - 2015-12-28

  • Serialization
    • Archetypes recorded in output; somewhat smaller output and faster load.
    • If JsonArtemisSerializer#setUsePrototypes is true (default), omit components made
      up of default values.
    • Json DOM was parsed multiple times, fixed.
    • Overloaded JsonArtemisSerializer#load - deserialize directly from JsonValue.
    • When loading entities, each deserialized child is assigned an entity id greater
      than its parent.
    • added WorldSerializationManager#getSerializer (if you need to load JsonValue directly, for instance)
  • Fix: Work-around for a NPE during weaving; occurred when trying to inspect fields belonging to any parent class

Downloads