Library for working with libGDX + Artemis Entity System Framework, primarily dealing with runtime introspection and live editing.
This small library was initially conceived during the early ECS days and hasn’t really been keeping
up-to-date with developments in artemis-odb. While some of the
functionality is useful, it’s a little too diverse. The good bits could favorably be migrated to artemis-odb-contrib
dominatrix-odb is a small, but diverse library for working with libGDX +
Artemis Entity System Framework, primarily dealing with runtime introspection and live editing.
Javadocs are a little scarce at the moment, see demo project for details.
In the screen or main class:
entityFactoryManager = EntityFactoryManager.from(
Gdx.files.internal("data/archetypes.json"), JsonKey.class, true);
World world = new World();
world.setManager(entityFactoryManager);
// more artemis managers/systems
world.initialize();
In the render method, make sure to call entityFactoryManager.addNewToWorld()
; this
has to be done outside of Artemis’ processing loop.
To create an entity, simple call entityFactoryManager.create("name-of-entity")
.
Import dominatrix-demo into eclipse as a Maven project, alternatively run `mvn package’ inside the
demo folder, this creates an executable jar-with-dependencies under dominatrix-demo/target.
After starting, press F1 to toggle keyboard shortcuts: the shortcuts demonstrate the bulk of
the functionality.
Nota Bene: Maven repository on github isn’t up to date; dominatrix has to be manually
installed (mvn -Pgdx-odb install
) prior to being used.
<repositories>
<repository>
<id>dominatrix-odb</id>
<url>https://raw.github.com/junkdog/dominatrix-odb/mvn-repo/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.onedaybeard</groupId>
<artifactId>artemis-odb</artifactId>
<version>0.3.2</version>
</dependency>
<dependency>
<groupId>net.onedaybeard</groupId>
<artifactId>dominatrix-gdx-odb</artifactId>
<version>0.2.0-SNAPSHOT</version>
</dependency>
</dependencies>