Blurry images?

StrykerStryker Member Posts: 40
Hey,

Whenever i use images i've made in Photoshop they become blurry in-game.

What are the best export options that will prevent the "blurrie-ness"?

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    You have to make sure that none of the dimensions of the image are odd.

    i.e 244x46 instead of 243x46
  • StrykerStryker Member Posts: 40
    Does is matter what format?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    All of your images should be exported as .png files. 72dpi. Even dimensions.

    If you plan on supporting Resolution Independence, then your images dimensions should also be in multiples of 4, otherwise they will blur on the older devices.
  • ARC_GamesARC_Games Member Posts: 78
    so is it ok to use image files with sizes that are not in powers of 2? i.e. (8x16, 32x32, 256x64, 512x32, etc.), but as long as they are at least in multiples of 2 (or multiples of 4 to support Resolution Independence) they are ok? (i.e. 480x320, 12x20, 100x40, etc)

    so far, I was under the impression that I had to save the images with size dimensions that were powers of 2, and so I have been doing that, then I resize them in the GS editor if I want them to look a different size in the game than the image file size. for example, my screen backgrounds I have save as 256x256 .png files, then in GS I just stretch the images to make the actor's size 480x320. But I think it might be blurring them a little when I stretch them, especially the Menu Screen images that have text on the image.

    If I could just save the original images as 480x320, etc., that would be much more convenient....

    please let me know what I should do. thanks :-)
  • ARC_GamesARC_Games Member Posts: 78
    while I'm at it, I have another question about images too. I'm making a platformer game with large scene areas.... so far either 4800x3200 or half that size. for the background, I created an image that I could use as a sky background, and I saved the image as .png 256x256. for the background image actor in GS, I used the 256x256 image, and then stretched the actor size to fit the scene size of 4800x3200. the image tiles horizontally and stretches vertically, and it looks good that way.

    but I am wondering is there a limit on how big you should size an actor in GS. when I stretch the image to 4800x3200 is that going to cause problems with the game running on the iphone?

    also, is there any kind of limit on scene area size, or the number of actors in a scene, or the number of actor types in a game?

    so far, I'm not planning to do any scenes with larger than 4800x3200 (that is a size area equal to 100 camera view screens of 480x320), and it's working out pretty well as far as game play area for levels in my game. the game is a platformer where the player moves around in the scene looking for items and avoiding/defeating enemies in the scene until he reaches a door that exits the scene and advances the game to the next level's scene. I think so far I have about 160 actors in the GS game project file for this game. That includes platform objects, various bad guy actors, backgrounds, menu screens, menu buttons, controls, power-up objects, prize objects, doors that teleport the player around the scene, HUD actors, etc.

    Before I go much further, I would like to know if there is any kind of limit on the number of actors, or any limit on scene area size. I would guess, that maybe it all depends on how much code each of the actors has in them (i.e. how many GS behaviors, timers, rules, movements, or animations the actors have associated with them), and how many code-heavy actors appear in the scene or inside the 480x320 camera view space at any given moment.

    I have tried to disable most of the moving actors in the scene when they are not located near the player where the camera view is always located. For example, I am testing with a rule in the behaviors for moving actors whether their position is within about a screen or two distance of the main character's actor. When the main character in the game gets near them, they will perform their movements, animations, sounds, etc. Otherwise, those actors just sit there out of camera view, but still in the scene, and doing no code behaviors except for a Rule testing for when the main character comes near them.

    But anyway, even though I am only activating the actors when the main character gets near them in the scene, I am still wondering if there is any kind of limit on the scene area size or number of actors allowed in a scene, at least in terms of performance on the iphone/ipod touch. Any suggestions?
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    The max size for the image is 1024x1024.

    An image does not have to have dimensions at the power of 2. The power of 2 rule just means that the amount of memory used for an image is rounded up to the next power of 2.
    So if you have a 510x510 image it uses memory like a 512x512 image. But a 513x513 will use as much memory as a 1024x1024 image.

    See more info in our FAQs. http://gamesalad.com/wiki/faqs:game_elements#images
  • design219design219 Member Posts: 2,273
    If you use graphics with uneven pixel dimensions, go under "graphics" in your actor and set the "Horizontal Wrap" and "Vertical Wrap" to "fixed".

    That will fix the blurriness.
  • forkliftforklift Member Posts: 386
    Is this whole 'even pixel' thing a limitation of the iphone/ipad itself or GameSalad?

    And thanks for the tip, design219! I'll be sure to try it out.
  • ARC_GamesARC_Games Member Posts: 78
    thanks for the suggestions. I appreciate it.

    I think I understand how it works now, but have one more question....

    With making sure that the image sizes are divisible by 2 (or 4 for resolution independence), does that apply only to the saved .png image file sizes, or does it also apply to the in-game actor sizes too?

    Is it ok to stretch the image sizes in the game scenes (by changing the actor's size), or must the actor dimensions always remain at multiples of 2 or 4 just like the original image files?

    Ok, actually I have 2 questions... is the max image size of 1024x1024 also a requirement for actor sizes? Let's say I have a background image that is 1024x1024 and I want to use it to fill up a space in a larger scene area, but the graphic I am using is tileable (aka, my image is just going to repeat over and over in the scene background to fill up the larger sized scene area).

    If I use the 1024x1024 .png image for the actor's image, and then make the actor a size of 4096x1024 with the horizontal graphics set to "tile", is it going to be ok? Or would I have to just tile the image manually using 4 different actors of size 1024x1024?

    Does anyone know how that works? Seems like, it would be easier to just do one actor and tile the image (if the graphic just repeats itself in the scene), as opposed to using multiple actors to create essentially the same seamlessly tiled look of the background graphics. But obviously, if an ACTOR size of larger dimensions than 1024x1024 is not allowed, then to tile the image using only one actor would not work.
  • ARC_GamesARC_Games Member Posts: 78
    btw, I truly appreciate the knowledge from experts like CodeMonkey, tshirtbooth, and FireMapleGames.... I have a degree in electrical engineering, so I am no slouch, but you guys rock!
  • ARC_GamesARC_Games Member Posts: 78
    I am working on resizing my images, using Gimp, and when I go to save the file as a png with 72 ppi, it ends up saving it with 72.009 ppi. Not sure why it does that. Is that going to mess up my images if the ppi is 72.009, and if so, does anyone know how to make Gimp save them with 72 ppi. I type 72 ppi in for the value on the scale image window in Gimp and click Resize. but then when I save the file and open it up again in Gimp, it tells me that it is again 72.009 ppi.

    Anyone know how to fix this?
  • ARC_GamesARC_Games Member Posts: 78
    well, it seems as though I can fix the ppi problem by opening the files using Pixen, and then re-saving them from there. very tedious though, but it does save them as 72 ppi instead of 72.009 ppi
Sign In or Register to comment.