This branch holds an old prototype of the Entity Tracker which is a discontinued version. Instead, there is a WIP version on the develop branch. To read more about its current state see gh-pages website: http://namek.github.io/artemis-odb-entity-tracker/
Server and Client that provides online tracking of artemis-odb World state.
Note: Due to #7 about artemis-odb 2.x support, the latest version of Entity Tracker is commit 0703ecdbcb11c1554e312a4f9b195f19b02ef228. If you need this please apply the version to the following configuration.
<dependency>
<groupId>net.namekdev.entity_tracker</groupId>
<artifactId>artemis-entity-tracker</artifactId>
<version>0.4.0-SNAPSHOT</version>
</dependency>
<!-- uncomment in case you need GUI inside your game -->
<!--dependency>
<groupId>net.namekdev.entity_tracker</groupId>
<artifactId>artemis-entity-tracker-gui</artifactId>
<version>0.4.0-SNAPSHOT</version>
</dependency-->
dependencies {
compile "net.namekdev.entity_tracker:artemis-entity-tracker:0.4.0-SNAPSHOT"
// uncomment in case you need GUI instantiated directly from your game
// compile "net.namekdev.entity_tracker:artemis-entity-tracker-gui:0.4.0-SNAPSHOT"
}
Import both Entity Tracker
and Entity Tracker GUI
libraries into your project.
artemisWorld.setManager(new EntityTracker(new EntityTrackerMainWindow()));
Host Entity Tracker Server
inside your game:
EntityTrackerServer entityTrackerServer = new EntityTrackerServer();
entityTrackerServer.start();
artemisWorld.setManager(new EntityTracker(entityTrackerServer));
There are 2 options to run Entity Tracker GUI
that connects with EntityTrackerServer
:
- run external app (you can download
*-app
from releases) or build it yourself (seeBuild
section below) - run StandaloneMain.java file or setup GUI manually:
final EntityTrackerMainWindow window = new EntityTrackerMainWindow();
final Client client = new PersistentClient(new ExternalInterfaceCommunicator(window));
client.connect(serverName, serverPort);
Generally speaking, EntityTracker
expects WorldUpdateListener
interface implementation, e.g. it may be some window listener.
To achieve network version one can just mimic implementation of ExternalInterfaceCommunicator
by implementing Communicator
interface and passing it to Client
.
Build libraries with sources:
mvn clean package
Build GUI client app as external executable:
mvn clean package -P app
and you'll find artemis-entity-tracker-gui/target/artemis-entity-tracker-gui-{version}-app.jar