-------------------
| * |
| |
---- ----
A
where * is the player and A is the place AI got stuck on.how on earth the AI gonna know the right way of doing it is to trace the wall around the right rather than to the left and trace forever?i would be really appreciated if anyone can give me an advie.thanks.
[edited by - jimywang on April 14, 2004 5:51:37 PM]
[fixed the code box -Si]
[edited by - SiCrane on April 14, 2004 6:33:43 PM]
contour tracing obstacle avoidance question
ive learnd a technique which is mentioned in windows game programming guru called contour tracing.it is basically said that when object hits a obstacle then trace around the edge of the obstacle until a clear path is found.i tried it in my game but found a serious problem with it.image the suitation is like this
You could make a maxiumum trace amount, and then trace the other way. Just say like,
int traceLeft()
{
...
if pixelsTraced > maxTrace then
{
traceRight;
return 0;
}
...
return openPoint;
}
Or something along those lines.
int traceLeft()
{
...
if pixelsTraced > maxTrace then
{
traceRight;
return 0;
}
...
return openPoint;
}
Or something along those lines.
"how on earth the AI gonna know the right way of doing it is to trace the wall around the right rather than to the left…."
WHO told it to trace to the left??
Stevie
Don''t follow me, I''m lost.
WHO told it to trace to the left??
Stevie
Don''t follow me, I''m lost.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement