[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Pathfinding
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Pathfinding
- From: Patrick Mullen <saluk64007@xxxxxxxxx>
- Date: Thu, 29 Jan 2009 10:57:23 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 29 Jan 2009 13:57:26 -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=UboVad8r2/lH6720aLfyWELbWzXljbEw/psvz0B6Ai4=; b=Z8bTEFrgtg+stEFrGTT5RM9qZYbEI1U54uKaBcMgfei5aPPkOS+88ruHrhXrC+QD1k weFk4vRm/d+ouJ8LzH/zdkQDy1NgKH276eaBiXsML868+MewmG6F0LRCTC6G8TJkXf0o mV6KUFwW1CJylqJ79hhiXWB/b+k1ypSgy/x+I=
- 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=NW2XjvkCHnaGpG4GLgdWLo5SpfIlcZvvIC74yBMmJZIvScwMLnzodzjm0mgYMr3Ocx jEx8hMgDL3uLLbE2b2NoPekhKHv1UN4os0QYD4br9KWc8eRUtAaldUOuTiOG+c3hXdcv CZ116Tv9PAmryvXNIlyHIOAr8AcKLF3xYChpM=
- In-reply-to: <11632.67673.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- References: <11632.67673.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On Wed, Jan 28, 2009 at 4:09 PM, Yanom Mobis <yanom@xxxxxxxxxxxxxx> wrote:
> ...
> I'm just going to make my game tile-based, I guess.
>
Just a tip: you can have tile-based pathfinding without tile based
graphics. And the tiles don't necessarily have to be the same size as
you might think of when you think "tile".
It depends on how tightly your game is packed, but if it is mostly
wide open spaces, you could have large tiles for pathfinding
------------------------
| | RR |
| n | R R |
| | RR |
------------------------
| | |
| | |
| | |
------------------------
If the n needs to go somewhere in the lower right, he can't go through
the tile with the big rock.
If you have very tightly packed levels, you need finer tiles. If you
have a mix, the tiles could be hierarchial, where pathfinding from far
distances first use the larger tiled map, but pathfinding within one
of those large tiles uses a higher resolution tilemap.
You can also have normal sized tiles for pathfinding. But the method
used for pathfinding does not need to correspond with the method you
use for graphics.
Brian, I really like that method based on vision tests! I'm going to
try it out next time I have a game that needs something like that.