I’m writing a renderer mainly targeted against pixel graphics with sprites usually in the size 8-32 pixels big. I’m using drawTiles to render everything, but as soon as a tile has a width that is odd (ie 9, 11, 15, etc) I get artifacts. (Most often a thin line left to the tile.)
This happens with both flash and windows targets.
Is this to be expected and I should aim to have even width/heights, or am I using it wrong?
The easiest solution is to add a one-pixel buffer between the sprites in your spritesheet.
I agree with player_03, also make sure that your tilesheet has a transparent backround, so the pixel between sprites is transparent
This may be due to smoothing and lack of premultiplied alpha, “next” is premultiplied by default, which I think may help resolve this issue long-term
Padding worked, but the positional error was still there. Instead I opted to always use even tile sizes and never going below 6 pixels in any direction.