2D pathfinding - finding smooth paths

Posted by Kooi Nam Ng on Game Development See other posts from Game Development or by Kooi Nam Ng
Published on 2012-11-03T13:31:33Z Indexed on 2012/11/04 17:17 UTC
Read the original article Hit count: 315

I was trying to implement a simple pathfinding, but the outcome is less satisfactory than what I intended to achieve. The thing is units in games like Starcraft 2 move in all directions whereas units in my case only move in at most 8 directions (Warcraft 1 style) as these 8 directions direct to next available nodes (they move from a tile to next neighboring tile). What should I do in order to achieve the result as in Starcraft 2? Shrink the tile size?

http://i.stack.imgur.com/lr19c.jpg

On the picture you can see a horizontal line of rock tiles being obstacles, and the found path marked as green tiles. The red line is the path I want to achieve.

© Game Development or respective owner

Related posts about game-design

Related posts about game-mechanics