Releases: RnDome/bwapi-c
Version 1.0
This release comes with three features: OpenBW
support, issueCommand
and registerEvent
.
Starting from this release BWAPI-C
comes with OpenBW
libraries, thus the library and the examples support both OpenBW
and original Starcraft: Brood War
🚀
RegisterEvent
can be used to emulate events, hence to relax the dependencies between different parts of the program.
The feature is applicable to 6 object types, and prefixed correspondingly:
Bullet_registerEvent
Force_registerEvent
Game_registerEvent
Player_registerEvent
Region_registerEvent
Unit_registerEvent
The example can be found, as usual, in example DLL:
if (frame_count == 150) {
// registerEvent test
Game_registerEvent(Broodwar, ®isterEventHandler, NULL, 10, 0);
}
Here the function registerEventHandler
is called 10 frames starting from frame 150.
The function issueCommand
can be used to issue the same command, (e.g. move
) to the group of units. It is equivalent to looping over a collection of units, however it is more convenient to use issueCommand
for this purpose.
Version 0.3
This release brings new iterators as well as code refactoring. Also, some bugs were fixed so we strongly recommend to update.
New iterators were added:
PositionIterator
TilePositionIterator
EventIterator
UnitTypeIterator
Note that these iterators yield pointers to values that are represented by plain C structures instead of opaque pointers to BWAPI objects.
These iterators are now used in functions like:
Game_getNukeDots()
Game_getEvents()
Game_getStartLocations()
Unit_getTrainingQueue()
You may check out the example DLL for usage hints.
At this point nearly all BWAPI is wrapped so after some testing we'll probably do the major release.
Version 0.2
We're happy to announce version 0.2 that covers new API and fixes several issues.
The most important changes are:
- Client mode was added! It is now possible to write bots as separate processes.
- Filters API was implemented which simplifies queries like: "give me nearest drones within N pixels"
- Build script was fixed: currently
BWAPI.dll
is deployed in archive, not theBWAPI.lib
Version 0.1
This release covers almost all BWAPI 4.2.0 functions except those returning lists and working with filters. Also future releases will include more const qualifiers.
We tested the release poorly with example AI module written in C and in Rust. Help wanted!