[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] resources for edge tile algorithm
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] resources for edge tile algorithm
- From: Devon Scott-Tunkin <djvonfunkin@xxxxxxxxx>
- Date: Wed, 24 Jun 2009 20:35:31 -0700 (PDT)
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Wed, 24 Jun 2009 23:35:34 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1245900931; bh=5XNu2WBfS/rWBGYjZ7RzBIB2rhgoHADecEAGewvZEVs=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=vnoUGgDpZvyxRMOhdC/yCoFVBBGxGYbviQLeoBOVN+UHL+Tw/7/UBcoSjuGkANh6PFd9EZXEkiaMZ5uSo1QR0aCarhdxSaK4n1WcuUDY55h6ggEYxz/ZU/rEobjxuObhmaMyXP0gJwKxTT/XbGRV/I4kwDFpRNMUcNT28nLvB6Q=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=6J/B78IyUdPUGW/ghuKSNvi00XVYZ3Qg/uqLVCjApIQmvACbx/QI6Mvb4lnQsOPl749lsk0l5oiQR09JtFKVQfjqbhzOjMLzu1TGyhwzxUZjYdTAkFjpMwh695w5yOl8g9UqeSFMExADLcSh9nkE4Jd+60NMBniwkvDavkhiGnw=;
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I don't know if this is helpful but I came across it the other day.
http://www.gamedev.net/reference/articles/article934.asp
I believe it's basically just saying that when creating the top transition tile layer check the 8 surrounding tiles of each tile on the screen (or the whole generated map if you want) to see if they are of a lower terrain type then the current tile. If so, apply the correct transition tile to use from a tilesheet indexed the same as the for loop doing the checking or however you want to keep track of which edge of the tile you're currently checking.
I haven't done it myself, but if you get something working let me know. I am planning on doing the same thing in one of my projects but it is a ways off.
Devon
--- On Wed, 6/24/09, Michael Fiano <michael.fiano@xxxxxxxxx> wrote:
> From: Michael Fiano <michael.fiano@xxxxxxxxx>
> Subject: [pygame] resources for edge tile algorithm
> To: pygame-users@xxxxxxxx
> Date: Wednesday, June 24, 2009, 9:07 PM
> I am looking into edge tile placement
> algorithms for 2D square tile
> maps, for the pygame 'bloodcurse'. The idea is I
> have a layer of square
> tiles representing each type of terrain laid down. Then
> another layer
> with transparent curves is layered over the top of the
> previous layer
> to create transitions from terrain x to y. I can do this
> fine manually,
> but I was wondering what similar ideas anyone has done, or
> any relevant
> links on the subject? Ultimately, layer 1 will be randomly
> generated,
> and 2 will have to follow.
>
>
> Thanks
>