Skip to content

Upgrading Checklist

DaanVanYperen edited this page Sep 22, 2014 · 17 revisions

Upgrading to 0.7, preparing for 1.0.0

Preparing for an API cleanup in 1.0.0, this version sees a lot of deprecated methods. You might also need to doublecheck your usages of enable/disable.

In order to provide an upgrade path as smooth as possible, the last feature release before 1.0.0 will be identical to 1.0.0 - except for the presence of deprecated methods and classes.

Entity Lifecycle Management

State changes (Entity add, remove, enable, disable) aren't reflected until the next system starts processing or a new World#process round begins, whichever comes first.

  • Doublecheck systems that depend on being immediately informed of entity changes. (Systems are no longer immediately informed of created, altered or removed entities. Instead the change is delayed until World#process() is called, or just before the next system runs).
  • Doublecheck if calls to Entity#isActive, Entity#isEnabled are still appropriate (Since entity state changes are delayed, so are state checks, you might get a 'false' when you are expecting a 'true').
  • Use Entity#edit when adding or removing components.
  • before 1.0.0 Replace/remove deprecated methods:
  • Entity#createComponent(..) -> entity.edit().create(..)
  • Entity#addComponent(..) -> entity.edit().add(..)
  • Entity#removeComponent(..) -> entity.edit().remove(..)
  • Entity#changedInWorld() -> remove, handled automatically.
  • Entity#addToWorld() -> remove, handled automatically.
  • World#changedEntity(..) -> internally tracked by artemis now.
  • World#deleteEntity(..) -> invoke Entity#deleteFromWorld(). EntityEdit#deleteEntity()

Entity Enable/Disable

Due to performance improvements there is no longer a need to have a built in enable/disable mechanic. Instead, create a component to track enable/disable state.

  • before 1.0.0 Replace/remove deprecated methods with your own component solution:
  • Entity#isEnabled()
  • Entity#enabled(..)
  • EntityObserver#disabled(..)
  • EntityObserver#enabled(..)
  • World#disable(..)
  • World#enable(..)

Reflection changes

Improved GWT reflection support. We now follow LibGDX naming conventions.

  • @Wire arguments will suddenly start functioning on GWT. Consider if this is appropriate in your case.
  • before 1.0.0 Replace/remove deprecated methods:
  • @Mapper -> use @Wire instead (valid on fields and methods).
  • ClassReflection#getAnnotation -> ClassReflection#getDeclaredAnnotation This returns a cross platform Annotation class, use Annotation#getAnnotation(..) to unwrap it.
  • ClassReflection#hasAnnotation -> ClassReflection#isAnnotationPresent
  • Same goes for Field and Method wrappers.
Clone this wiki locally