TileMap black line artefacts

TileMap black line artefacts
0.0 0

#1

I’m trying to resolve this issue

According to Cocos Creator v1.5.0 Release!

[Render] set cc.macro.FIX_ARTIFACTS_BY_STRECHING_TEXEL macro back to 0 to fix the problem that the surrounding pixels of texture will be cut off. But this change will cause the issue that tiledmap may produce a black seam when zooming and paning. You can fix it by generate a tiledmap map with extruded pixel around each tile (If you use the shoebox to generate a map, you need to set extrude to 1, padding is set to 2)

I now have a sprite sheet with spacing between the tiles and extruded the pixels around each tile. It did help when zoomed in but when I zoom out a lot it still happens.

I have tried setting some defaults in the code to:

cc.macro.FIX_ARTIFACTS_BY_STRECHING_TEXEL = 0;
cc.director.setProjection(1);
cc.view.enableAntiAlias(false);
cc.macro.SPRITEBATCHNODE_RENDER_SUBPIXEL = 0;

But it doesn’t really help.

Does anyone know how to fix this?
Thanks


#2

Is this still happening with WebGL?


#3

Yes, it’s happening in WebGL.


#4

@jrosich
I can’t use anything else since I’m using the 2D Camera which throws an error if I use Canvas Mode.


#5

I see. I was asking because I’m aware that Creator on Canvas may cause some artifacts, thats whay I was asking. But I dont work with 1.5 so I guess that must be a bug.

Actually I was about to start working with TileMaps for the first time, as I want to add a map to my game. I guess I will keep working with 1.3.2 for now.

Thanks!


#6

@jrosich I would probably do the same if it wasn’t because I also need physics.
I about to implement my own tile map solution. I just hope that doesn’t produce the same result in the end.


#7

@phero_constructs Did you manage to find a solution to this?
I have an issue with anti-aliasing and very blurry canvas graphics on lower screen resolutions than the design resolution. Small labels gets unreadable and detailed graphics very bad looking.

Have you encountered similar issues and do you know what to configure in cocos to fix these things? :slightly_smiling_face:


#8

I had a configuration cc.view.enableRetina(cc.sys.os === cc.sys.OS_IOS ? true : false);
This was no good, by removing this Android and old phones started to look good again. Strange :stuck_out_tongue:

If you have good insight on optimising looks or a list of all kinds of configurations you can do to the games it would be nice to hear. :slightly_smiling_face:


#9

I ended up making my own tile map reader. That also made it easier to read the collider info from Tiled.