OK this problem is caused when you are trying to display a tile at a larger resolution than it actually is, so yeah it normally shows up from content scaling.
The problem is the graphic itself and how Corona interpolates the images (and in fact several of us have petitioned to be able to remove this interpolation which would remove this problem, albeit present others).
Basically while an image is mapped to the screen on a 1 to 1 pixel basis or smaller, all is fine.
When you show the tile onscreen bigger than it is, corona chooses to try to be helpful, and smooth the graphic. By which I mean say you have in your tile a white pixel next to a black pixel, but because of zooming this takes up 3 pixels, the middle one would be grey - interpolated from the white and black.
Now this is lovely for many things, but…
Well, most tile sets have the images right next to each other in the graphic, which means that when you zoom a tile, it is interpolating from its edge pixel, into the edge pixel of the tile next to it in the source graphic.
Ruh-roh!
Fear not though, my friends, for there are solutions. I mean apart from bashing your head against the wall.
Bear in mind this won’t look perfect - there really is no proper alternative except for manually choosing a correctly sized source image for the resolution of the device, but you can work around it.
Basically you need to re-lay-out your original image and do some magic in photoshop or whatever.
Let’s say you have a 512x512 image with tiles of 50 pixels each.
What you need to do is space them out, giving each tile its own seperate 1 pixel border on every side.
So the top left tile would be at 2,2 instead of 1,1 and the second would be at 54,2 instead of 50, 1. The next at 106, 1 etc.
Then, and this is the tedious part…
you must duplicate each tile’s edge pixel into the adjacent space available for it, followed by filling in the corner pixels of the borders with the corresponding pixel of the tile.
Boring eh?
So basically each tile now has its border repeated on each side by 1 pixel.
What this means is that at least when the tile comes to be zoomed in-game it will interpolate with the same colour as its own edge, and you won’t get those silly lines cropping up.
Now, it won’t look 100% correct either! But it won’t look massively wrong.
A couple of further tips to avoid weirdness, is to avoid scrolling in fractions of a pixel. Whenever you come to draw a screen, always make sure the view is math.floor() or math.ceil() to an individual pixel of the device resolution. Bear in mind this may necesesite NOT using one of corona’s inbuilt zoom modes (which was the first thing I ditched anyway as soon as I realised the limitations). If you don’t do this, you’ll see the edges of tiles flicker differently to the scrolling, simply because edge drawing of a tile is clipped to pixel boundaries, but the interpolation of the image within the tile itself is not.
@danny - because your project is just for iphone and iphone4, you have the luxury of having two very simple resolutions to work with.
What you need are 2 versions of the tile sheet image, the second one being scaled up twice as big (my suggestion would be to do it in photoshop WITHOUT bilinear or trilinear filtering, or it’ll look wrong again!). Then work out which device you are on manually, and load the appropriate image, doubling the sprite sheet parameters as needed (width and height of each frame).
Since you’ll now always have the right image according to screen resolution, you should never see those lines. [import]uid: 46639 topic_id: 10803 reply_id: 78400[/import]