dartemis 0.10.0
dartemis: ^0.10.0 copied to clipboard
An Entity System Framework for game development. Based on Artemis.
Changelog #
0.10.0 #
Breaking API Changes #
- entities are no longer simple
ints and have been turned into anextension type Entity(int). Methods that previously expectedint entityorIterable<int> entities>now expectEntity entityorIterable<Entity> entities - removed named parameters
groupandpassivefromWorld.addSystem, they are now named parameters of the constructor ofEntitySystem - the
initialize-method ofManagers andEntitySystems now has a parameter for theWorldand must be called when overridinginitialize - it's no longer possible to add systems or managers after the world has been initialized
ComponentTypehas been turned into an extension type, static methods of this class are now instance methods onComponentManager- combined the different
Aspect-constructors into a single one with optional named parameters forallOf,oneOfandexclude
Enhancements #
- it's now possible to have multiple worlds (e.g. multiple games in the same webpage/app)
- sharing instances of components/entities/managers/systems between worlds is NOT possible and things will break
- added
@visibleForOverriding-annotations to several methods that are only supposed to be called by dartemis
0.9.7 #
0.9.5+3 #
Bugfix #
componentManager.getComponentcouldn't handle accessing components that don't exist for the specific entity
0.9.5+1 #
Bugfix #
componentManager.getComponentcouldn't handle accessing components if no high index entities with those components have been created
0.9.5 #
Enhancements #
- allow direct access to a specific component without use of mappers via
world.componentManager.getComponent(int entity, ComponentType componentType)
0.9.4 #
Bugfix #
- don't update the active entities in a systems if nothing changed
- don't allow multiple instances of the same system or manager
0.9.3 #
Bugfix #
- process deleted entities after a system finishes in case the system interacts multiple times with the deleted entity
0.9.1 #
Bugfix #
- handle more than 32 components when adding systems for components that haven't been used yet
0.9.0-nullsafety.0 #
0.8.0 (Dart 2.0+ required) #
Breaking API Changes #
- removed deprecated code
- replaced
Entitywithint, methods previously onEntityneed to be called onWorld, with theintvalue of the entity as the first parameter - removed
world.processEntityChanges, it's now done by default after every system Aspectno longer uses static methods, uses named constructors instead (migration: replaceAspect.getAspectFwithAspect.f)- methods in
Aspectno longer return the aspect, use cascading operator to chain calls - improved type safety for
world.getManagerandworld.getSystem, no longer takes aTypeas parameter and uses generic methods instead (e.g.world.getManager<TagManager>()instead ofworld.getManager(TagManager)) - removed
Typeparameter in the constructor ofMapper, change code fromMapper<Position>(Position, world)toMapper<Position>(world)
Enhancements #
world.destroy()for cleaning upEntitySystems andManagers
Internal #
- existing entities are processed first, addition of new entities is processed last, makes more sense now that the processing is done after every system
0.7.3 #
Bugfixes #
- adding an entity to a dirty EntityBag could lead to an inconsistency between the bitset and the list of entities
0.7.2 #
Bugfixes #
- removing an entity multiple times caused it to be added to the entity pool multiple times
0.7.0 #
Breaking API Changes #
- renamed
PoolabletoPooled - renamed
ComponentPoolabletoPooledComponent - removed
FastMathandUtils, unrelated to ECS - removed
removeAllfromBag timeandframegetters have been moved fromWorldtoEntitySystem,Worldhas methods instead
API Changes #
- deprecated
ComponentMapperuseMapperinstead - deprecated
ComponentMapper#get(Entity), useMapper[Entity]instead - properties have been added to the
World, can be accessed using the[]operator Systems can be assigned to a group when adding them to theWorld,Word.process()can be called for a specific group
Enhancements #
- performance improvement when removing entities
Bugfixes #
- DelayedEntityProcessingSystem keeps running until all current entities have expired
Internal #
- upgraded dependencies
0.6.0 #
API Changes #
BagisIterable- removed
ReadOnlyBag, when upgrading to 0.6.0 replace every occurence ofReadOnlyBagwithIterable
0.5.2 #
Enhancements #
- injection works for
Managers initialize()in theManageris no longer abstract (same as inEntitySystem)World.createEntitygot an optional paramter to create anEntitywith components- new function
World.createAndAddEntitywhich adds theEntityto the world after creation
Bugfixes #
- added getter for the
WorldinManager - the uniqueId of an
Entitywas always 0, not very unique
0.5.0 #
Enhancements #
- more injection, less boilerplate (when using dartemis_mirrors)
- Instances of
ComponentMapperno longer need to be created in theinitialize-method of a system, they will be injected Managers andEntitySystems no longer need to be requested from theWorldin theinitialize-method of a system, they will be injected
- Instances of
0.4.2 #
0.4.1 #
Bugfixes #
World.deleteAllEntites()did not work if there was already a deleted entity- writing to the
Bagby index doesn't make it smaller anymore
0.4.0 #
API Changes #
- swapped parameters of
Tagmanager.register - replaced
ImmutableBagwithReadOnlyBag, added getter forReadOnlyBagtoBag - changed
FreeComponentstoObjectPool - old
Componenthas changed, there are two different kinds of components now:- instances of classes extending
ComponentPoolablewill be added to theObjectPoolwhen they are removed from anEntity(preventing garbage collection and allowing reuse) - instances of classes extending
Componentwill not be added to theObjectPoolwhen they are removed from anEntity(allowing garbage collection)
- instances of classes extending
Enhancements #
- added function
deleteAllEntitiestoWorld IntervalEntitySystemhas a getter for thedeltasince the systm was processed last- updated to work with Dart M4
Bugfixes #
GroupManager.isInGroupworks if entity is in no group