GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Image Help Please!!

SethsAppsSethsApps Posts: 328Member, PRO
edited 8:10PM in Tech Support
Okay, my game is done and everything looks great except for one thing...my images are using 55 MB of memory. Is there any way to use another file format (other than .png) to compress them or anything I can do to make my animations not take up SO much memory. Any help will be very good, thanks!

Comments

  • stanimationstanimation Posts: 406Member
    One thing I do is be sure not to scale any images inside GS but make sure they are the correct size for the actor when imported.
  • SethsAppsSethsApps Posts: 328Member, PRO
    Yea their all 72dpi
  • SethsAppsSethsApps Posts: 328Member, PRO
    TSB I know you are a busy bee but do you think you could look over my project for a little bit and tell me how I can shave some memory usage off my game?
  • synthesissynthesis Posts: 1,693Member
    If you aren't using resolution independence...convert the big images to 8Bit.
  • SethsAppsSethsApps Posts: 328Member, PRO
    Using any image program?
  • synthesissynthesis Posts: 1,693Member
    Most will do it (good ones). I use Photoshop (save for web option).
    If you are using 24Bit images...they will usually be about 3 to 4 times larger in file size.

    You can also use a program like ImageOptim or PNGcrusher (google it) to squeeze them even more.

    However...not sure if that will impact RAM usage. That number is usually impacted by the actual scale of the image. Larger iamges (backgrounds and such) use more ram than little sprite images. If you have LOTS of large images...this is probably eating up your ram.
  • SethsAppsSethsApps Posts: 328Member, PRO
    Honestly all of my images on that scene add up to about 2 MB, but yet the Viewer says images are using up 55 MB of ram?? Very confusing anyone know whats going on.
  • StusAppsStusApps Posts: 1,352Member, PRO
    what is the resolution of the images? As mentioned before with pngs you need to multiply the number of pixels by 4 bytes to get an idea of actual memory usage on the device. They don't remain as png files when used on the device, they are uncompressed.

    so a 480x320 image will use about 615kb of memory on the device.
  • SethsAppsSethsApps Posts: 328Member, PRO
    Oh okay, most of the images are around 200x130 and there are about 50 of them in different animations. Is there another way I can compress these?
  • StusAppsStusApps Posts: 1,352Member, PRO
    they will be uncompressed on the device, that's always the same whether built in GS or not. The compression helps keep the binary size down, but when running it won't make a difference, just the resolution.

    Still at 200x130, 50 images should not be excessive. Depends how many occurances of those 50 images are displayed I guess.
  • quantumsheepquantumsheep Posts: 8,188Member
    Additionally, at 200x130, he's taking up more memory than if he made them 200x128 - following the power of two rule, those extra 2 pixels make the actual image take up a memory space of 256x256?

    Right?

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: http://www.quantum-sheep.com

  • StusAppsStusApps Posts: 1,352Member, PRO
    quantumsheep said:
    Additionally, at 200x130, he's taking up more memory than if he made them 200x128 - following the power of two rule, those extra 2 pixels make the actual image take up a memory space of 256x256?

    Right?

    QS :D

    I think so. I tried to read up on this power of 2 generally outside of GS forums. I understand the principal but not sure of the technical side of it. Do our pictures when published get padded out to be power of 2 sizes and then scaled down? Because I don't think the texture2d accepts anything other than power of 2. I dunno all so confusing, but that's why I use gamesalad.
  • SethsAppsSethsApps Posts: 328Member, PRO
    Well its an animation playing over and over throughout the level while the actor moves so hundreds of reps. Does that make a difference? I dont really have a way around it though... I just need a solution.
  • StusAppsStusApps Posts: 1,352Member, PRO
    I don't think you'll find one. Animations of sequences of largish images will eat through the ram. Lowering the frame rate and cutting some frames will help, but not sure how much.

    If you could have a static image with a couple of smaller animated actors on it to create an animated background, that might be better.
  • scitunesscitunes Posts: 4,047Member, Sous Chef
    Create a copy of your GS project and get rid of the background with the constant animation. Swap in a single png file and check out the difference in the ram usage.

    Then you may have to decide if you can live with a static background image.

    EDIT: WHOA! Just posted and Stu's avatar change startled me!
This discussion has been closed.