The StarCraft II API provides access to in-game state observation and unit control. The API is a wrapper around protobuf defined protocol over a websocket connection.
While it's possible to write directly to the protocol, this library provides a C++ and class-based abstraction. You can see a simple example below.
- A detailed tutorial is located in docs/tutorial1.md.
- The API documentation can be found on our github pages site. The documentation is generated from code automatically, using Doxygen
- For example of usage of this API please refer to CommandCenter, Suvorov bot and the examples folder in this project.
- To start from scratch, please check this boilerplate.
You can download precompiled libraries for Windows and OS X here.
Have questions but don't want to create an issue? Join the unofficial Starcraft II AI Discord server (Invite Link). Questions about this repository can be asked in the text channel #cpp
.
Also, please consider to support this project on Boosty (preferred) or Patreon. Support of the project allows to make releases more often and implement nice new features for developers.
This library uses CMake to generate project files. It builds with Visual Studio on Windows and Makefiles on the other platforms. It relies on the following contrib packages:
- Civetweb
- Protobuf
- (optional) SDL
- ipv6-parse
Follow the instructions for submodules and building in docs/building.md.
To edit and generate the documentation yourself:
- Download and install doxygen
- Fork the repository and clone it locally
- Checkout the master branch 'git checkout origin/master -b my-documentation-update
- Make changes to the code documentation or docs/ files
- From the root of the project run: doxygen Doxyfile
- Review your documenation changes by opening docs/html/index.html in your browser
- Push your changes to your fork and send us a pull request
This project follows a Code of Conduct in order to ensure an open and welcoming environment.
Please, read also the detailed contributing guide before creating pull-requests to the project. It can save you a lot of time.
We do our best to conform to the Google C++ Style Guide with the exception that we use four space tabs instead of two space tabs.
This repository only comes with a few maps for testing. Additional maps and replays can be found here.