Power of 2 best practice questions

0 favourites
  • 5 posts
From the Asset Store
75 power-up sound effects; bonus and notification sounds, fanfares, harp glissandi, stabs, clock ticks, etc.
  • I recall reading somewhere a long time ago regarding a 1px transparent pixel border that construct adds for images, but I don't seem to be able to find it anymore.

    The reason I am asking was because I forgot the implications... for example should I be importing bitmaps at 512x512, or 510x510?

    Or maybe did it have something to do with resized images or seamless tiling or 9patch? I can't remember!

    I know I was having some issues with 9patch using exact pixels with solid colors and not leaving space around the edges, or similar when I make a solid color sprite square and down size it in the image editor, the edges pixels get changed to semi transparent. Are these related?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It really won't matter much, unless its tiled background, then the texture should be power of 2.

    Most modern gpu's can handle odd sizes well enough.

    Then the only other time it matters is when you are doing tiled games, and it's just to make things easier.

  • OK sound good. I was worried if I had images for example at 1024 and they all got bumped up to 2048 in memory, it would be a pretty significant waste of resources.

  • Don't forget that it does matter for sprite sheets.

    Like anything that doesn't tile over 1024 gets its own sheet.

    But that's a size on disk issue, optimising for that is only an issue if you have hundreds or thousands of images.

  • Single/static images: use power-of-two size. Unless you change the setting "downscaling quality" to "high" which forces all exported images to be padded to a power-of-two size.

    Sprites with 2 or more frames: any size. Because they'll get turned into a power of 2 sheet.

    Tiled backgrounds: power-of-two size.

    Unfortunately we have to wait until WebGL 2.0 comes out before this silly power of 2 limitation is removed, however that may happen sometime this year.

    Source:

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