🎲 Visual Entity Tracker for artemis-odb
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
artemis-entity-tracker-gui build: fix travis Jul 10, 2017
artemis-entity-tracker build: fix travis Jul 10, 2017
.gitignore update artemis-odb to 2.0.0 Oct 27, 2016
.travis.yml build: fix travis Jul 10, 2017
README.md Update README.md May 29, 2017
pom.xml build: fix travis Jul 10, 2017
screenshot.png

README.md

Entity Tracker

Build Status

Server and Client that provides online tracking of artemis-odb World state.

screenshot

Installation

Note: Due to https://github.com/Namek/artemis-odb-entity-tracker/issues/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.

Maven

<dependency>
	<groupId>net.namekdev.entity_tracker</groupId>
	<artifactId>artemis-entity-tracker</artifactId>
	<version>0.3.0</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.3.0</version>
</dependency-->

Gradle

dependencies {
	compile "net.namekdev.entity_tracker:artemis-entity-tracker:0.3.0"
	
	// uncomment in case you need GUI instantiated directly from your game
	// compile "net.namekdev.entity_tracker:artemis-entity-tracker-gui:0.3.0"
}

How to use

Option 1. Simple Usage

Import both Entity Tracker and Entity Tracker GUI libraries into your project.

artemisWorld.setManager(new EntityTracker(new EntityTrackerMainWindow()));

Option 2. Network Connection

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:

  1. run external app (you can download *-app from releases) or build it yourself (see Build section below)
  2. 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);

Custom Local/Networked Listener

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

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