Skip to content

basil-ladder/CameraModule

 
 

Repository files navigation

SSCAIT-ObserverModule

This is the source code for the observer module used by the Student StarCraft AI Tournament (SSCAIT).

More information can be found at

Due to some changes between BWAPI versions, the code in source_bwapi_3_7/ and source_bwapi_4/ is slightly different, but with no changes in functionality.

Usage

This observer module is utilized by a TournamentModule. The following functions should be called:


CameraModule::onStart(BWAPI::Position startPos, int screenWidth, int screenHeight)

The screen dimensions are used to center events on the screen. Should be called once at the start.


CameraModule::onFrame()

Runs the code determining what the observer should be focusing on and handles camera movement. Should be called every frame.


CameraModule::moveCameraUnitCreated(BWAPI::Unit* unit)

Should be called when a unit is created (for example in TournamentModule::onUnitComplete()). Is used to inform the observer about unit-creation events.


Many fields (such as cameraMoveTime, cameraMoveTimeMin, and watchScoutWorkerUntil) are declared public in the header file and can be changed while e.g. reading a config file. If not changed, the default values (set in the CameraModule constructor) will be used.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.9%
  • Makefile 0.1%