Page Actions
Wiki Actions
User Actions
Submit This Story
Writing /alumni/bweber/.html/dokuwiki/data/cache/6/69ed4e605940d4eb2a65906d721d2e6c.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /alumni/bweber/.html/dokuwiki/data/cache/6/69ed4e605940d4eb2a65906d721d2e6c.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /alumni/bweber/.html/dokuwiki/data/cache/6/69ed4e605940d4eb2a65906d721d2e6c.xhtml failed

Setting up the Broodwar API

The following software is required:

  1. StarCraft Brood War 1.16.1, StarCraft can be purchased here
  2. Microsoft Visual C++ 2008, the express edition of Microsoft Visual C++ is freely available here
  3. Native Microsoft Windows XP/Vista
    • Broodwar API 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 API

  1. 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
  2. Install Visual C++
  3. Extract the Chaos Launcher to: C:\program files\starcraft\chaoslauncher
  4. Extract the Broodwar API to: C:\program files\starcraft\BWAPI
  5. Copy files from C:\program files\starcraft\BWAPI_Beta\chaoslauncher to C:\program files\starcraft\chaoslauncher
  6. Copy files from C:\program files\starcraft\BWAPI_Beta\Starcraft to C:\program files\starcraft
  7. 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

  1. Open the example AI project C:\program files\starcraft\BWAPI_Beta\ExampleAIModule\ExampleAIModule.sln
  2. The important files in the solution are:
    • ExampleAIModule.h defines the interface to the bot
    • ExampleAIModule.cpp defines the bot's behavior
  3. Compile the project as a RELEASE.
    1. Change the dropdown box in the top center of the window from “Debug” to “Release”.
    2. Click Build → Build Solution.
    3. The example bot is now compiled into a dll
    4. The bot dll is located at C:\program files\starcraft\BWAPI_Beta\ExampleAIModule\release\ExampleAIModule.dll
  4. 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

  1. Run the chaos launcher: C:\program files\starcraft\chaoslauncher\Chaoslauncher.exe
  2. set the path to starcraft, under the settings tab, set the path to: C:\program files\starcraft
  3. select the bwapi checkbox, uncheck all others
    • select the w-mode checkbox if you want to run starcraft in windowed mode
  4. click start to launch starcraft
  5. create a single player match
  6. Start the game
  7. The agent should print out the following message:
    • BWAPI: Loaded the AI Module: bwapi-data\AI\ExampleAIModule.dll
  8. The bot will print a summary of the game state to the console every few seconds
  9. If the bot does not start up, check the log files at C:\program files\starcraft\bwapi-data\log or check the FAQ
 
bwapi_install.txt · Last modified: 2009/11/11 22:33 by bweber     Back to top