{"id":13677405,"url":"https://github.com/ocraft/ocraft-s2client","last_synced_at":"2026-01-14T02:29:04.933Z","repository":{"id":30748706,"uuid":"111026852","full_name":"ocraft/ocraft-s2client","owner":"ocraft","description":"  StarCraft II Client - Java library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.","archived":false,"fork":false,"pushed_at":"2024-12-08T14:37:10.000Z","size":17168,"stargazers_count":55,"open_issues_count":7,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-05T09:04:41.060Z","etag":null,"topics":["ai","artificial-intelligence","java","starcraft-ii","starcraft-ii-bot","starcraft2"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ocraft.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2017-11-16T21:58:20.000Z","updated_at":"2025-05-20T13:13:20.000Z","dependencies_parsed_at":"2023-01-14T17:45:24.832Z","dependency_job_id":"cb15d50e-d0b4-49e7-b894-a005ef20f992","html_url":"https://github.com/ocraft/ocraft-s2client","commit_stats":null,"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"purl":"pkg:github/ocraft/ocraft-s2client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocraft%2Focraft-s2client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocraft%2Focraft-s2client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocraft%2Focraft-s2client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocraft%2Focraft-s2client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocraft","download_url":"https://codeload.github.com/ocraft/ocraft-s2client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocraft%2Focraft-s2client/sbom","scorecard":{"id":701560,"data":{"date":"2025-08-11","repo":{"name":"github.com/ocraft/ocraft-s2client","commit":"c2a932487c47810ab76c78f7135b3b8b5b7a9793"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":2,"reason":"Found 6/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h46c-h94j-95f3","Warn: Project is vulnerable to: GHSA-wf8f-6423-gfxg","Warn: Project is vulnerable to: GHSA-3x8x-79m2-3w2w","Warn: Project is vulnerable to: GHSA-57j2-w4cx-62h2","Warn: Project is vulnerable to: GHSA-jjjh-jjxp-wpff","Warn: Project is vulnerable to: GHSA-rgv9-q543-rqg4","Warn: Project is vulnerable to: GHSA-735f-pc8j-v9w8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T05:19:45.672Z","repository_id":30748706,"created_at":"2025-08-22T05:19:45.672Z","updated_at":"2025-08-22T05:19:45.672Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","artificial-intelligence","java","starcraft-ii","starcraft-ii-bot","starcraft2"],"created_at":"2024-08-02T13:00:41.661Z","updated_at":"2026-01-14T02:29:04.917Z","avatar_url":"https://github.com/ocraft.png","language":"Java","funding_links":[],"categories":["Software Packages","APIs"],"sub_categories":["Java APIs"],"readme":"ifdef::env-github[:outfilesuffix: .adoc]\n\n[[ocraft]]\n= Ocraft S2Client\n\nimage:https://img.shields.io/badge/license-MIT-brightgreen.svg[alt=\"MIT License\"]\n\nThe StarCraft II Java API provides access to in-game state observation and unit control. The API is a wrapper around protobuf\ndefined protocol over a websocket connection.\n\n.Discord Server\n* Unofficial server for discussing AI questions and projects.\n* https://discordapp.com/invite/Emm5Ztz[Invite Link] // see #java-api channel\n\n.Documentation\n*link:http://ocraft.github.io/ocraft-s2client[]*\n\n[[ocraft.bot]]\n== Ocraft S2Client Bot\n\nOcraft Bot is a Java port of Blizzard's C\\++ Api for Starcraft 2. All of documentation and user-experience of C++\nsc2client-api should be valid or similar by analogy in this Java Api. More info about C++ Api:\n\n* https://github.com/Blizzard/s2client-api\n* https://blizzard.github.io/s2client-api/\n\n.Maven\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.ocraft\u003c/groupId\u003e\n    \u003cartifactId\u003eocraft-s2client-bot\u003c/artifactId\u003e\n    \u003cversion\u003e0.4.21\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n.Examples\n\nhttps://github.com/ocraft/ocraft-s2client/tree/master/ocraft-s2client-sample[Examples are provided in ocraft-s2client-sample module.]\n\n[source,java]\n----\npackage com.github.ocraft.s2client.sample;\n\nimport com.github.ocraft.s2client.bot.S2Agent;\nimport com.github.ocraft.s2client.bot.S2Coordinator;\nimport com.github.ocraft.s2client.protocol.data.Abilities;\nimport com.github.ocraft.s2client.protocol.game.BattlenetMap;\nimport com.github.ocraft.s2client.protocol.game.Difficulty;\nimport com.github.ocraft.s2client.protocol.game.Race;\nimport com.github.ocraft.s2client.protocol.unit.Alliance;\n\npublic class SampleBot {\n\n    private static class TestBot extends S2Agent {\n\n        @Override\n        public void onGameStart() {\n            System.out.println(\"Hello world of Starcraft II bots!\");\n        }\n\n        @Override\n        public void onStep() {\n            long gameLoop = observation().getGameLoop();\n\n            if (gameLoop % 100 == 0) {\n                observation().getUnits(Alliance.SELF).forEach(unitInPool -\u003e\n                        actions().unitCommand(\n                                unitInPool.unit(),\n                                Abilities.SMART,\n                                observation().getGameInfo().findRandomLocation(), false));\n            }\n        }\n\n    }\n\n    public static void main(String[] args) {\n        TestBot bot = new TestBot();\n        S2Coordinator s2Coordinator = S2Coordinator.setup()\n                .loadSettings(args)\n                .setParticipants(\n                        S2Coordinator.createParticipant(Race.TERRAN, bot),\n                        S2Coordinator.createComputer(Race.ZERG, Difficulty.MEDIUM))\n                .launchStarcraft()\n                .startGame(BattlenetMap.of(\"Lava Flow\"));\n\n        while (s2Coordinator.update()) {\n        }\n\n        s2Coordinator.quit();\n    }\n\n}\n----\n\nIf you are interested in the inner working of the game protocol or you want to have low access to the game api for\nspecific purposes, check link:ocraft-s2client-api/README.adoc[ocraft-s2client-api] module which is a low level api on\ntop of which ocraft-s2client-bot is build.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focraft%2Focraft-s2client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focraft%2Focraft-s2client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focraft%2Focraft-s2client/lists"}