[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] A* pathfinding demo
- To: pygame-users@xxxxxxxx
- Subject: [pygame] A* pathfinding demo
- From: Luzi Thoeny <luzi1@xxxxxxx>
- Date: Mon, 05 Dec 2005 08:49:29 +0100
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Mon, 05 Dec 2005 02:49:37 -0500
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
i made a very small, simple demo showing pathfinding with the A* algorithm.
grab it from this place:
http://www.doink.ch/pathfinding.php
it is terribly slow, but the neat thing about it is that you can
graphically see how the algorithm is proceeding. i tried speeding it up
by using surfarray to paint pixels and a priority-queue with
heapq.heappop() and heapq.heappush(), but that didn't help a lot.
i hope there aren't too many bugs in it (newbie!) and i appreciate any
comments.
luzi