Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a tile based isometric map and an A* algorithm that returns a path. I am looking to smooth this path efficiently but with good aesthetics. Basically i am using my grid for building the map and pathfinding but i want the player, enemies and certain types of objects to be detached from this grid.

I can think of a line of sight implementation where i start at the first tile of the path, from there check each further tile if i have a clear path straight to it. And repeat from there.

share|improve this question
    
You can have a look at one of my older answer, if it is what you are looking for. –  wondra Aug 31 at 12:01

1 Answer 1

What you're looking for might be more of a steering technique than a path finding technique.

There is a simple steering technique that you can use when there are no dynamic obstacles. Since you already use A* you have the skeleton of a path (regions connected by straight lines). By having your agent move directly towards the furtherst point on the path it can see the path is automatically smoothened and shortened.

This approach creates smooth paths since each frame the agent will be able to look a tiny bit further, which will lead to tiny adjustments to its rotation.

This approach creates short paths since each frame it will move a bit closer on a straight line to the furthest visible point. There is no shorter path between two points than a straight line.

Of course when you add dynamic obstacles such as other agents path following becomes a lot more difficult but as a basis this is a very nice way to do it. You might want to look up papers which mention velocity obstacles and force and velocity based steering.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.