# Tilemap Z order and graphic problem (SOLVED)

**URL:** <https://forum.defold.com/t/tilemap-z-order-and-graphic-problem-solved/8672>\
**Category:** Questions\
**Created:** [May 26, 2017, 3:39am UTC](https://forum.defold.com/t/tilemap-z-order-and-graphic-problem-solved/8672 "2017-05-26T03:39:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanthuyen8](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/h/ecb155/32.png) [@hanthuyen8](https://forum.defold.com/u/hanthuyen8)\
**Post date:** [May 26, 2017, 3:39am UTC](https://forum.defold.com/t/tilemap-z-order-and-graphic-problem-solved/8672/1 "2017-05-26T03:39:56Z")

</div>

Hi, I now have 2 problems.  
First, Lately I added 3 more layer to Tilemap file and set all 4 layer to “0 in Z”. And after Build, the player is running below the Tilemap. After that, I change to Tilemap to “-1 in Z”. The player still below the Tilemap.  
Second, when the player moving around, it appears some stripes like this.

 ![](https://forum-defold-uploads.b-cdn.net/original/2X/2/2edf23349c2b9a6bd962a1b6c7aa609bfa140e60.png)

How do I deal with these ? Thanks

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [May 26, 2017, 4:06am UTC](https://forum.defold.com/t/tilemap-z-order-and-graphic-problem-solved/8672/2 "2017-05-26T04:06:14Z")

</div>

> [@hanthuyen8](#):
>
> the player is running below the Tilemap

Can you double check the Z-values of map game object and the player game object and their respective tilemap and sprite components? Remember that the Z-values add up, meaning that a game object with a Z-value of 1 with a sprite component with a Z-value of 1 will have a final Z-value of 1+1=2.

Also note that i[t is currently not possible to have sprites interleaved with the layers of the tilemap](https://forum.defold.com/t/tilemap-layers-and-sprite-ordering-def-1184/936).

> [@hanthuyen8](#):
>
> Second, when the player moving around, it appears some stripes like this.

The stripes are most likely caused by texture bleeding. Change the “Extrude Borders” value of your tilesource from 0 to 1. It’s [mentioned in the manuals](http://www.defold.com/manuals/2dgraphics/#_creating_a_tile_source) and [on the forum](https://forum.defold.com/t/recommended-margin-and-spacing-for-tilesource-solved/2156/2).

---

<div class="post-metadata">

**Author:** ![hanthuyen8](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/h/ecb155/32.png) [@hanthuyen8](https://forum.defold.com/u/hanthuyen8)\
**Post date:** [May 26, 2017, 4:11am UTC](https://forum.defold.com/t/tilemap-z-order-and-graphic-problem-solved/8672/3 "2017-05-26T04:11:39Z")

</div>

Hi britzl, the game object and sprite doesn’t have a “Z” properties, just the Position properties that have X, Y, Z. I also change Z in Position but It still below Tilemap.

---

<div class="post-metadata">

**Author:** ![hanthuyen8](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/h/ecb155/32.png) [@hanthuyen8](https://forum.defold.com/u/hanthuyen8)\
**Post date:** [May 26, 2017, 4:48am UTC](https://forum.defold.com/t/tilemap-z-order-and-graphic-problem-solved/8672/4 "2017-05-26T04:48:52Z")

</div>

Oh thanks britzl, I change the game object that have the tilemap to (0,0,-1) in game object position. It’s working now. I’m happy with it.  
Thank you so much
