Well, to the point then. cbAStar is a function library that allows you to implement an easy-to-use and powerful pathfinding system into your CB projects. The actual library consists of one .cb source code file which does all the tricks so there is no need for DLL's or any other external libraries.
As the library's name stands, cbAStar uses the A* algorithm (A Star) as its base functionality. Towards it have been made a bunch of functions to advance the library's abilities and to make it more easier to be implemented. Shortly said, the A* algorithm finds a path by comparing a starting node's (node = cell = square = tile = what ever you want to call it) adjacent nodes to each other and estimating which of them would give the best way to an ending node. The estimation is done by calculating movement cost to an intended node and a very cautious evaluation of lenght of the path that is still left from the node. The algorithm will select a node that has a lowest estimation. This loop is continued until a path is finally found or until all possible nodes are scanned and a path cannot be found.
cbAStar is designed to suit games that uses different kind of engines. You can use CoolBasic's inbuild tilemaps in your game and cbAStar initializes just amazingly with your game. Or you can have whatever engine for your game's maps and you are still able to logically implement the library into your game. cbAStar does not move any objects - it just gives the programmer instructions on how to move them. So therefore the library is not tied in objects. You can use objects in your game or you can do everything with images.
The whole packet contains the following items:
- cbAStar library source code
- Wide documentation
- Example game to test the system in action with a tilemap (+ three media files related to it. The same files can be found in CoolBasic's Media folder).
- Example program to test all of the system's features in a grid based view.
- Logo to be used in your games if you wish.
Things that could have been done better in the library (and probably will be developed):
- Documentation: My English is not excellent. So you are free to send me PM everytime your inbuild English parser throws an syntax error or you see non-standard expressions while interpreting the documentation.
- Documentation: Maybe a HTML format would be better than TXT, but that would take too much time. Maybe I'll make a HTML documentation later.
- If a path is followed accurately, an object (or a character) can have at most eight different moving directions (which isn't much). Well, maybe this can be twisted some how.
The current version of the library is 1.0, so it is ready to be used at full volume. There may be coming a 2.0 version some time. Atleast if I get enough new developing ideas and time for it.
The license is attached to the documentation so I'm not gonna paste it here. But the main point of the license is that the library is free and modifiable when used in non-commercial products. But refer to the actual license to see that more closely.
And what for did I originally decided to start making this library? I'm developing a long game project named Madot 4 and I was not satisfied with its current pathfinder. So I decided to spend many, many hours on developing a much more powerful pathfinder. And I'm pleased with the results.
Download cbAStar 1.0.0 as a ZIP from GitHub
cbAStar GitHub project page
2010-01-27: I've been playing with my webhost domain for the past couple of months. During that time I've maged to take cbAStar offline and broke the link above. Now it's back online with an updated link. If the link dies again, you can always contact me by e-mail: jare(insert the character here)kpelit.net so I will know to fix the link again.
2020-09-21: The old download link was broken for many years. Now the library is available in GitHub (links above). And it's been ten years since I last edited this post. Let's see if I'll edit it again in 2030.