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

Re: [pygame] Pathfinding



My game isn't tile-based (probably, I haven't made it yet), but it is 2-d

--- On Mon, 1/26/09, NBarnes <nbarnes@xxxxxxxxx> wrote:

From: NBarnes <nbarnes@xxxxxxxxx>
Subject: Re: [pygame] Pathfinding
To: pygame-users@xxxxxxxx
Date: Monday, January 26, 2009, 6:10 PM

> it seems to me that A* only works on tile-based games.
> What if my game isn't tile-based?

A* works on 'nodes', where a node is just some location defined in the
game space.  Tile-based games have a very obvious node structure to
them, and so A* is very easily adapted to them.  But, really, there's
not necessarily a lot of difference between applying A* to a
tile-based game on the one hand and a network of location-nodes in a
3d space on the other.