Bug when rendering tiles ?

Hello,

I was trying to render a set of tiles using a simple Sprite Sheet: I load the tilekit's PNG into a Sprite Sheet, then I create a Sprite for each tile setting its currentFrame based on the piece of tile it represents.

Things works fine in the simulator, although when I run the app on the device (iOS 4) I notice some artifacts near some edges of the tiles (it looks like the tiles blend together somehow with the neighbours in the original tilekit).

Tiles are 32x32, and their position (and their parent's) is always pixel-perfect.

Is this a known problem ? Is there any workaround ?

Thanks,
Gabriele

Have you tried adding the antialiasg flag to config.lua?

1
2
3
4
5
6
7
application =
{
        content =
        {
                antialias = true,
        },
}

Hello Tom,

thanks for the response.
At the end, I ended up extruding the border of each tile by one pixel. This way rendering works perfectly and I don't have any artefact.

I'll check later if enabling antialiasing does help too!

Thanks,
Gabriele

views:1419 update:2011/10/11 22:13:38
corona forums © 2003-2011