How to make Isometric Path found, look smoother/realistic?

Started by
1 comment, last by nex7 17 years, 10 months ago
Hi, I have finally completed my Isometric Editor in VB. It works perfectly. Even the Pathfinding almost working right. But still got one issue... My A* Pathfinding code seems to find the path properly, but the path found always seems to be "L" shaped, if the "Y" pos of the destination tile is not same. (My Isometric Editor supports Staggered Isometric Maps Only. Dunno if this makes any different in the pathing method) Some thing like this: 1) Top to Bottom <><><><><><><><><><> <> <> <> <> <> 2) Bottom to Top <> <> <> <> <> <> <><><><><><><><><><> Hope U got the idea, of what I m trying to say. I wanted to know how to make the path found look more realistic and not L Shaped. Like : 1) <>  <>   <>    <>     <>      <> or 2) <><>       <>        <>         <>          <>           <> Please guide me Thank U [Edited by - sam_roshan on June 14, 2006 2:07:40 AM]
SamRock
Advertisement
Personally found nearly all the problems people have with A*, and your problem included, are in the bit that determines which of the paths presented is the path of least weight. Seems pretty obvious from what you presented that your code determines one axis to be of height weight than others, or to consider turning to be of high weight [goes in a straight line until can't any longer]. Try squaring the individual axis, and adding those results together, and taking the lowest of those to be the next node of exploration. That'll give you a more accurate view of actual distance, and you'll get the jagged path you're looking for more akin to a straight line.
great article here

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

This topic is closed to new replies.

Advertisement