Table of Contents
Required Software
-
StarCraft Brood War 1.16.1, StarCraft can be purchased here
-
Microsoft Visual C++ 2008, the express edition of Microsoft Visual C++ is freely available here
-
Native Microsoft Windows XP/Vista (Windows 7 seems usable as well)
-
Broodwar uses DLL injection and therefore is unlikely to work in Wine or a virtual windows environment
-
Windows 7 support has not been tested
-
Mac is not supported
-
Seting up Broodwar
-
Install StarCraft, the Brood War expansion, and upgrade to version 1.16.1. Logging on to battlet.net will automatically cause StarCraft to upgrade to the most recent patch
-
Install Visual C++
-
Extract the Chaos Launcher to: C:\program files\starcraft\chaoslauncher
-
Extract the newest BWAPI Beta release to: C:\program files\starcraft\BWAPI
-
Copy files from C:\program files\starcraft\BWAPI_Beta\chaoslauncher to C:\program files\starcraft\chaoslauncher
-
Copy files from C:\program files\starcraft\BWAPI_Beta\Starcraft to C:\program files\starcraft
-
Copy files from C:\program files\starcraft\BWAPI_Beta\WINDOWS to C:\WINDOWS
-
This step might not be necessary on all platforms. If you are unsure about throwing DLL files into your windows directory, you can try skipping this step.
-
Compiling the Bot
-
Open the example AI project C:\program files\starcraft\BWAPI_Beta\ExampleAIModule\ExampleAIModule.sln
-
The important files in the solution are:
-
ExampleAIModule.h defines the interface to the bot
-
ExampleAIModule.cpp defines the bot's behavior
-
-
Compile the project as a RELEASE.
-
Change the dropdown box in the top center of the window from “Debug” to “Release”.
-
Click Build → Build Solution.
-
The example bot is now compiled into a dll
-
The bot dll is located at C:\program files\starcraft\BWAPI_Beta\ExampleAIModule\release\ExampleAIModule.dll
-
-
Copy the dll from C:\program files\starcraft\BWAPI_Beta\ExampleAIModule\Release\ExampleAIModule.dll to C:\program files\starcraft\bwapi-data\AI\ExampleAIModule.dll
Running the Bot
-
Run the chaos launcher: C:\program files\starcraft\chaoslauncher\Chaoslauncher.exe
-
set the path to starcraft, under the settings tab, set the path to: C:\program files\starcraft
-
select the bwapi checkbox, uncheck all others
-
select the w-mode checkbox if you want to run starcraft in windowed mode
-
-
click start to launch starcraft
-
create a single player match
-
Start the game
-
The agent should print out the following message:
-
BWAPI: Loaded the AI Module: bwapi-data\AI\ExampleAIModule.dll
-
-
The bot will print a summary of the game state to the console every few seconds
-
If the bot does not start up, check the log files at C:\program files\starcraft\bwapi-data\log or check the FAQ