Optimal image proportions?

Danneman101Danneman101 Member Posts: 59
Does GS utilize some sort of image compression that works better with images that have equal width and height (ie. 100x100 px instead of 80x120)?

If so, does it only work with standardised sizes like 64x64, 128x128, 256x256, 512x512, etc, or does GS compress equally well an image of non-standardized sizes (ie. 100x100px)?

Also, what happens with compression if you resize an object inside the game wearing this square image? For instance, if the image is 256x256 px, but the object is 256x300 px.

What I'm trying to figure out is if I will gain any improvements if I convert my images to power of 2 scale by adding transparency to the dimension lacking in size.

Comments

  • old_kipperold_kipper Member Posts: 1,420
    the image compression as a save asset is different to the graphic in memory. When loading a smaller less complex graphic will open faster, but as it loads it opens into 'containers' that have the old rule of powers of 2 applied to the size of the container. These do not have to be the same numbers so a graphic that is 64x128 is held in memory as a full container.

    Having transparency in a file and allowing it to run to the dimension of the next power of two outside of the image will not effect the memory use but it will impact things- Firstly the collision area. But, (and this is a big but [and I like big buts]) also possibly the speed, as the alpha has to calculated as transparent. I've noticed that with large areas of alpha stacking upon each other, that there is a speed loss. But I couldn't say if this is processed out the next power of 2. It maybe, it maybe not. If it isn't then smaller areas of alpha would perform faster. I suppose a test with very large areas of alpha might reveal the truth...

    kipper
  • Danneman101Danneman101 Member Posts: 59
    So if I understand this correctly, my best bet at optimizing performance and at the same time get the best looking graphics is not to square the images, but rather have the largest dimension be exactly equal to one of the standard sizes (64, 128, 256, 512, 1024, etc) since for instance an image of 65x1 will occupy an equal 128x128 container as a 128x2 px image would?
  • old_kipperold_kipper Member Posts: 1,420
    You can use 64x128 or 32x256 or similar mix as the sides don't both have to be the same. I think that to be aware of the rule of the powers 2s but don't let it run everything. And besides you might want the collision area to sit close to an object that is just not sitting with the rule. Sometimes it is just easier to run with things at 24 square or some such... and never use an odd number for a dimension
  • Danneman101Danneman101 Member Posts: 59
    Sounds like good advice - thanks a lot, old_kipper :)
Sign In or Register to comment.