Question about Bot Factory

1 view
Skip to first unread message

therooser

unread,
Feb 19, 2010, 12:42:45 PM2/19/10
to BWAPI JBridge
I've got my BotFactory working just fine, but I was wondering at what
point the "get bot" method gets called. Do I have access to all the
information I would have access to when onStart() gets called? Or does
my factory and my bot class get loaded before the game even starts?
I'm asking because I'd like to be able to have my BotFactory class
analyze the map and/or check the race and such before returning a
particular bot.

I can still implement this functionality by just making one bot that
acts as a wrapper for my own set of bot classes, but it would be
easier and cleaner to do it inside the factory class.

Thanks!

cretz

unread,
Feb 22, 2010, 11:24:35 AM2/22/10
to BWAPI JBridge
Assuming you are using trunk, the BridgeBotFactory (http://bwapi-
jbridge.googlecode.com/svn/tags/0.2-alpha/bwapi-bridge/etc/docs/api/
org/bwapi/bridge/BridgeBotFactory.html) has a Game parameter. You do
have access to everything you would w/ onStart. Reason is, I call the
load method in the delegator in onStart (http://code.google.com/p/
bwapi-jbridge/source/browse/trunk/bwapi-bridge/etc/cpp/bwapi-bridge/
BridgeAIModule.cpp#177)

Note, I hope to have significant improvements coming, but my day job
is taking quite a bit of my time.

Reply all
Reply to author
Forward
0 new messages