[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Pathfinding
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Pathfinding
- From: René Dudfield <renesd@xxxxxxxxx>
- Date: Tue, 27 Jan 2009 12:17:25 +1100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 26 Jan 2009 20:17:31 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=H4IKIu8MeZbMJTObHJyv0I0Q5GK2voYq09UBatYQchA=; b=IAzaysRHZQHQqH/Hx5pUz4iGqhloLaQ8+lSZcGKpqZbK6bV6d/RvLBhMjdz5syBOld 2dmj+YmnbYjuB9WKNIwH9AKsH0qka+OuiBKnSV/cj+aTT31tCckPpldEvk6Nsent19kF 6kJ1yyV5J/zz1Vl41SpRrlAmPIA3hkh2AG/II=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=WEXI5MnYI4w12E4O9uLQpnUDcsA6Fg95cQWUgGSVLJUE5w8wkE2/FfTbtteSf+MA9N rboCyusoJlTOwOQ8H9xMg1cKlZCeAEptW0PS01ZQGaJY1anEHLUR9PHyPb+rM93Sz0VA iZBbbLTnZemMYo6M8yry+7lH2u5zdRsruiCHA=
- In-reply-to: <5622.16903.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- References: <5622.16903.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
A graph, as in one from graph theory: http://en.wikipedia.org/wiki/Graph_theory
On Tue, Jan 27, 2009 at 12:12 PM, Yanom Mobis <yanom@xxxxxxxxxxxxxx> wrote:
> Complex distance evaluation isn't necessary, but the sprite never getting
> stuck is.
>
> --- On Mon, 1/26/09, Joe Strout <joe@xxxxxxxxxx> wrote:
>
> From: Joe Strout <joe@xxxxxxxxxx>
> Subject: Re: [pygame] Pathfinding
> To: pygame-users@xxxxxxxx
> Date: Monday, January 26, 2009, 6:11 PM
>
> Yanom Mobis wrote:
>
>> it seems to me that A* only works on tile-based games.
>> What if my game isn't tile-based?
>
> I'm not sure you think that. A* (or any other pathfinding algorithm) will
> work for any search tree. You do need some sort of heuristic, though, that
> estimates how far any given position is from the goal. That's usually pretty
> easy though if "position" really corresponds in some way to a position in
> space -- just use the Euclidian distance to the goal as your heuristic.
>
> Best,
> - Joe
>
>
>
>