3
\$\begingroup\$

I am trying to make my first Tile-game using XNA. I have no problem drawing the map layers using TiledLib from codeplex, but, now I want to give sprite an (order) to move to a specific position on map, by selecting the sprite (left mouse click) and then right mouse click somewhere on the map to specify the target position. I don’t know what is the best practice to move sprite this way, considering that there may be collision objects in the direct path.

What is the best practice to do this? Is there any demo covering this issue?

BTW: I couldn’t upload snapshot because of my low score :(

\$\endgroup\$
1
  • \$\begingroup\$ If you put a link to the image somewhere, one of us higher-rep'd users will edit it in :) \$\endgroup\$ Commented Mar 6, 2011 at 11:31

1 Answer 1

2
\$\begingroup\$

You may want to look up the A* pathfinding algorithm and some material explaining it.

\$\endgroup\$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .