{"id":13677697,"url":"https://github.com/cpp-sc2/blank-bot","last_synced_at":"2025-04-29T11:31:30.228Z","repository":{"id":53337859,"uuid":"340441825","full_name":"cpp-sc2/blank-bot","owner":"cpp-sc2","description":"Starter bot for StarCraft II with integrated cpp-sc2","archived":false,"fork":false,"pushed_at":"2024-12-28T18:04:50.000Z","size":32,"stargazers_count":3,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-28T19:18:08.787Z","etag":null,"topics":["ai","bot","cpp","game","sc2","starcraft","starcraft-ii","starcraft-ii-bot","starcraft2","starter"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpp-sc2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-19T17:28:42.000Z","updated_at":"2024-12-28T18:04:53.000Z","dependencies_parsed_at":"2024-11-16T21:00:52.746Z","dependency_job_id":null,"html_url":"https://github.com/cpp-sc2/blank-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpp-sc2%2Fblank-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpp-sc2%2Fblank-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpp-sc2%2Fblank-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpp-sc2%2Fblank-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpp-sc2","download_url":"https://codeload.github.com/cpp-sc2/blank-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251493870,"owners_count":21598184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bot","cpp","game","sc2","starcraft","starcraft-ii","starcraft-ii-bot","starcraft2","starter"],"created_at":"2024-08-02T13:00:45.926Z","updated_at":"2025-04-29T11:31:30.222Z","avatar_url":"https://github.com/cpp-sc2.png","language":"C++","funding_links":[],"categories":["Open-source bots"],"sub_categories":["CPP bots"],"readme":"# blank-bot\n\n[![Build](https://github.com/cpp-sc2/blank-bot/actions/workflows/ci.yml/badge.svg)](https://github.com/cpp-sc2/blank-bot/actions/workflows/ci.yml)\n\nStarter bot for StarCraft II with integrated cpp-sc2.\n\n\u003c!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc --\u003e\n**Table of Contents**\n\n- [blank-bot](#blank-bot)\n    - [Support](#support)\n    - [Build instructions](#build-instructions)\n        - [Windows](#windows)\n        - [macOS](#macos)\n        - [Linux](#linux)\n    - [Additional options](#additional-options)\n        - [WSL2 Support](#wsl2-support)\n        - [Game client version](#game-client-version)\n        - [AIArena ladder build](#aiarena-ladder-build)\n    - [Managing CMake dependencies](#managing-cmake-dependencies)\n    - [Troubleshooting](#troubleshooting)\n        - [CMake options don't take effect](#cmake-options-dont-take-effect)\n        - [Build freezes (Linux or macOS)](#build-freezes-linux-or-macos)\n    - [License](#license)\n\n\u003c!-- markdown-toc end --\u003e\n\n## Support\n\nFeel free to post questions on the unofficial StarCraft II AI Discord server. [Invite Link](https://discordapp.com/invite/Emm5Ztz)\n\n## Build instructions\n\n\u003e :construction: This project requires a compiler with C++17 support.\n\n1. Before proceeding further download the [actual map pack](https://aiarena.net/wiki/maps/).\n\n1. Put the downloaded maps into the `Maps` folder (create it if the folder doesn't exist):\n   * Windows: `C:\\Program Files\\StarCraft II\\Maps`\n   * OS X: `/Applications/StarCraft II/Maps`\n   * Linux: anywhere.\n\n### Windows\n\nFor building for Windows under WSL2, see [WSL2 Support](#wsl2-support).\n\n1. Install [CMake](https://cmake.org/download/).\n\n1. Download and install Visual Studio ([2017](https://www.visualstudio.com/downloads/) or newer).\n\n1. Get the project.\n\n   ```bat\n   git clone git@github.com:cpp-sc2/blank-bot.git\n   ```\n\n1. Enter the working directory.\n\n   ```bat\n   cd blank-bot\n   ```\n\n1. Create Visual Studio project files in the directory \"build\".\n   E.g. for Visual Studio 2022:\n\n   ```bat\n   cmake -B build -G \"Visual Studio 17 2022\"\n   ```\n\n1. Build the project using Visual Studio.\n\n   ```bat\n   start build\\BlankBot.sln\n   ```\n\n1. Launch the bot with the specified path to a SC2 map, e.g:\n\n   ```bat\n   build\\bin\\Debug\\BlankBot.exe Ladder2019Season3/AcropolisLE.SC2Map\n   ```\n\n### macOS\n\n1. Install [CMake](https://cmake.org/download/).\n\n1. Install XCode.\n\n1. Install XCode command-line tools.\n\n1. Clone the project.\n\n   ```bash\n   git clone git@github.com:cpp-sc2/blank-bot.git \u0026\u0026 cd blank-bot\n   ```\n\n1. Generate CMake build tree.\n\n   ```bash\n   cmake -B build\n   ```\n\n1. Build the project.\n\n   ```bash\n   cmake --build build --parallel $(nproc)\n   ```\n\n1. Launch the bot with the specified absolute path to a SC2 map, e.g.:\n\n   ```bash\n   ./build/bin/BlankBot \"/home/alkurbatov/Ladder2019Season3/AcropolisLE.SC2Map\"\n   ```\n\n### Linux\n\n1. Install [CMake](https://cmake.org/download/).\n\n1. Install `gcc-c++`.\n\n1. Install the `make` utility.\n\n1. Get the project.\n\n   ```bash\n   git clone git@github.com:cpp-sc2/blank-bot.git \u0026\u0026 cd blank-bot\n   ```\n\n1. Generate CMake build tree.\n\n   ```bash\n   cmake -B build\n   ```\n\n1. Build the project.\n\n   ```bash\n   cmake --build build --parallel $(nproc)\n   ```\n\n1. Launch the bot with the specified absolute path to a SC2 map, e.g.:\n\n   ```bash\n   ./build/bin/BlankBot \"/home/alkurbatov/Ladder2019Season3/AcropolisLE.SC2Map\"\n   ```\n\n## Additional options\n\n### WSL2 Support\n\nCross compiling for Windows under WSL2 is supported through `cpp-sc2`. See the `cpp-sc2` [documentation](https://github.com/cpp-sc2/cpp-sc2/blob/master/docs/building.md#wsl2-support) for build requirements. The build flag remains the same, setting `-DWSL2_CROSS_COMPILE=ON`.\n\n### Game client version\nBy default, the API assumes the latest version of the game client. The assumed version can be found in cmake's output, e.g.:\n```bash\n$ cmake -B build grep 'SC2 version'\nTarget SC2 version: 5.0.5\n...\n```\n\nHowever, sometimes one may need to compile with an older version of the game, e.g. to play with a Linux build which is\nalways behind the Windows version. It is possible by specifying the game version manually, e.g.:\n```bash\ncmake -B build -DSC2_VERSION=4.10.0\n```\n\n### AIArena ladder build\nTo compile a bot capable to play on [the AIArena ladder](https://aiarena.net), configure the project in the following way:\n```bash\ncmake -B build -DBUILD_FOR_LADDER=ON -DSC2_VERSION=4.10.0\n```\n\n## Managing CMake dependencies\n\n`BlankBot` uses the CMake `FetchContent` module to manage and collect dependencies. To use a version of `cpp-sc2` outside of the pinned commit, modify the `GIT_REPOSITORY` and/or the `GIT_TAG` in `cmake/cpp_sc2.cmake`:\n```\n...\nFetchContent_Declare(\n    cpp_sc2\n    GIT_REPOSITORY \u003ctarget-cpp-sc2-git-rep\u003e\n    GIT_TAG \u003cgit-commit-hash\u003e\n)\nFetchContent_MakeAvailable(cpp_sc2)\n...\n```\nWith the updated configuration, re-run the build configuration and the dependency will be updated to the new configuration:\n```\ncmake -B build\n```\n\n## Troubleshooting\n\n### CMake options don't take effect\n\nIf you see that some of cmake options don't take effect\n(e.g. project was configured with `cmake -B build -DBUILD_FOR_LADDER=ON` and a bit later with `cmake -B build`)\nremove the `build` folder or the `CMakeCache.txt` file, or explicitly re-specify the desired default behavior (e.g. `cmake -B build -DBUILD_FOR_LADDER=OFF`).\n\n### Build freezes (Linux or macOS)\n\nIf project compilation freezes, decrease nproc to 1 or more, e.g.:\n\n``` bash\ncmake --build build --parallel $(nproc --ignore=1)\n```\n\n## License\nCopyright (c) 2021-2024 Alexander Kurbatov\n\nLicensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpp-sc2%2Fblank-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpp-sc2%2Fblank-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpp-sc2%2Fblank-bot/lists"}