png > jpg

@adent42 is this still helpful?

I'm aiming for a10,000 image game, and really worried about loading times...

also will combining a few images to one big image can help?

Comments

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,058
    edited April 2021

    We currently don't support texture atlases, so combining images won't help much.

    Using jpgs does two things:

    1. Avoids load time optimized image process, which made your images full bitmap size. You can turn that off for pngs now.
    2. Helped keep app sizes smaller for large or complex photorealistic images where the png size was significantly bigger than jpg size. Usually backgrounds.

    Some tips:

    • There's a "Preload Art" checkbox on actors. Make sure to uncheck that unless you KNOW the image will be needed on t he first scene of a game.
    • Uncheck "Use load time optimized images." As it makes your image files quite large. If you save them as jpg then it doesn't matter, but if you save them as png, then definitely uncheck it for your case.
    • Make sure your images dimensions are smaller than the nearest power of 2. So if your image is 1028x1028, resize it down to 1024x1024. This is a memory usage optimization as OpenGL texture sizes need to be powers of 2. So if your image is 1025x1025 we'd be allocating 2048x2048 in texture memory!
    • With retina images you can usually get away with something smaller than exactly 2x or 3x the actor size, especially on mobile devices where the physical size of the actor is small, so try using smaller images.


  • solnikasolnika Member Posts: 132

    Thanks for the info @adent42 as always.


    about the texture atlases, I know it's not supported, I was thinking maybe lower number of bigger images will help load times,

    as it is less files to load, don't really know how it works?

  • solnikasolnika Member Posts: 132

    @adent42, the "Use load time optimized images." is only for android? I don't see it for Ios.

Sign In or Register to comment.