a* pathfinding

Blitz3D Forums/Blitz3D Programming/a* pathfinding

RGF(Posted 2010) [#1]
Greetings!

To people working in pathfinding, waypointing, and AI routines (Hey Ross C, are you still working in your awesome waypoint editor?):

I've been investigating about [a*], and wrote down some decent functions, based on a*... hard maths inside, but user-friendly, just like writing:

FindPath(unit.unit,unit\targetX,unit\targetY)

and I would like to share code and comments about it, and exchange opinions with people interested in these questions. The fact is that I have too much information, and coded a lot, and don't know how to start. So, please if you are interested in AI-pathfinding routines, please join this topic.

Thanks


Ross C(Posted 2010) [#2]
I was basically finished it, except from the save code, and load code. I suppose i could work on that, but i got some other stuff on just now, for someone :) I'll see what i can do.


RGF(Posted 2010) [#3]
Ok!! For anyone interested in a*, there is some stunning visual C++ and Blitzbasic code, done by Patrick Lester (a smart guy indeed), downloadable at:

http://www.policyalmanac.org/games/aStarTutorial.htm

Ever wondered how enemy units in Warcraft 2 & 3, Diablo and other RPG-RTS managed to find paths and routes leading to players, resources and friendly units?

Ever tried to code how should an enemy behave when patrolling an area? ...when randomly moving in scenarios? ...when seeing nearby players, and heading towards them looking for trouble? ...when fleeing from combat? ...when seeking someone to fight? ...when hiding from other enemies?

What about when there are 50 enemy units and 25 friendly units on screen, triying to find their ways to fight each other, flee, patrol... at the same time?

Anyone got stuck (like I got stuck before) with a half-finished project, having designed many nice 3d animated models (that won't behave), a lot of trees, houses, 2d icons and menus, scenery and lots of props, code for menus, code for bullets, even code for network gaming... and got that sense of missing the real GAMEPLAY present in RPG and RTS games? Maybe you need some A*...