Jump to content
  • Advertisement
Sign in to follow this  

Path finding ? Can I

This topic is 4821 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a Terrain which is just a single quad but very big. Ihave implemented - picking - collision det and resp. Now, My questions is, How can i implement the A* algo ( that is Can I implement the A* algo on my terrain which is flat and madeup of a single quad.)

Share this post


Link to post
Share on other sites
Advertisement
A* consists in finding a path in a graph. If you can build a graph from what is on your quad, then you will be able to apply A* to it. Generally, having a grid is an excellent way of creating such a graph, but there are other ways (for instance, creating graph nodes at the corners of polygonal obstacles and linking together nodes which are accessible with a straight trajectory without intersecting other objects).

Share this post


Link to post
Share on other sites
Quote:
Original post by hardik_ce
I have a Terrain which is just a single quad but very big.
Ihave implemented
- picking
- collision det and resp.

Now, My questions is, How can i implement the A* algo
( that is Can I implement the A* algo on my terrain which is flat and madeup of a single quad.)




You say the terrain is one quad, but you will have obstacles ????

Any terrain features ??? Or just the other objects will get in the way ???

If you have alot of moving objects, it might pay to plot them on an artificial grid
and use A*. If there are only a few, then some kind of collision avoidance - dodging/circling around blocking object immediately in front along the path to destination...

Share this post


Link to post
Share on other sites
First of thnx ppl 4 ur rep.

Now, The terrain is a quad just as in the MultiAnimation Eg. incl. in the MS DXSDK 9.0c summer 2004.

Secondly, I have just one static obstacle on it which is a BOX.
(More obstacles will be added)

So, I need a way by which i wont need to change my terrain and still be able to implement A*( or for that matter any other PF algo )

Thnx,
Hardik Malekar ( INDIA ).

Share this post


Link to post
Share on other sites
The answer was given above; create an arbitrary virtual grid which covers the terrain, mark certain squares as impassible if there are obstacles within them, and use A* on that grid.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!