google-code-export / bwapi-mono-bridge

Automatically exported from code.google.com/p/bwapi-mono-bridge
0 stars 0 forks source link

Unexplained crash after gathering 4-6 mineral (depending on localspeed) #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile the attached StarcraftBot.cs and run as embeddedBot
2. Astral Balance map. Bot race Terran.
3. Run at localSpeed 50 (default)
4. Crash occurs at 48 minerals as the scv to delivers the minerals to increase 
til 56.

What is the expected output? What do you see instead?
The bot should continue running and build more SCVs, depots, barracks and 
marines.

The game crashes

What version of the product are you using? On what operating system?
BWAPI 3.2Beta
bwapi-mono-bridge 3.2b
Windows XP SP3
Starcraft 1.16.1

Please provide any additional information below.
The bot worked in 2.6.1 with embedded mono-bridge 0.5. I copied the code to the 
new StarcraftBot.cs project and compiled it without problems. However it 
crashes consistently at this point with no explaination. Despite try/catchs on 
all actions.

Original issue reported on code.google.com by jgrot...@student.aau.dk on 26 Oct 2010 at 8:10

Attachments:

GoogleCodeExporter commented 9 years ago
Btw i wanted to say great work upgrading to BWAPI 3.2beta. Makes testing so 
much easier :)

Original comment by jgrot...@student.aau.dk on 26 Oct 2010 at 8:10

GoogleCodeExporter commented 9 years ago
I can add now that i have copied almost identically the code to the original 
StarcraftBot.cs and the problem seems to have disappeared. Cant see the reason 
why but i seems to work now.

I attached the new file.

Original comment by jgrot...@student.aau.dk on 26 Oct 2010 at 9:44

Attachments:

GoogleCodeExporter commented 9 years ago
I'll investigate further but I am glad it is working for you now.

A tip for you though
instead of creating a new unit type to pass to the train() function, they are 
all declared in bwapi as properties prefixed with UnitTypes_ eg 
UnitTypes_Terran_Marine will return a UnitType of type Terran_marine. (A lot of 
the constants available in BWAPI are available with their namespace prefixed 
follod by the variable, check out the options in bwapi.

I'd put them in their own namespace, but the interface generator does not have 
that capability (yet).

Original comment by dpershouse@gmail.com on 27 Oct 2010 at 11:34

GoogleCodeExporter commented 9 years ago
I had not noticed that! Thank you:)

And again. The mono-bridge is working very well. It's alot easier to develop 
the AI in C# compared to C++ in mi opinion.

Good work!
-- Jonas

Original comment by jgrot...@student.aau.dk on 28 Oct 2010 at 7:46

GoogleCodeExporter commented 9 years ago

Original comment by dpershouse@gmail.com on 28 Oct 2010 at 11:42