Jump to content

Tiling sprite and spritesheet


pdiddles03
 Share

Recommended Posts

To fix this you have to do 2 things

1) Make sure that you use rounded coordinates. E.g. make sure to use x=12 and not x=12.45 
2) Add 1 pixel border around your sprites that repeat the pixel colors for the borders.

2018-04-12_11-01-01.png.36cfdd3394c73453ff97d735e0ced73c.png

This additional pixel line must not be part of the sprite - it's outside on the sprite sheet.

The reason for this is the following: OpenGL based renderers might drag in transparency from the sprite's neighbor pixels. The result is a thin line of transparency - the artifact you are talking about.

You can use TexturePacker for this - it automatically extrudes your sprites for you. No manual work required.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...