Image Sharpness

danlbryantdanlbryant Member Posts: 236
edited November -1 in Working with GS (Mac)
Hey guys, I'm started testing my new game on my iPod touch 2g and i noticed that some images look kind of blurry compared to the GS preview. Is that just gamesalad? or am i making my images wrong?

I make PNG images from photoshop

Comments

  • design219design219 Member Posts: 2,273
    If your images have an odd number of pixels in the height or width, then you need to chage your actors graphics settings for wrap to "fixed."
  • danlbryantdanlbryant Member Posts: 236
    aaah I see, thanks!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    yes, either make all your graphics have an even number for each dimension, or set the graphics mode of the actor to "fixed", like design219 suggests.

    However, if you you want to use the Resolution Independence option for iPhone4, you cannot use the "fixed" mode, all your graphics need to be set to stretch.

    Also, for iPhone4 Resolution Independence, make all of your dimensions not only even, but also a multiple of 4 - otherwise they will blur when scaled. A 70x70 graphic will now become 35x35, causing a blur.
  • ORBZORBZ Member Posts: 1,304
    @ FMG, i'm pretty sure... but I could be wrong. Graphics don't just need to be even, they need to be powers of two: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, etc...

    The length and width can be different values. 16x32 for example.

    But for example, 6 is even, but not a power of two.

    I think I read somewhere that iPhone requires gfx as a power of two.

    If i'm wrong, that'd be great! Anyone know for sure?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Graphics are stored into Texture memory, and that memory is allocated in powers of two...

    So a 346x378 graphic would fit into a 512x512 "chunk".

    For example, a 130x68 graphic will require a 256x128 piece of memory. If possible, that would be much better memory-wise as a 128x64 graphic.

    You don't need to let it dictate your design, but you should be aware of it.

    Making the graphics an even number is because GameSalad centers everything. An odd pixel will get split, causing the blur.
  • ORBZORBZ Member Posts: 1,304
    Ahh.. Ok, it's about memory allocation vs wasted space. Good to know! Tnx :)
  • gamesmoldgamesmold Member, PRO Posts: 279
    firemaplegames said:However, if you you want to use the Resolution Independence option for iPhone4, you cannot use the "fixed" mode, all your graphics need to be set to stretch.

    Hi firemaplegames, does that mean you also can't use tiled mode with resolution independence?
    Because the tiled graphics mode is the most important one of them all. Without it, you'd need thousands of performance killing single actors...
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I'm pretty sure you cannot use the Tiled of Fixed modes.
    I think that you need to use Stretched.

    But I haven't tested it yet.

    And I definitely agree with you.
    Ideally all of the modes would still work.
  • synthesissynthesis Member Posts: 1,693
    I believe you can use tile mode with RI.

    RI basically makes a copy of the graphic. One is name "graphic.png" and the other is name "graphic@2x.png". You provide the latter (but GS adds the @2x part of the name) and GS creates the prior on the upload compile. The first is then used on pre-4G devices and the second is used on 4G retina devices. That's all there is to it.
  • gamesmoldgamesmold Member, PRO Posts: 279
    Thank you for the quick replies!
    Yes, then I believe it should be possible, if you simply use the large version in fixed or tiled mode and keep the actual in-game-image dimension to the desired size. The graphics will probably look strange and cropped in the editor, but as the right image will be displayed later on, it should look ok during runtime. I'll just go and test it.
  • UtopianGamesUtopianGames Member Posts: 5,692
    Making my 1st retina supported game using the check box so to clarify.

    Any number that can be dived by 2 and not leave an odd number?

    4, 8, 12, 16, 20, 24, 28, 32, 36, 40 etc ?

    Thanks Guys,

    Darren.
  • design219design219 Member Posts: 2,273
    I just did a quick check, and it looks like if you set your images to 144 pixels per inch, they drop into GS at the correct workable size. That should make it easier. I may try it on my next game.
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    I don't want to make another topic, so I'll ask here. All of my graphics are divisible by 4 (f.e. 716x700)
    I'll checked Resolution Independence, and run GS Viewer on my iPhone 3G (yes, I know that RI is for iPhone 4, but I want to make a game that will look good on 3G and 4). But all graphics are blurry.
    Could you please tell me what I possibly made wrong?

    I don't have FIXED option on, it's all Stretched.
    Also every image position is divisible by 2.

    Thank you.
  • StrobanikStrobanik Member Posts: 77
    MarcinMakaj, It has to be divided by four into an even number, or the graphics will look blurry. In your example 716 x 700 will become 179 x 175 (odd numbers). 720 x 696 would work (180 x 174)

    Also I'm wondering if anyone has tried the independence resolution on iPhone 4 with tile as mentioned above?
  • foldifoldi Member Posts: 21
    I have an iPhone 3GS and iPhone 4 and am trying to resolve issues using resolution independence and image tiling. My scene size is 2880 X 1920.

    Before I tried using RI, I successfully tiled a background by creating a 2880 X 1920 actor and assigning a 480 X 320 image. I set both the horizontal and vertical wrap on the actor to 'tile'. The image repeated 6 times horizontally and 4 times vertically on both the 3GS and iPhone 4.

    In an effort to use RI, I created a new background image by doubling the original image's size to 960 X 640 and saving it as a new image. I then reimported it into the project and assigned it to the actor in the background. In the preview window, the image looked twice as big as intended... which is what you would expect. Playing back on my 3GS the image looked correct... which is also what you would expect with the RI feature.

    However, playing back on my iPhone 4, the image remained twice as large as intended. Does anyone have suggestions for creating tiled images so that the tile does not double in size on the iPhone 4 when using RI?
  • Rob2Rob2 Member Posts: 2,402
    how did you add the image to the actor? There seems to be a bug when assigning images to actors when using RI. To make sure the image is the correct size do NOT create the actor first.

    Either drop image into scene to create actor
    Or drop into actor inspector but do NOT drop onto an already created actor...

    probably other ways but this is what I have found so far.
  • foldifoldi Member Posts: 21
    Thanks. So I deleted the actor... I then dropped the 960 X 640 image into the scene. The image appeared as a 480 X 320 image... which is what we want! However, changing the wrapping to 'tile' in either the actor prototype or the instance caused the image to appear as 960 X 640. So when it comes to tiling, no luck.
  • Rob2Rob2 Member Posts: 2,402
    yeah..desktop preview is wrong with RI and tiling but it works on device.
  • Rob2Rob2 Member Posts: 2,402
    have you got the GS viewer installed on both your 4 & 3GS ?
  • foldifoldi Member Posts: 21
    I have the viewer installed on the iPhone 4. But for these tests, I've been compiling .apps and installing them on both devices.
Sign In or Register to comment.