Trigger for tower game in C# for wp7 [closed]
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 questionI 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).
精彩评论