Skip to content

Upgrading Checklist

DaanVanYperen edited this page Sep 19, 2014 · 17 revisions

Upgrading to 0.7

WIP, 0.7 has not been released yet.

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.

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.

  • (Optional) Configure your state change using the WorldConfiguration class.
  • Doublecheck if calls to Entity#isActive, Entity#isEnabled are still appropriate (Since entity state changes are delayed, so are state checks).
  • Use Entity#edit when adding or removing components.
  • 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()
  • '@Mapper' -> use @Wire instead (valid on fields and methods).

Entity Enable/Disable

Due to performance improvements we will be moving away from enable/disable as a separate mechanic. Instead, create a component to track enable/disable state.

  • 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.
  • Replace/remove deprecated 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