How do I

Get help using Construct 2

Post » Wed Aug 17, 2016 2:52 pm

I just noticed that downscaling my game makes the sprites look a little too sharp. My sprites are designed so that if I scale them at 50% they still look pixel perfect but the edges seem too hard compared to when I downscale them in Photoshop using the bilinear filter. I guess it's because Construct only uses the linear filter for downscaling. Is there a way I could use bilinear downscaling for my project?

EDIT:

After a bit of testing I discovered something.

Image

Here is my example: the ones above are in a layer with a scale of 0.5 while the lower ones are placed by me over the screenshot and have been also scaled to 0.5 but using photoshop. Notice how the first top two have harder edges compared to the ones below while the last one doesn't. After a bit of testing I concluded that objects that posses a width and height that are both a multiple of 2 (like 2, 4, 8, 16, 32 and so on) rescale correctly and smoothly, even if the object is not square. The rest, not so much.

Does anyone have any ideas on how to fix this? Please, I worked my ass off to make my game graphics pixel perfect but it's starting to seem impossible to keep them that way in-game.
B
7
S
1
Posts: 29
Reputation: 483

Post » Wed Aug 17, 2016 3:53 pm

I'm not 100% clear if this is what you want - but you can change sampling from linear to point in the project settings - simple select your project in the Project Bar and find the sampling option in the Properties bar :)
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,308

Post » Wed Aug 17, 2016 4:10 pm

Oh I know about that option but that's basically for 8-bit style games I think. It basically removes anti-aliasing. What I need is a more accurate linear sampling.
B
7
S
1
Posts: 29
Reputation: 483

Post » Wed Aug 17, 2016 8:40 pm

You could try an fx, but I think you're stuck with what the browser supplies, unless @Ashley is using some custom formula for downscaling.
Be aware that whatever you do it may look different on some other system.
Image ImageImage
B
170
S
50
G
179
Posts: 8,378
Reputation: 113,425

Post » Thu Aug 18, 2016 10:58 am

It's probably something to do with mipmapping. You could try setting the downscaling quality to low in project properties.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Thu Aug 18, 2016 11:11 am

Ashley wrote:It's probably something to do with mipmapping. You could try setting the downscaling quality to low in project properties.


I just remembered that in your article about saving memory you said that on export all the images are placed in square sheets sized in a multiple of 2 like 32, 64, 128 etc. Considering the fact that the scaling works accurately for such square objects, is it possible that when I export the project to a mobile app and my sprites become square sheets they will all be scaled accurately? Is it possible that these hard edges are only present on my web preview?
B
7
S
1
Posts: 29
Reputation: 483

Post » Thu Aug 18, 2016 12:16 pm

It's possible, yes - spritesheeting can in some cases change the scaling quality after export. It's worth testing both preview and export to compare the results, it might only be an issue in preview mode.

FWIW, C3 will use spritesheets in preview mode as well so you won't have this problem of preview sometimes looking slightly different to export.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Thu Aug 18, 2016 1:16 pm

Ashley wrote:It's possible, yes - spritesheeting can in some cases change the scaling quality after export. It's worth testing both preview and export to compare the results, it might only be an issue in preview mode.

FWIW, C3 will use spritesheets in preview mode as well so you won't have this problem of preview sometimes looking slightly different to export.


I'll test it, thanks for the input. Can't wait for a first glimpse of C3.
B
7
S
1
Posts: 29
Reputation: 483


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests