-
Notifications
You must be signed in to change notification settings - Fork 2
StarCraft Setup BWAPI
This howto works only on Windows machines. There should be a way to get it working on Mac and Linux using Wine. Initially the idea was to upgrade this version to BWAPI4 but due to some issues with C++11 and SWIG and how BWAPI is currently providing its header files, I am unable (probably a skill issue on my side to upgrade).
- StarCraft with the Broodwars Expansion
- patch the game to Version 1.16.1
- Alternatively use the free StarCraft Remastered
- Visual Studio 2010 (Express) and if you want BWAPI Injector in Debug Mode Visual Studio 2008 (Express)
- BWAPI 3.7.4
- Install the game and patch to version 1.16.1
- (the patch needs to be run as administrator otherwise it won't install)
- for simplicity and future reference I assume you installed the game into
C:\Program Files (x86)\StarCraft
- download and unpack/install BWAPI
- use a location where you normally store projects, lets assume
C:\Users\[User]\Documents\Projects\BWAPI
- use a location where you normally store projects, lets assume
- copy the Chaos Launcher into your StacrCraft folder
C:\Program Files (x86)\StarCraft\chaoslauncher
- give the Chaos Launcher admin priviliges otherwise some things simply won't work
- Copy all files from inside
C:\Users\[User]\Documents\Projects\BWAPI\Starcraft
intoC:\Program Files (x86)\StarCraft
(do not copy the folder like you did with the Chaos Launcher) - install
C:\Users\[User]\Documents\Projects\BWAPI\vcredist_x86
as well otherwise you could run into an issue where the game will tell you you are missing a library - copy the four files (
mpfr-vc90-mt-gd.dll
,mpfr-vc90-mt.dll
,gmp-vc90-mt-gd.dll
,gmp-vc90-mt.dll
) from the BWAPI WINDOWS into two of your Windows installation folders (system32
,SysWOW64
) - if you want to run debug builds you need to install Visual Studio 2008 (Express)
Now its time to test if everything works so far:
- Start the Chaos Launcher
- switch on W-mode to start the game in a regular sized window
- The game folder in the settings tab should be correct
- The bottom drop down menu should show "StarCraft 1.16.1"
- Start the game
- If everything worked to game will pop up as a 640x480 window, if it goes full screen you missed switching on
W-mode
in the Launcher. If the game does not start check that the Launcher has admin priviliges and that the install path in the setings screen is correct.
- Quit the game... We now are ready to set up BWAPI and a template project
After having all the basics installed building the example Client and testing it is the next step.
- open the "Example Project" solution and build the ExampleAIClient in Release Mode.
- in
C:\Users\[User]\Documents\Projects\BWAPI\[Release]
you will find theExampleAiClient.exe
- start Chaos Launcher
- make sure the "Release" BWAPI injector is selected
- start the game
- start the ExampleAiClient by double clicking it
- the Command Window should now show something like this:
Connecting...
0 | 6692 | 0 | 27603503
1 | 0 | 0 | 0
2 | 0 | 0 | 0
3 | 0 | 0 | 0
4 | 0 | 0 | 0
5 | 0 | 0 | 0
6 | 0 | 0 | 0
7 | 0 | 0 | 0
Connected
Connection successful
waiting to enter match
- now start a "MultiPlayer Game"
- Select "Expasion Mode"
- Select "Direct IP"
- everything now depends basically on what you want to do, however the human player will be controlled by the ExampleAI
- if you see a printout on screen showing some statistics and the command promt contains
starting match!
everything worked.
- you could develop your own agent using BWAPI and programming it in
C++
- you could set up the BWAPI-Mono-Bridge to develop in
C#
and use POSH-sharp to develop behaviour-based agents
- if you get following error:
Could not load Plugin "C:\StarCraft\Chaoslauncher\BWAPI_ChaosLauncherInjectord.bwl" Error: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (14001)
check that you installed Visual Studio 2008 (express) or if you do not want to inject debug code remove the BWAPI_ChaosLauncherInjectord.bwl
file from the ChaosLauncher folder