Moving around/avoiding obstacles

Posted by János Harsányi on Game Development See other posts from Game Development or by János Harsányi
Published on 2011-02-23T15:38:12Z Indexed on 2011/02/23 23:34 UTC
Read the original article Hit count: 351

Filed under:
|

I would like to write a "game", where you can place an obstacle (red), and then the black dot tries to avoid it, and get to the green target.
I'm using a very easy way to avoid it, if the black dot is close to the red, it changes its direction, and moves for a while, then it moves forward to the green point.
"Unrealistic" path

How could I create a "smooth" path for the computer controlled "player"?
Edit: Not the smoothness is the main point, but to avoid the red blocking "wall" and not to crash into it and then avoid it.

How could I implement some path finding algorithm if I just have basically 3 points?
(And what would it make the things much more complicated, if you could place multiple obstacles?)
Smooth path

© Game Development or respective owner

Related posts about ai

Related posts about path-finding