Gaps with scaled tiles in browser but not preview.

Discussion and feedback on Construct 2

Post » Tue Oct 07, 2014 12:22 am

Well, you haven't given us much to work with, but I would first try disabling "Use high-DPI display" project setting in C2 and see if that makes both operate the same.

Kind of a long shot , but I remembering it causing differences of this nature between iPad and iPhone when working with parallaxed layers and the positions of objects on those layers. Seems like scaling the layers could have a similar effect on positioning.

Again, not sure it'll even do anything given you are testing in chrome, but can't hurt to see.
ImageImageImage
B
16
S
3
Posts: 45
Reputation: 2,188

Post » Tue Oct 07, 2014 9:04 am

@Sigmag Thanks. I would have provided more but I couldnt narrow down the issue to provide a capx, while also not wanting to provide my full game capx. I went through your suggestion to no avail, but I did fix it briefly.

I thought turning pixel rounding off fixed it. However, what I did was accidentally export my build to the same directory I hold the source and upload the entire folder to my server. Opps

So I'm not sure what that suggests... :lol: perhaps it started using the original images? Therefore perhaps it's caused by using brute png compression? So I have checked my exported tile image, which is actually in a tile sheet now. This is because I use 1 frame animations to put all my differently decorated tiles of the same type into one sprite object. Then at start up I randomly choose one of the animations. Therefore dynamically decorating my scene.

So I guess the next thing to test is playing with different compression levels and perhaps using a tile sprite with no animations and therefore not in a tilesheet. However, I have run out of time today.

I will leave you with this though. My original questions has always really been. Should there be difference between previewing and viewing within the same browser? If so what things are different? What things are applied during the export apart from png compression and minifying?

P.S. It's pretty cool to know that you can kind of create spritesheets by using animations this way. However, it's a shame you can't specify the spritesheet dimensions (or can you?).
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Tue Oct 07, 2014 10:42 am

TheWyrm wrote:@Sigmag Thanks. I would have provided more but I couldnt narrow down the issue to provide a capx, while also not wanting to provide my full game capx. I went through your suggestion to no avail, but I did fix it briefly.

I thought turning pixel rounding off fixed it. However, what I did was accidentally export my build to the same directory I hold the source and upload the entire folder to my server. Opps

So I'm not sure what that suggests... :lol: perhaps it started using the original images? Therefore perhaps it's caused by using brute png compression? So I have checked my exported tile image, which is actually in a tile sheet now. This is because I use 1 frame animations to put all my differently decorated tiles of the same type into one sprite object. Then at start up I randomly choose one of the animations. Therefore dynamically decorating my scene.

So I guess the next thing to test is playing with different compression levels and perhaps using a tile sprite with no animations and therefore not in a tilesheet. However, I have run out of time today.

I will leave you with this though. My original questions has always really been. Should there be difference between previewing and viewing within the same browser? If so what things are different? What things are applied during the export apart from png compression and minifying?

P.S. It's pretty cool to know that you can kind of create spritesheets by using animations this way. However, it's a shame you can't specify the spritesheet dimensions (or can you?).


The différence is compression, spritesheeting (!) And minification mostly, the spritesheeting can cause seams, the downscaling quality parameter changes the way itnis,spritesheeted I think
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Tue Oct 07, 2014 11:02 am

@Aphrodite Thanks for that information it took a long time to get there :). I can confirm that changing the downscaling from medium to high, changes spritesheet size from 256x256 to 512x512 (probably only if required). That's good to know.

So I guess in my test capx I need to also try tiling sprites that use a spritesheet. My gut instinct is this will result in the glitch I observed, as it seems like a logical explanation.

I'll be back!
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Mon Oct 20, 2014 7:20 pm

Sounds like my issue was solved in the recent beta. Woop!

"When building spritesheets on export, Construct 2 has typically inserted a 1px transparent border around each image. This avoids color from an adjacent image on the spritesheet "bleeding" in and causing a fringe of a different color to appear down the edge. However this actually caused a different problem: in preview mode images work in a "clamp-to-edge" mode, meaning they show the last pixel's color right up to the very edge of the image. (Visually this looks like "hard" edges.) After export, since the edge of the image is now against transparency, it then means the last pixel's color actually blends with transparency up to the edge. (Visually this looks like "soft" edges.) In short, this means in some cases seams can appear between adjacent objects after export, because the edges are now blending with transparency at the edges, allowing some of the background to show through in between.

To resolve this Construct 2 now repeats the outside row of pixels from the image instead of inserting transparency around frames. This ensures that after export images blend at their edges the same way they do in preview mode, and helping prevent seams appearing. If 'Downscaling' is set to 'High quality' images are (as usual) padded out to power-of-two sizes for correct rendering with mipmaps, and now C2 also fills the entire padded area with the last row of pixels. This might look a little odd on your spritesheets, but it guarantees seamless rendering even with extreme downscaling."
~https://www.scirra.com/construct2/releases/r185
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Mon Oct 20, 2014 7:20 pm

Sounds like my issue was solved in the recent beta. Woop!

"When building spritesheets on export, Construct 2 has typically inserted a 1px transparent border around each image. This avoids color from an adjacent image on the spritesheet "bleeding" in and causing a fringe of a different color to appear down the edge. However this actually caused a different problem: in preview mode images work in a "clamp-to-edge" mode, meaning they show the last pixel's color right up to the very edge of the image. (Visually this looks like "hard" edges.) After export, since the edge of the image is now against transparency, it then means the last pixel's color actually blends with transparency up to the edge. (Visually this looks like "soft" edges.) In short, this means in some cases seams can appear between adjacent objects after export, because the edges are now blending with transparency at the edges, allowing some of the background to show through in between.

To resolve this Construct 2 now repeats the outside row of pixels from the image instead of inserting transparency around frames. This ensures that after export images blend at their edges the same way they do in preview mode, and helping prevent seams appearing. If 'Downscaling' is set to 'High quality' images are (as usual) padded out to power-of-two sizes for correct rendering with mipmaps, and now C2 also fills the entire padded area with the last row of pixels. This might look a little odd on your spritesheets, but it guarantees seamless rendering even with extreme downscaling."
~https://www.scirra.com/construct2/releases/r185
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests