Visible bounding boxes around tiled backgrounds?

Discussion and feedback on Construct 2

Post » Mon Jun 03, 2013 7:28 pm

The tiled image always has a row of anti-aliased pixels along the edge between solid and transparent edges. I doubt Ashley ever wrote anti-aliasing code, I believe it happens in the graphics card. (Anti-aliasing has come a long way since early games.)

Outside the game your image holds the source data to tile. During runtime your image size is a window showing a piece of that infinite tile.
So you have to see that anti-aliased row somewhere, your choice, transparent row at the top, or at the bottom.

If you go over the power of two, the image will be stored in a bigger PNG file to fit the extra row.
B
223
S
59
G
32
Posts: 901
Reputation: 39,238

Post » Mon Jun 03, 2013 8:10 pm

I have issues with Background objects that are not the power of 2 as they don't behave/scale right otherwise. So I just make them power of 2 with tons of transparent areas.
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Mon Jun 03, 2013 10:24 pm

[QUOTE=Paradox] The tiled image always has a row of anti-aliased pixels along the edge between solid and transparent edges......

During runtime your image size is a window showing a piece of that infinite tile.
...

If you go over the power of two, the image will be stored in a bigger PNG file to fit the extra row. [/QUOTE]
Thanks, good explanation! This wasn't a complaint btw folks, I just wanted to know what was going on. No point in re-doing things later to fix it if I can learn enough to do it right the first time.

I shall carry on creating assets to throw at the engine.
B
13
S
3
G
2
Posts: 59
Reputation: 2,155

Post » Tue Jun 04, 2013 12:09 pm

Thanks everyone for detailed explanations.

If it's intentional behaviour, then it is not so simple to use tiled images in places where the functionality of sprites is not necessary, but also tiling is not required.

So far I assumed that choosing TI over Sprite results in better memory usage. But, if I have to keep two copies of images - one with a transparent bottom row, and one without, this stops being practical.

Maybe Ashley could consider adding an option to the TI property sheet, to turn top/bottom row of pixels into transparency?

Thanks,
Greg
B
18
S
3
G
3
Posts: 82
Reputation: 3,734

Post » Tue Jun 04, 2013 12:52 pm

Sounds like a good solution, it would have to be the bottom row I think as my images shown are transparent on the top half anyway.
B
13
S
3
G
2
Posts: 59
Reputation: 2,155

Post » Wed Jun 05, 2013 7:38 pm

Ashley did add a way to put a row of transparent pixels all the way around the image. Hit crop in the editor with nothing selected.

However it adds the row of pixels to the size.

Edit: Actually I believe Ashley already has requests for selecting the origin point of the tile, which would allow you to move it up a pixel.

I always liked that idea because infinite scrolling backgrounds would be easy if you just cycled that number.Paradox2013-06-05 19:56:29
B
223
S
59
G
32
Posts: 901
Reputation: 39,238

Post » Mon Oct 21, 2013 10:37 pm

I've been suffering from this problem and tried all the fixes suggested in this and other threads. I've use a seamless tile effect in my image editor (PSPX4) so the 1 pixel trick doesn't work full stop.

What I did eventually discover was that if I imported the object at exactly the resolution I use it in the game the tile border effect disappears and the tiling becomes truly seamless.
This may be a bit of an obvious fix to many but I was importing at 128X128 then resizing in the C2 image editor to 64X64. Importing at 64XX solves the problem on all the tile types I'm using. If all else fails I suggest trying to resize the affected tile in a 3rd party image editor.
There are 10 types of people in the World, those that understand binary and those who don't.
B
7
S
2
Posts: 93
Reputation: 797

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests