When you are looking at this image:

Player behind tree

the player is standing behind the tree. I know that can be accomplished by drawing the background first the player second and the upper tree part after that.

The thing is in the actual tileset there is only one tile that combines the background and the upper tree part:

Upper tree tile

So how is it possible that there are multiple z-indices within one tile. Or is the game somehow extracting the upper tree part from the base grass texture and draw them like described earlier?

  • \$\begingroup\$ Is it possible there's a mask somewhere else in the texture atlas? Or in another image? \$\endgroup\$ Feb 27, 2018 at 5:45
  • \$\begingroup\$ @user1118321 As far as i know there is only this texture and the base grass texture. \$\endgroup\$
    – Nimmi
    Feb 27, 2018 at 6:20
  • \$\begingroup\$ If you have the base grass texture, you could generate a mask by differencing that with the one that has the tree in it. \$\endgroup\$ Feb 27, 2018 at 6:21
  • \$\begingroup\$ @user1118321 hmm, i will give it shot. Although that sounds very inefficient if you have to do that with every tile that is overlapping. But we will see. Thanks for your help. \$\endgroup\$
    – Nimmi
    Feb 27, 2018 at 6:32
  • \$\begingroup\$ That texture is most likely closed by someone who ripped it. This is most likely with transparent background originally. \$\endgroup\$
    – Mario
    Feb 27, 2018 at 6:47

1 Answer 1


As stated in the comments, that texture has a transparent background in the original game. That way they can just draw the base grass, then the player, then the tree.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .