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

Re: [pygame] Pathfinding



Yanom Mobis wrote:

> I need to have an npc take a relatively short route from a to b.
> First priority isn't the shortest distance, it's getting there without getting stuck
> My game is in a futuristic setting, so taking the shortest path without exploring too much 
>    is reasonable because they would have GPS and the like.

Ah, then you have two options, as I see it.

a) make the game a little more futuristic and give them bionic armour so
they can just walk in a straight line and the obstacles bounce out of
the way.  (teleport machines would also work).

b) read some of the messages and links and code that people have sent
you and realise that A* is not inherently tile based, and that A* is not
the only solution that has been explained.

Douglas