How many images you can put into one scene/game without making the game lag?

ShadowMoonShadowMoon Member Posts: 146
edited February 2012 in Working with GS (Mac)
i am making some images for one scene but i dont know if it makes the game lag or not. how many images can GS handle(the whole game)? is it better to cut big images into small pieces for the scene/game or just use the big images?

Comments

  • ShadowMoonShadowMoon Member Posts: 146
    thank you TSB
    btw can GS handle 500+ images without any lagging (some small like 128, some 1024 etc..)?
  • ShadowMoonShadowMoon Member Posts: 146
    thank you again TSB
    How do you know if it max out or almost max out all the device ram?
  • 921creative921creative Member, PRO Posts: 140
    I too have a TON of images in my game but, being first and foremost a web designer, know the importance of compressing graphics so it's not unlike preparing images for the web. Backgrounds are the largest and I have to wonder, is it best to preload background images or is it safe to not preload them? I turned preloading off for a majority of my images and loading times till suck. Tshirt, I know you talk about image sizes being divisible by 2, but I have to honestly say I have many in my game that are 28.5 or 7.5 and have yet to notice any blurring. Are they more likely to blur on older devices, perhaps? I've only tested so far on an iPhone 4.
  • DEGOMobileDEGOMobile Member Posts: 43
    edited February 2012
    So for my game each level will have like 30 images the max... For 50 levels though so that's... 1,500 is that way to much? It would be 30 images per scene and like 50 scenes cuz there's 50 levels
  • DEGOMobileDEGOMobile Member Posts: 43
    edited February 2012
    ^ That would be the Pro Version the Free Version only has 200 images... 10 levels
  • ShadowMoonShadowMoon Member Posts: 146
    what!! Free Version only has 200 images space?
  • simo103simo103 Member, PRO Posts: 1,331
    @clock .. no he is talking about his game. You can put any number in the free version but it can effect RAM (just as it would if you were Pro .. no difference).
  • simo103simo103 Member, PRO Posts: 1,331
    edited February 2012
    @clock "How do you know if it max out or almost max out all the device ram?"

    When you load your game to the GS viewer on your device you will see the GS Creator on your computer will show Memory and FPS (frames per second) ... depending on the device those could hit a point where it effects your game. Lot's of images can be done you just want to make them as small memory wise as you can.

    I find it useful to search in google for things like this - "memory site:gamesalad.com" ... brings up a bunch of links to old forum posts which might provide some ideas.
  • ShadowMoonShadowMoon Member Posts: 146
    one scene took 75.6 MB is that good?
  • simo103simo103 Member, PRO Posts: 1,331
    @clock .. no not good. here is some info I copied a while ago from others posts to the forums:

    4g devices can get to 80-84 total ram before it crashes
    2g/3g can get to 40-42 total ram before it crashes.

    **************QUOTE FROM OLD POST - JOE AT FIREMAPLEGAMES I BELIEVE**********

    There are a few rules of thumb that I would consider when making graphics for GameSalad:

    1. The pixel dimensions of your graphics should be even. i.e 244x66 instead of 245x66.
    The reason for this is because GameSalad centers everything. Since all Actors are centered,
    any odd pixel will get split - causing the image to blur.

    So, Rule #1, make all dimensions even to avoid blurry images.

    2. This expands on Rule #1...
    If you are making Retina Display graphics using the Resolution Independence feature in GameSalad,
    not only do your graphic dimensions need to be even, but they need to be multiples of 4.
    So 72x36 instead of 70x36. For the same exact reason mentioned above, when GameSalad takes your larger,
    beautifully designed Retina Display graphics and makes 25% versions of them for the smaller screens -
    any odd dimension will cause an image blur. A 70x70 pixel graphic will now become 35x35, and will blur
    on the older devices.

    So, Rule #2, if you are using Resolution Independence, make all dimensions evenly divisible by 4.

    3. Save all your images at 72dpi. DPI refers to dots per inch. It is a printing term and gets ignored
    by the iPhone. However, for your own sanity, make all of your images 72dpi. This is the default standard for
    monitors and screens. If your image is not saved at 72dpi, GameSalad will automatically convert it to 72dpi and
    resize it when you import it. In Photoshop, you can change an image's dpi without changing its pixel dimensions. GameSalad does not do this and will resize the image as well. This will cause all sorts of visual problems.

    So Rule #3, save all graphics at 72dpi to avoid headaches when importing your graphics into GameSalad.

    4. Save all graphics as PNG files. There are two common PNG formats that GameSalad uses: PNG-24 and PNG-8. PNG-24 means that there are 8 bits per color channel. 256 reds, 256 blues, and 256 greens. For a total of ~1.6 million colors per image. PNG-24 also allows an 8 bit alpha transparency mask. So 256 levels of transparency as well. This is what you will most often use for your game graphics.

    If file size is a concern, you can also save your images in the PNG-8 format. Instead of 1.6 million colors, the software will select a 256 color palette for your image. You can also choose one single color to be transparent.
    This will greatly reduce file size at the cost of color choices.

    So Rule #4, save all images as PNG-24 or PNG-8

    5. A quick note on color depths. High-end image editing software like Photoshop can handle 16 bits per channel and even 32 bits per channel. You DO NOT want to work at these color depths. iOS only supports 8 bits per channel - 1.6 million colors. The higher bit depths are for advanced image editing, allowing you to edit an image many more times without degrading it.

    So Rule #5, make sure your image editing software is set to 8-bits/channel.

    6. Texture memory. When you import your graphics into GameSalad and place them on an Actor, GameSalad turns the images into textures. Textures are stored in "containers" in memory to save space and increase performance. The dimensions of these "containers" are in powers of 2: 2,4,8,16,32,64,128,256,512,1024. They do not have to be square. 32x1024 is valid.

    When you import your graphics, they are placed into the appropriate containers.
    A 64x50 graphic will be placed into a 64x64 container. A 42x980 graphic will be placed into a 64x1024 sized container.

    These containers do not need to dictate your image sizes or the design of your game, but you should be aware of them. A graphic that is 514x514 will need to be placed in a 1024x1024 container. So when you think you are moving around an image that is only 514x514, you are actually moving around an image that is 1024x1024. This will greatly impact performance, as well as waste precious memory on these devices. A better choice would have been to design the graphic to be 512x512. A player Actor that is 66x34 will need to be placed into a 128x64 container. This gets even worse when the player is animated. A player that is 64x32 would be much more efficient. But if your player absolutely needs to be 66x34 or it ruins the whole aesthetic
    of your game - that's fine - just understand what the performance costs are. Especially when performance really counts. Don't needlessly make the bullets in your space shooter 18x10 when they would look fine at 16x8, and would save half the memory used.

    So Rule #6, be aware of the texture memory you use and design your graphics accordingly.

  • ShadowMoonShadowMoon Member Posts: 146
    wait..when i send my game to my iphone that 75.6 MB from the GS viewer is the size of the game right? Not 75.6 MB of ram being used?
  • bazookaBenbazookaBen Member Posts: 318
    @simo123 i ran a GSviewer test on my iPod touch 2g, it's still going strong at 50 mb total memory usage, 38 fps

    images: 12.8 mb
    sounds: 2mb
    game engine: 8.2 mb
    other: 28 mb
Sign In or Register to comment.