Image Help Please!!

SethsAppsSethsApps Member, PRO Posts: 328
edited November -1 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 Member Posts: 406
    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 Member, PRO Posts: 328
    Yea their all 72dpi
  • SethsAppsSethsApps Member, PRO Posts: 328
    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 Member Posts: 1,693
    If you aren't using resolution independence...convert the big images to 8Bit.
  • SethsAppsSethsApps Member, PRO Posts: 328
    Using any image program?
  • synthesissynthesis Member Posts: 1,693
    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 Member, PRO Posts: 328
    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 Member, PRO Posts: 1,352
    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 Member, PRO Posts: 328
    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 Member, PRO Posts: 1,352
    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 Member Posts: 8,188
    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: https://quantumsheep.itch.io

  • StusAppsStusApps Member, PRO Posts: 1,352
    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 Member, PRO Posts: 328
    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 Member, PRO Posts: 1,352
    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 Member, Sous Chef Posts: 4,047
    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!
Sign In or Register to comment.