Giter Site home page Giter Site logo

jabbo16 / sscait-observermodule-bwmirror Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 17 KB

Ported SSCAIT Observer module to Java and BWMirror API

License: GNU General Public License v3.0

Java 100.00%
starcraft bwapi java bwmirror sscait observer camera bot

sscait-observermodule-bwmirror's Introduction

SSCAIT-ObserverModule-BWMirror

Description

Ported SSCAIT Observer module to Java and BWMirror API.

Tested with BWMirror 2.6 and BWAPI 4.1.2.

Original work:

More information can be found at:

Requirements

Usage

Clone this project and add the source code to a package in your Java bot project:

git clone https://github.com/Jabbo16/SSCAIT-ObserverModule-BWMirror.git

Import and create the CameraModule object:

import cameraModule.CameraModule;
private CameraModule observer;

Call the following methods in your main class at the onStart() method:

//self and game are the Player and Game objects extracted from the Mirror object
observer = new CameraModule(self.getStartLocation().toPosition(), game);
observer.toggle(); //Used to enable the observer, by default is disabled

Call the following method in your main class at the onFrame() method:

//Runs the code determining what the observer should be focusing on and handles camera movement
observer.onFrame();

This method should be called when a unit is completed:

//Is used to inform the observer about unit-creation events
observer.moveCameraUnitCreated(unit);

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.