Fluid entity API natural extension on artemis-odb-entity.
Integrates fluid entities better.
System hierarchy reusable for fluid entities.
Multi world in different thread support!
Extends CosplayWorld<T> For example: FluidWorld extends CosplayWorld<E>.
World world = new FluidWorld(new WorldConfiguration().setSystem(MySystem));
class MyFluid extends EntityProcessingSystem<E> {
ComponentMapper<Pos> mPos;
@Override
public void initialize() {
E().pos(); // In this case it returns E.
// Can also be used to obtain vanilla Entity. :)
}
@Override
protected void process(E e) {
e.posX(MathUtils.random(100));
for(E e : world.allEntitiesOf(Cat.class)) {
// do something.
}
}
}
Your own Entity and World
World world = new MyWorld(new WorldConfiguration().setSystem(MySystem));
Impact when migrating to this new version should be relatively small.
Stuck points
Right direction for odb? Major version, fork, forget?
Currently serialization still requires artemis-odb-entity for serialization. Feasible to make int-only @junkdog ? While core lacks Entity instance management, the data class itself is available.
Generics in system hierarchy helps expose methods on richer entities, but type erasure can break user generics on that class. Opted for generics instead of bloating the System hierarchy, but we could also go for concrete hierarchy per type.
Some managers (UUID, Player) are so fringe opted to not put them in core.
What's the "best practice" for initializing components when working with the integer API? Would you just create a "factory system" and initialize everything using mappers there?
This tickets intends to get you up to speed with proposal #499 and put it up for challenge. Love to hear what you guys think! Questions at the bottom.
Overview of changes
Int-only
artemis-odb-core
moduleOptional
artemis-odb-entity
moduleEntity
and/or@code int
.Fluid entity API natural extension on
artemis-odb-entity
.Extends
CosplayWorld<T>
For example:FluidWorld extends CosplayWorld<E>
.Your own
Entity
andWorld
Impact when migrating to this new version should be relatively small.
Stuck points
artemis-odb-entity
for serialization. Feasible to make int-only @junkdog ? While core lacks Entity instance management, the data class itself is available.