A Java entity system inspired by Ash & Artemis.
See commit history
Engine
class. Commit 07fc2ba6bcd9996c472c651b56b57b32fd8fd3a7.Engine
class. Commit 45dd7e0e4a52c8d65f520fac4e8f4e83471b215b.Entity
class. Commit 423148a2719873efb50d4f2b3982c247df4fceca.Engine
doesn't use EntitySystem
iterator()
. Issue #209.Engine
left unusable, in the updating state, after an uncaught exception in a subsystem. Issue #210.FamilyManager
not cleaning up properly when a triggering a listener that throws. Issue #210.IntervalSystem
interval value (read-only). Commit 5277cbe83264d0ddc851a823232f51c350e9c387.EntityListener
causing wrong EntityListener
calls. Issue #203.compile "com.badlogicgames.ashley:ashley:1.0.1"
.ImmutableArray
and ImmutableIntMap
references, making it harder for client code to break the system.ComponentMapper
and the use of Array<Entity>
rather than IntMap<Entity>
. Unfortunately this changes the API slightly, but hopefully you guys will appreciate the benefits. Commit 8c98e9799bb6cc65cf61669eed36d7f8f04a2da4.Family.getFamilyFor()
to Family.getFor()
for simplicity. Commit 3182782dfd71e13f0bf1c03490512d91921117a3.PooledEngine
now accepts the initial and maximum sizes for the entity and components pools. This will add a lot more flexibility to bigger games. Commit 569f089f9236dc8c2da09f4fe3b4d33880745d8a.Entity#getComponent(Class)
back in, so we accepted SgtCODFish's PR. ComponentMapper
is still the most efficient and encouraged method to retrieve an entity's components. Issue #51.PooledEngine#clearPools()
to delete unused entity and component pool memory. Commit 28372993d60d6e2f460f36e27df953936e550933.EntitySystem#setProcessing(boolean)
so as to be able to enable/disable systems at will. Commit 188239aeaa3e99c9bd7ebab268a9e9959d2a09c2.Engine#getSystems()
. Commit 8f54a2a5ee97c87cba57bd187b4aeb2aef7ec831.IteratingSystem#processEntity()
. Commit d5ace4e43a32c27fec82821b90b3e55c89ad373f.Signal
would make other listeners miss the event. Thanks to vlaaad for the PR! Issue #52.IntervalSystem
and IntervalIteratingSystem
, which are updated at a fixed interval. Commit 47bf907b15ad8ed4297a10eb6b6b311e1542dcb8.getEntities()
to IteratingSystem
and IntervalIteratingSystem
. Commit f1ccdbea63a175f2a76c26b46661998b6a131c59.long
as ID. Changes entity.getIndex()
for entity.getId()
. Ids are reset to 0 after the entity is removed from the engine. Commit 6f9d2b78c34f72d03e76d40c8d9704f1c763e59a.Bug fix: fixed IllegalArgumentException
thrown when trying to remove components from an already reset entity. The call has no effect now. Thanks for that SgtCoDFish. Issue #77.
Bug fix: fixed family match failure due to silly silly hashing. Issue #78.
Bug fix: fixed entity.getId()
always returning 0
for recycled pooled entities. Issue #82.
Bug fix: fixed nested iteration problem caused by adding/removing entities from an entity added/removed listener handler. Issue #81.
Bug fix: fixed missing type error in GWT when using PooledEngine
. GWT should be quite smooth now. Commit cb3347239504972b86653efab8d9051ec5366760.
Family
objects. More about it on the wiki. Commit addition974f12f6d53c5d92992ddd6bf09edd44937d9e66.SortedIteratingSystem
by Lusito. Commit 905b26895536c57d9d42d994e62237c60f909e0c.ImmutableArray
implements the Iterable
interface, which makes it a lot easier to iterate over entity collections. Commit c39b09772a4514c180846204ce55cdc2eae71cc5.StackOverflowError
when processing entity operations. Issue #103.removeAllEntities()
. Issue #101.