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 [import]uid: 49970 topic_id: 13513 reply_id: 313513[/import]

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

application =  
{  
 content =  
 {  
 antialias = true,  
 },  
}  

If that doesn’t help, can you create a small sample project showing the problem and file a bug report? As far as I know we don’t have any known problems in this area.

Thanks,
Tom [import]uid: 7559 topic_id: 13513 reply_id: 49787[/import]

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 [import]uid: 49970 topic_id: 13513 reply_id: 49858[/import]

I have similiar problems - I’m using imageSheets to make several tiles (32x32) in my game. When device screen dimensions are different from source tiles (with letterbox content scale in config.lua) then I see artefacts around the tiles. These artefacts probably are from neighbourds tiles from the image sheet. In imageSheets is available a border function (probably for removing such artefacts) but this give the same artefacts. [import]uid: 50988 topic_id: 13513 reply_id: 119871[/import]

Setting border = 1 is not enough. You still have to go into your tilesheet and extrude each tile by 1px.

The only problem with this method is that Corona automatically performs a bilinear or trilinear filter on the interior of the tile. There is no way around this apart from using native-size assets. [import]uid: 41884 topic_id: 13513 reply_id: 120559[/import]

I have similiar problems - I’m using imageSheets to make several tiles (32x32) in my game. When device screen dimensions are different from source tiles (with letterbox content scale in config.lua) then I see artefacts around the tiles. These artefacts probably are from neighbourds tiles from the image sheet. In imageSheets is available a border function (probably for removing such artefacts) but this give the same artefacts. [import]uid: 50988 topic_id: 13513 reply_id: 119871[/import]

Setting border = 1 is not enough. You still have to go into your tilesheet and extrude each tile by 1px.

The only problem with this method is that Corona automatically performs a bilinear or trilinear filter on the interior of the tile. There is no way around this apart from using native-size assets. [import]uid: 41884 topic_id: 13513 reply_id: 120559[/import]