CsharpAI - suegy/bwapi-mono-bridge2 GitHub Wiki
Setting up Visual Studio 2010 to build your own StarCraft AI
This page concentrates on configuring VisualStudio 2010 to build an example AI and configure everything to build and test your own agents.
Prerequisites:
- have StarCraft installed and patched it to version 1.16.1
- downloaded and installed BWAPI and the BWAPI-mono-Bridge2
- Visual Studio 2010 (express) [download VS2010 express]
NOTE: Newer Version o Visual Studio should work as well but as Microsoft also delivers a new compiler each time, issues and incompatibilities are possible.
How to set up Visual Studio 2010:
- your BWAPI-mono-bridge2 should contain three sub-folders: Source,required,Release
- If you followed the previous guides the
Source\Common\SWIG\Classes\BWAPI
should either contain freshly baked interfaces to BWAPI, or if you did not build them now the latest build from the repository you can re-heat. - The
Source\Common\SWIG\Wrapper
folder should contain three files which are wrapping the underlying BWAPI C++ API for you. If the folder is empty try following the previous guide to rebuild them, or check out from repo again.
POSHsharp or not?
Using- if you want to use POSH do the following before continuing:
- create a new folder "scbot.git" in your bridge
Source
folder, e.g.C:\Users\[User]\Documents\Projects\BWAPI 3.7.4\bwapi-mono-bridge2.git\Source\scbot.git
git clone https://github.com/suegy/scbot.git
intoscbot.git
- create a new folder "scbot.git" in your bridge
- open the bwapi-clr-client Solution in
\bwapi-mono-bridge2.git\Source\bwapi-clr-client
NOTE: currently all bots in Client Mode require Visual Studio to be run as Administrator. So, if you want to test your agent you need to start VS with admin rights. Otherwise your client is not able to inject the information into the game.
If you do not want to, or forgot to setup the POSHBots you will get an error message that two projects could > not be found: POSH-Launcher and POSH-StarCraftBot
- If you do not want to use POSH simply remove those projects. However, if you just made a mistake or renamed the scbot.git folder, still remove both projects but then add them anew with the correct path by right clicking on the Solution in Visual Studio -> "Add..." -> "Existing Project" and then select the directory where you put each project.
- now simply start the ChaosLauncher in admin mode and select the "Release" injector.
- compile first bwapii-native then bwapi-clr and then tesbot
- right click on testbot and select "Debug" and run the testbot.