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

Re: [pygame] resources for edge tile algorithm



Well since the forest is drawing outside sides when on top, and the dirt is drawing inside sides, probably something going wrong there. Perhaps it IS drawing the side dirt tile, but it is drawing the wrong cardinal side/position so the forest is showing through? But it is hard for me to tell which part is wrong from the screen shot. Does the problem happen if you draw forest on the bottom, but have an "island" of dirt on top?

Devon

--- On Thu, 7/2/09, Michael Fiano <michael.fiano@xxxxxxxxx> wrote:

> From: Michael Fiano <michael.fiano@xxxxxxxxx>
> Subject: Re: [pygame] resources for edge tile algorithm
> To: pygame-users@xxxxxxxx
> Date: Thursday, July 2, 2009, 9:02 PM
> My transitions are split into 4 sides,
> 4 corners, and 4 curves. If I set forest to be
> 'higher' than dirt, it draws as expected - See
> screenshot: http://bloodcurse.axedcode.net/images/1.png
> . However, if I swap the order so that dirt draws over
> forest, I'd expect the circular dirt patches to be
> completely over the dark green forests. Instead, you can see
> that the sides of the forest are always drawn over the dirt,
> making it pretty ugly looking. See screenshot: http://bloodcurse.axedcode.net/images/2.png
> . Here is what I did in pseudo-code:
> 
> 
> for depth in range(4):
>     if depth > tile.order:
>         for type in terrain_types:
>             draw_sides()
>             draw_corners()
>             draw_curves()
> 
> orders are:
> water (not shown): 0
> 
> plains (lt. green grass pattern): 1
> dirt (circular lt. green patches): 2
> forest (dk. green): 3
> 
> Does anyone have any idea why the sides are drawing in the
> wrong order?
> 
> On Tue, Jun 30, 2009 at 5:41 PM,
> Michael Fiano <michael.fiano@xxxxxxxxx>
> wrote:
> 
> Fawkes,
> Yes, my rock is actually on a separate layer that is
> supposed to be drawn after the base terrain, but it seems it
> has to be reorganized as somehow the transitions are drawn
> after the 2 layers with my recent changes.
> 
> 
> 
> On Tue, Jun 30, 2009 at 9:52 AM,
> Fawkes <fawkesgarde@xxxxxxxxx>
> wrote:
> 
> 
> Michael,
> Please correct me if I'm not interpreting
> what you're trying to do right.
> For things like your rocks, rather than handling them
> within the terrain map, we just made a separate
> "Landmarks" layer for things like rocks, houses,
> statues, etc that was drawn on top after the terrain stuff
> got drawn.
> 
> 
> 
> 
> ~Fawkes
> 
> 
> 
> 
>