[?-R106] Lines around tiled backgrounds

Bugs will be moved here once resolved.

Post » Tue Oct 16, 2012 8:29 am

CAPX

I have discussed this problem before, but now I just made a new and very fast capx sample - you should notice the problem on any game you make with tiled backgrounds.

I know you just say it's a graphics driver problem - but it's not. It's present on any computer and other commercial games deffinately don't have this issue! I have tried this on various AMD and Nvidia gfx and on both AMD and Intel PC. Unfortunately the same problem is present.

Try the capx and notice the ugly lines around the top dirt tiles and in the clouds.

On this sample - pixel rounding is even on - but it doesn't make any difference besides making the movement less smooth.

Also notice that a tiles made like a sprites (like the dirt corners) doesn't have the problem when pushed against a tiled background tile. The it looks as you would expect it look.

Actually this problem is worse now than it was before around R100 or maybe R102. I had the problem when using R95, but then it disapeared in some of the later version and then got back around R100-R102.

I have used so much time trying to eliminate the issue - but nobody seems to notice it. lokesen2012-10-16 08:42:33
B
7
S
3
Posts: 109
Reputation: 1,645

Post » Tue Oct 16, 2012 8:42 am

To me it seems that you just have poorly cropped images. I can see some thin black lines on your tiles when zoomed closer in image editor.
Here's a test I made:
http://dl.dropbox.com/u/53898431/Junk/Tiles_Test.capx

Do you get any lines with my test?nemo2012-10-16 08:50:58
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Post » Tue Oct 16, 2012 10:04 am

[QUOTE=nemo] To me it seems that you just have poorly cropped images. I can see some thin black lines on your tiles when zoomed closer in image editor.
Here's a test I made:
http://dl.dropbox.com/u/53898431/Junk/Tiles_Test.capx

Do you get any lines with my test?[/QUOTE]

I can make a sample like yours too - but that doesn't help me with my problem. First of all, the problem is worse with scrolling, and scaling. Both with or without letterbox.

My capx has no cropping in it. All tiles are the right size and has no errors or faults. The dirt tiles are all 32x32 and they are pixel perfect.

Try my capx in internet explorer too if you like, it much worse there, but it is also terrible in chrome - although better than IE.

lokesen2012-10-16 10:12:03
B
7
S
3
Posts: 109
Reputation: 1,645

Post » Tue Oct 16, 2012 11:47 am

Maybe you're not crazy after all
It actually seems that there's a one pixel vertical shift. Easiest to see if one tiled background block is flipped 180-degrees and set against the other.
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Post » Tue Oct 16, 2012 12:00 pm

[QUOTE=nemo] Maybe you're not crazy after all
It actually seems that there's a one pixel vertical shift. Easiest to see if one tiled background block is flipped 180-degrees and set against the other.[/QUOTE]

YES!

Also - it's not present in all cases - the sample I have provided is more or less worst case scenario, because of the brown colour and the 32x32 tile size that seems to cause the worst problems.

I really thing this is a bug and not just my imagination :)

Btw. my game is almost made entirely of 32x32 tiles so it is a huge problem it that case.
B
7
S
3
Posts: 109
Reputation: 1,645

Post » Tue Oct 16, 2012 12:44 pm

But do you have this problem after exporting your project?
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Post » Tue Oct 16, 2012 12:54 pm

It's the same...
B
7
S
3
Posts: 109
Reputation: 1,645

Post » Tue Oct 16, 2012 3:53 pm

@lokesen - believe it or not, this example is actually working normally and is not a bug.

Obviously, the Tiled Background object wraps its texture, so if you enlarge it the image repeats throughout. However, if the object is sized 32x32 with a 32x32 image, and you zoom in a little (in this case using fullscreen mode), it actually does a tiny bit of wrapping round to the other side of the image at the edges. Imagine the image is still tiled in those directions, just you can't see them because they're outside the bounds of the object. So in this case one edge is black and the rest is brown; the side opposite the black edge will still wrap across to the black-edged side ever so slightly, and this creates a visible seam. It's enough to still seam when pixel rounding and point sampling are on. This is just how computer graphics works and would happen with any tool or framework.

The workaround: add an extra row of pixels to the image, or resize the image ever so slightly smaller. For example, make the image 32x33 to add an extra row of pixels along the bottom, and make them the same color. Or, just resize the Tiled Background to be e.g. 64x31, so the last row of pixels doesn't wrap around. Or, just position the other backgrounds to slightly overlap and hide the seams.Ashley2012-10-16 15:55:40
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,620

Post » Tue Oct 16, 2012 7:04 pm

[QUOTE=Ashley] @lokesen - believe it or not, this example is actually working normally and is not a bug.

Obviously, the Tiled Background object wraps its texture, so if you enlarge it the image repeats throughout. However, if the object is sized 32x32 with a 32x32 image, and you zoom in a little (in this case using fullscreen mode), it actually does a tiny bit of wrapping round to the other side of the image at the edges. Imagine the image is still tiled in those directions, just you can't see them because they're outside the bounds of the object. So in this case one edge is black and the rest is brown; the side opposite the black edge will still wrap across to the black-edged side ever so slightly, and this creates a visible seam. It's enough to still seam when pixel rounding and point sampling are on. This is just how computer graphics works and would happen with any tool or framework.

The workaround: add an extra row of pixels to the image, or resize the image ever so slightly smaller. For example, make the image 32x33 to add an extra row of pixels along the bottom, and make them the same color. Or, just resize the Tiled Background to be e.g. 64x31, so the last row of pixels doesn't wrap around. Or, just position the other backgrounds to slightly overlap and hide the seams.[/QUOTE]

Thanks Ashley - I will try to work around it.
B
7
S
3
Posts: 109
Reputation: 1,645

Post » Wed Oct 17, 2012 11:47 am

With your tips I managed to get a perfect result. It's not as easy as I would like - but it works and that's good enough for me.

Nothing about making a good game is easy - that's just how it is.
B
7
S
3
Posts: 109
Reputation: 1,645

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests