Sign in to follow this  
sam_roshan

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

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this