Spritesheet Padding Bug, power-of-two size images

Bugs will be moved here once resolved.

Post » Sun Oct 26, 2014 7:32 pm

Problem Description
The exported sprite sheet of power-of-two size images have a wrong size when setting Downscaling to "High quality"

Attach a Capx

Description of Capx
The new sprites use 4 times more memory

Steps to Reproduce Bug
  • Step 1 Export project
  • Step 2 Open the "images" folder
  • Step 3 Check the exported images
Observed Result
The 64x64 sprite is resized into 128x128
The 256x256 sprite is resized into 512x512

I have designed my game with power-of-two size images
So, this happens with ALL my images

I even have 1024x1024 sprites, that use 4MB (which it's ok) but if they are resized to 2048x2028 they use 16MB!
I think if the image has a size of power-of-two, it should not be resized

Expected Result
I expect that the sprites:
-If I have a 64x64 sprite, it doesn't have sense resizing it into a 128x128
-If I have a 256x256 sprite it doesn't have sense resizing it into a 512x512

Affected Browsers
  • Exported images: (YES)
Operating System and Service Pack
Windows 8.1 Update 1 (64-bits)

Construct 2 Version ID
Release 185 (64-bits)
You do not have the required permissions to view the files attached to this post.
Posts: 660
Reputation: 12,594

Post » Sun Oct 26, 2014 7:54 pm

Afaik, C2 adds a 1 pixels border around the picture, it is documented, even though I did not remember seeing it directly in the manual.
https://www.scirra.com/tutorials/577/co ... imisations

But I think the manual says to keep sprites just under power of 2 size for that particular reason.

If your report already takes that in account, please ignore this post.
Game design is all about decomposing the core of your game so it becomes simple instructions.
Posts: 2,123
Reputation: 17,200

Post » Wed Oct 29, 2014 4:18 pm

Power-of-two size images don't work well with spritesheets, because they get a 1px border added. It is documented:

The optimal size is two pixels less than a power-of-two size, e.g. 30x30, 126x126 or 254x254.

So I'm not sure why you've gone and chosen exact power-of-two sizes for all your images - this will force the worst case scenario for spritesheet packing. I don't want to encourage worst-case behavior so I'm going to close as won't fix. Alternatively just use medium quality downscaling (very few people genuinely need high quality downscaling, see the manual entries on it)
Scirra Founder
Posts: 25,073
Reputation: 199,682

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest