Giter Site home page Giter Site logo

artemis-odb-entity-tracker's Introduction

Entity Tracker

Build Status

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

screenshot

Installation

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.