How do I

0 favourites
  • 8 posts
  • 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.

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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.

  • 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.

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

  • 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?

  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)