Monday, July 2, 2018

c# - Dynamic pathing algorithm for tower defense game


I'm making a Tower Defense and I need a good pathing algorithm for it.



I have thought about Dijkstra but I need one that can be dynamic; it must be able to update itself when one edge is removed or added without a full recalculation.


I'm coding in C# if it helps.



Answer



You'll generally want to use A*, unless there's something importantly different you're looking for.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...