Power of 2 sprites, spritesheets and optimising

Not favoritedFavorited Favorited 0 favourites
  • 2 posts
From the Asset Store
75 power-up sound effects; bonus and notification sounds, fanfares, harp glissandi, stabs, clock ticks, etc.
  • In the interest of better optimising my game I was reading this article which says

    Also, to avoid adjacent image's colors "bleeding" or "fringing" across to other frames, Construct leaves a 1 pixel space between all frames on a spritesheet. This means it won't be able to fit four 128x128 images in a single 256x256 spritesheet, so try to ensure Sprite images are just below a power-of-two size. The optimal size is two pixels less than a power-of-two size, e.g. 30x30, 126x126 or 254x254. (Note however that Tiled Background objects do work best at exactly a power-of-two size.)

    Now I seem to have somehow missed this memo and have been creating all my pixel art as power of 2 sizes, everything from my resolution to my grid is set up around this. It's a pixel art game, so it probably isn't the end of the world if it's not optimised the best way possible, but am I understanding this correctly, that for instance my 32x32 character will essentially take up double the space on a spritesheet than if it was 30x30? It just seems a bit unintuitive. That's on me for not reading the docs though.

    How are others handling this for art assets? Is it much of an issue, or should I just continue as I have? Bearing in mind the game is fairly animation heavy. If I use the auto crop tools each animation frame is cropped to a different size anyway, so maybe I don't need to worry so much and just let construct do it's own thing?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It doesn't mean it takes up twice as much space - it just means a 32x32 image takes up 34x34px on the spritesheet, and that doesn't fit neatly as spritesheets are always a power-of-two size. For example a 128x128 spritesheet can fit 16 images sized 32x32 (assembled in a 4x4 grid), but only 9 images sized 34x34 (assembled in a 3x3 grid).

    However for small images this doesn't matter much - suppose you need a whole other 128x128 spritesheet - that would only use another 64 KB memory. It generally only matters for much larger images.

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