From: xmerm05 AT vse DOT cz (Michal Mertl) Newsgroups: comp.os.msdos.djgpp Subject: Re: Astar (A*) algorithm Date: Tue, 26 Aug 1997 14:24:42 Organization: University of Economics - Prague, CZ Lines: 15 Message-ID: NNTP-Posting-Host: s019h14.vse.cz To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I'm sorry it's off topic, but I know lot of people here uses Alelgro->is interested in writing games->is interested in pathfinding alg. I'd rather send it by personal mail to the guy who asked for it, but don't have address. I posted yesterday a* alg implementation which supported only two types of terrain empty/wall and wrote that i believed it can be easily expanded to support more. So now it supports (virtually) unlimited number of kinds of tiles and one which is impassable (to restrict alg go off the map). It was easy, I only changed FreeTile to GetTileCost and added to g that cost instead of 1. Also you may have to change h function which was (dx-sx)*(dx- sx)-(dy-sy)*(dy-sy) to sqrt ... - it gives much better results. It ussually finds the best way, but sometimes fails a little bit :-( don't know why. Michal 'MiMe' Mertl e-mail:XMERM05 AT vse DOT cz