[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: [pygame] Implementing the A* finder algoritm in a non tile-based game



On Sun, 1 Feb 2009 13:47:04 +0100, Luca <lucafbb@xxxxxxxxx> wrote:
> Hi all.
> 
> I'm writing a game where I need to give to enemies a strong AI. This
> will lead me to obtain a path finding algoritm to reach target
> location.
> 
> All example I can find on the web are related to games based on tiles.
> Anybody has experience on this problem and can help me, or point me to
> a good documentation somewhere?

Yes, looking at that recent thread would be a good idea.

As was noted there, A* isn't dependent on tiles. With a smooth, tileless
map for instance, you could instead sample points N distance units apart.
Or you could treat the map as a set of nodes that has little or no relation
to normal geography; eg. a network of hyperspace routes in a sci-fi game.
The algorithm should work in exactly the same way.