Hieu Nguyen

Create a StarCraft II Bot - Part 1: Setup on MacOS

Aug 30 2017


Recently, Blizzard published the StarCraft II API which allows developers to create bots to play the game.

I really like StarCraft series, so I want to look into it and create my own bots. If it’s possible, I can also learn how to use Machine Learning for bot.

This series of blog posts will be my notes for the process of learning. Today I build the sc2-client-api and run a sample bot.

The document of the repo is very clear. You will do these steps to build the project:

  1. Make sure a recursive clone of the project is done to download all submodules.
git clone --recursive https://github.com/Blizzard/s2client-api
  1. Enter the working directory and create a build directory for CMake artifacts.
cd s2client-api
mkdir build
cd build
  1. Create XCode project file
cmake ../ -G Xcode
  1. Open the project and build using XCode
open s2client-api.xcodeproj/

# Then press Cmd+B to build
  1. Run a sample bot.
cd bin/bot_mp

Now you can see two instances of StarCraft playing with each other.