Question about power of 2

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 understand the whole power of 2 idea and how all your graphics should be a power of 2, to increase performance of your games, but there's something I'd like to know, regarding transparency.

    I get that you need to use as little transparency as possible in your sprites and you can crop out any transparency around your sprites, but by cropping the transparency, it will change the sprite's size. Do your sprites only need to be imported at a power of 2 size, then you can scale them down to whatever size you want? Or do your sprites have to stay at a power of 2 size, even when cropping out transparency in engine?

    Thanks for any advice anyone might have!

  • I believe the suggestion is to mostly stay within sensible sizes, i.e. don't make your art 513x513 pixels as then it will need a 1024x1024 texture. As you crop your images the system will find the best way to arrange them on a spritesheet while adding a single pixel of transparency on each side to avoid artifacts when scaling. So if your initial art is within a power of 2 minus 2px rectangle you should be just fine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For sprites you can more or less ignore the power of two thing, because they get spritesheeted on to a single larger image. Since they are assembled on to a power-of-two spritesheet with a 1px border, the optimal size is actually 2^n-2, e.g. 30, 62, 126, etc.

  • But you need to try to make them so that they will make the spritesheet power of 2.

    Ashley should really emphasise the power of 2 -2

  • Thanks very much for the information. It's definitely cleared things up for me I'll take the power of 2 - 2 into consideration whilst designing the graphics.

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