Image sizes

colandercolander Member Posts: 1,610
I have my actors sized in my game to suit the visual appearance of the game and not image sizes. For example I have an actor at 80x40 and the image size for the actor is 128x64 at 90 dpi. It is ok on iPhone legacy but appears fuzzy on an iPad 1.

I tried 256x128 and 512x256 at 90 dpi and 512x256 works best on iPad. On the iPhone I can't tell the difference between the two but both are better than 128x64.

I already knew my images need to be divisible by 4 and in factors of 2 i.e. 16, 32, 64, 128, etc but now I read that all images need to be 72 dpi for GameSalad. I use Inkscape for all my graphics and it is set to 90 dpi. I managed to get it to spit out images with some difficulty at 72 dpi in the size images I need. I ran them on both devices and again 512x256 works best on both my devices.

There doesn't seem to be a performance penalty that I can detect on my devices. Considering I need a bigger image than the size of my actor and iPad needs twice that size and retina twice again it would be much easier to use the larger image for all devices.

The larger images look like crap in the Creator work space and in Preview but good in the GameSalad Viewer on a device.

I have set up my code so my game will work on iPhone 5 (In the XCode simulator), legacy iPhone and iPad by just changing the platform in Project Info and one attribute value in Attributes. I would hate to have to change all my images because of their sizes every time I move from one platform to another to test the game.

I have read other threads on the subject but they are old in computer age and may not apply in the current environment.

So my questions are;
1. Does size really matter? :) If so do they have to be the same size as the actor?
2. Does dpi really matter?
3. Is GameSalad Viewer reliable? Is this how it will display as an app on a device?

It would have been nice to have asked all these questions before I created all my images but you don't know what you don't know until you know you don't know it, if that makes sense.


  • colandercolander Member Posts: 1,610
    Not a lot of views on this thread but I thought I would update what I have done anyway. I contacted support and asked them them a few questions here they are with answers.

    1. What dpi do my images need to be? ANSWER - For optimal use, 72 dpi
    2. Do they have to be in factors of 4 i.e. 16, 32, 64, etc? ANSWER - It is recommended, especially if you are targeting devices with Retina displays
    3. Do the actor and image have to be the same size? ANSWER - No
    4. If no to No. 3 what size image would I use for a 80x40 actor? ANSWER - 80x40 for standard resolution. 160x80 for Retina
    5. What is the max size image Creator will accept? ANSWER - Max texture size is 2048x2048
    6. What happens and what are the penalties for using larger images? i.e. I noticed using images 4 times larger really slows down Creator and it won't run properly in preview and look terrible but it will run and look great in Viewer on a device. ANSWER - In Creator, it will be auto-resized. If the texture exceeds the max supported size for your target device, the image will not be displayed. Larger images in general usually result in performance hits because it takes more resources to repeatedly draw the large images. It is almost always better to use smaller images when possible.

    I have asked them about the conflict between 2 and four and will post the answer when they reply.
  • DuesDues Member Posts: 1,159
    edited September 2013
    There will be no conflict between #2 and #4 but the thing is if you make your image 33x33 insted of 32x32 the image will be treated like its actually 64x64.

    If Im wrong here, plaese feel free to correct me :)
  • colandercolander Member Posts: 1,610
    I got a reply from GameSalad they said - Sorry I misread your questions. Factors of 4 is not necessary. DIVISIBLE by 4 if targeting Retina is what I meant. For Retina display, your image should be 2x the size of that actor, and divisible by 4.

    @Dues It will be take the same amount of RAM is my understanding and I also thought l may as well just bump it up to the next size then double it for retina but this makes This makes GameSalad start to struggle.

    I have read and seen videos where they say all images should be divisible x 2 otherwise the will be blurry. But after getting the reply from GameSalad it would be better to just make all images divisible x 4.
  • SocksSocks London, UK.Member Posts: 12,822
    @Dues It will be take the same amount of RAM is my understanding . . .
    A 33 x 33 pixel image with take up 4 times as much RAM as a 32 x 32 pixel image - as the smallest chunk of memory it can fit into is 64 x 64 pixels.
    . . . it would be better to just make all images divisible x 4.
    Your images only need to be divisible by 4 if your Target device is Retina.
  • jonmulcahyjonmulcahy Member, Sous Chef, PRO Posts: 10,385
    - images should be the same size of the actor (or 2x if using retina)
    - images should be divisible by 2 (or 4 for retina)
    - always 72 dpi

    that's really all you need to know.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,577
    edited October 2013

    Hi @colander yes, no need for added complication or worry; @jonmulcahy said it in one (well, three, actually ;-) ):
    - images should be the same size of the actor (or 2x if using retina)
    - images should be divisible by 2 (or 4 for retina)
    - always 72 dpi

    that's really all you need to know.
    Only one other thing worth mentioning: one day, perhaps relatively soon, we will all have to account for retina devices.... so images will always need to be twice the size of the displayed max. image. Something to bear in mind for the future.


    Edit: so with that said, and the many other threads concerning this same topic, I'll "set this one in stone", I think, and close it.


    ""You are in a maze of twisty passages, all alike." - Zork        temp domain

This discussion has been closed.