开发者

Trigger for tower game in C# for wp7 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_开发技巧

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 8 years ago.

Improve this question

I was thinking about building a tower defence game and was trying to find the best way to find the shortest path to the other side.

How can i do this?


I know I need to re evaluate the path on every move due to people adding more towers. I am thinking I need to use visualtreehelper to find what is in the way.


This might be better asked at https://gamedev.stackexchange.com/

You don't need to re-calculate the path all the time, only when a tower is created or destroyed.

The A* algorithm would be commonly used, there are many samples around. Making your game tile-based would simplify its use, as each tile would be a node, and it's trivial to work out the connections (i.e. up/down/left/right, providing the node isn't blocked).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜