Simple 2d game pathfinding
- by Kooi Nam Ng
So I was trying to implement a simple pathfinding on iOS and but the outcome seems less satisfactory than what I intended to achieve.The thing is units in games like Warcraft and Red Alert move in all direction whereas units in my case only move in at most 8 directions as these 8 directions direct to the next available node.What should I do in order to achieve the result as stated above?Shrink the tile size?
The screenshot intended for illustration.
Those rocks are the obstacles whereas the both ends of the green path are the starting and end of the path.The red line is the path that I want to achieve.
http://i.stack.imgur.com/lr19c.jpg