{"id":15037690,"url":"https://github.com/blizzard/s2client-api","last_synced_at":"2025-04-08T08:11:43.146Z","repository":{"id":77066107,"uuid":"96826868","full_name":"Blizzard/s2client-api","owner":"Blizzard","description":"StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.","archived":false,"fork":false,"pushed_at":"2019-12-16T12:05:23.000Z","size":11577,"stargazers_count":1659,"open_issues_count":110,"forks_count":281,"subscribers_count":104,"default_branch":"master","last_synced_at":"2025-04-08T08:11:33.571Z","etag":null,"topics":[],"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/Blizzard.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":"2017-07-10T22:27:41.000Z","updated_at":"2025-04-03T14:35:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7963f81-8483-4de9-b814-7258b2e22f41","html_url":"https://github.com/Blizzard/s2client-api","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blizzard%2Fs2client-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blizzard%2Fs2client-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blizzard%2Fs2client-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blizzard%2Fs2client-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blizzard","download_url":"https://codeload.github.com/Blizzard/s2client-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801170,"owners_count":20998339,"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":[],"created_at":"2024-09-24T20:35:21.382Z","updated_at":"2025-04-08T08:11:43.122Z","avatar_url":"https://github.com/Blizzard.png","language":"C++","readme":"s2client-api\n============\n\n[![Build Status](https://travis-ci.org/Blizzard/s2client-api.png?branch=master)](https://travis-ci.org/Blizzard/s2client-api)\n\nThe 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.\n\nWhile 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.\n\n```C++\n#include \u003csc2api/sc2_api.h\u003e\n\n#include \u003ciostream\u003e\n\nusing namespace sc2;\n\nclass Bot : public Agent {\npublic:\n    virtual void OnGameStart() final {\n        std::cout \u003c\u003c \"Hello, World!\" \u003c\u003c std::endl;\n    }\n\n    virtual void OnStep() final {\n        std::cout \u003c\u003c Observation()-\u003eGetGameLoop() \u003c\u003c std::endl;\n    }\n};\n\nint main(int argc, char* argv[]) {\n    Coordinator coordinator;\n    coordinator.LoadSettings(argc, argv);\n\n    Bot bot;\n    coordinator.SetParticipants({\n        CreateParticipant(Race::Terran, \u0026bot),\n        CreateComputer(Race::Zerg)\n    });\n\n    coordinator.LaunchStarcraft();\n    coordinator.StartGame(sc2::kMapBelShirVestigeLE);\n\n    while (coordinator.Update()) {\n    }\n\n    return 0;\n}\n```\n\nYou can find a detailed tutorial on what this code does in docs/tutorial1.md.\n\nDocumentation\n-------------\n\nYou can find API in documentation on our [github pages site](http://blizzard.github.io/s2client-api). The documentation is generated from code automatically, using [Doxygen](http://www.stack.nl/~dimitri/doxygen/)\n\nTo editor and generate the documentation yourself.\n\n1. Download and install [doxygen](http://www.stack.nl/~dimitri/doxygen/download.html#srcbin)\n2. Fork the repository and clone it locally\n3. Checkout the master branch 'git checkout origin/master -b my-documentation-update\n4. Make changes to the code documentation or docs/ files\n5. From the root of the project run: doxygen Doxyfile\n6. Review your documenation changes by opening docs/html/index.html in your browser\n7. Push your changes to your fork and send us a pull request\n\nBuilding\n--------\n\nThis library uses [CMake](https://cmake.org/download/) to generate project files. It builds with [Visual Studio](https://www.visualstudio.com/downloads/) on Windows and Makefiles on the other platforms. It relies on the following contrib packages. \n\n1. Civetweb\n2. Protobuf\n3. (optional) SDL\n4. ipv6-parse\n\nFollow the instructions for submodules and building in [docs/building.md](docs/building.md).\n\nCoding Standard\n---------------\n\n[Coding Standard](https://google.github.io/styleguide/cppguide.html)\n\nWe do our best to conform to the Google C++ Style Guide with the exception that we use four space tabs instead\nof two space tabs.\n\nAdditional Downloads\n----------------\n\n### Maps and Replays\n\nThis repository only comes with a few maps for testing.\n\nAdditional maps and replays can be found [here](https://github.com/Blizzard/s2client-proto#downloads).\n\n### Precompiled Libs\n\nIf you are using Visual Studio 2017 and just want precompiled library files you can download the following package:\n\n[Precompiled Libs](http://blzdistsc2-a.akamaihd.net/SC2API_Binary_vs2017.zip)\n\n### Other Libraries\n\nAdditional community built AI libraries can be found [here](https://github.com/Blizzard/s2client-proto#community).\n\nIf you are new to programming, the [CommandCenter](https://github.com/davechurchill/CommandCenter) framework may be a good starting point.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblizzard%2Fs2client-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblizzard%2Fs2client-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblizzard%2Fs2client-api/lists"}