How to get rid of unwanted lines appearing in tilemap when used in cocos2d js

Hi I have created a tilemap in cocos2d js. but when i run my project unwanted black lines appear in the map. no matter how many times i edited my tileset. how to get rid of these lines?

Usually this has something to do with OpenGL texture filtering, if you’re not rendering your tiles 1:1 or exactly on pixel positions.

If you can’t fix it by adjusting the scale or rounding the position to whole pixels, you can usually still work it around by modifying your tileset so that the tiles have 2 pixels of spacing in between, where each pixel in this spacing should match its color with the nearest neighbour pixel on a tile. This is something you’ll want to automate, or find a tool that can do it for you. In Tiled, you can either keep using your original tileset or use the one with spacing added and set the spacing in the tileset properties.

In general, this is not Tiled’s issue and you may receive a more specific or relevant answer by asking in the cocos2d-js community. See: